Files
rust/tests/ui/inference/ambiguous-numeric-in-closure-ref.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
281 B
Rust
Raw Normal View History

// Test for better error message when numeric type is ambiguous in closure parameter with reference
//@ run-rustfix
fn main() {
let _ = (0..10).filter(|&v| v.pow(2) > 0);
//~^ ERROR can't call method `pow` on ambiguous numeric type `{integer}`
//~| SUGGESTION &i32
}