10 lines
281 B
Rust
10 lines
281 B
Rust
|
|
// 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
|
||
|
|
}
|