Closed
Description
Code
fn main() {
let hello = len(vec![]);
}
Current output
error[E0425]: cannot find function `len` in this scope
--> src/main.rs:2:17
|
2 | let hello = len(vec![]);
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `len` on `&Vec<_>`
--> /home/milomoisson/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/macros.rs:44:36
44- $crate::__rust_force_expr!($crate::vec::Vec::new())
44+ $crate::__rust_force_expr!(.len())
|
For more information about this error, try `rustc --explain E0425`.
error: could not compile `rustc-wrong-hint-repro` (bin "rustc-wrong-hint-repro") due to previous error
Desired output
error[E0425]: cannot find function `len` in this scope
--> src/main.rs:2:17
|
2 | let hello = len(vec![]);
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `len` on `&Vec<_>`
--> /home/milomoisson/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/macros.rs:44:36
44- len(vec![])
44+ vec![].len()
|
For more information about this error, try `rustc --explain E0425`.
error: could not compile `rustc-wrong-hint-repro` (bin "rustc-wrong-hint-repro") due to previous error
Rationale and extra context
No response
Other cases
No response