Closed
Description
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a5d74dbaa80fd7833c2b937fc94f58fa
fn main() {
let x = [1, 2, 3].length();
}
The current output is:
error[E0599]: no method named `length` found for array `[{integer}; 3]` in the current scope
--> src/main.rs:2:23
|
2 | let x = [1, 2, 3].length();
| ^^^^^^ method not found in `[{integer}; 3]`
Ideally the output should look like:
error[E0599]: no method named `length` found for array `[{integer}; 3]` in the current scope
--> src/main.rs:2:23
|
2 | let x = [1, 2, 3].length();
| ^^^^^^ help: a function with an alias to `length` exists: `len`
Searching for length
will already bring up len
in the docs: https://doc.rust-lang.org/std/?search=length
It would be nice if the CLI errors had feature parity.
Meta
rustc --version
: 1.51.0
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: A feature request, i.e: not implemented / a PR.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.