Skip to content

Make suggestions for 'does not implement any method in scope' #20028

Closed
@aidanhs

Description

@aidanhs

I made this mistake just now:

~/rust/tclscan $ cargo test
   Compiling tclscan v0.0.1 (file:///home/ahobsons/rust/tclscan)
/home/ahobsons/rust/tclscan/src/lib.rs:120:59: 120:72 error: type `collections::vec::Vec<&str>` does not implement any method in scope named `connnect`
/home/ahobsons/rust/tclscan/src/lib.rs:120             Ok(true) => println!("DANGER: {}", token_strs.connnect(' ')),
                                                                                                     ^~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
/home/ahobsons/rust/tclscan/src/lib.rs:120:59: 120:72 error: type `collections::vec::Vec<&str>` does not implement any method in scope named `connnect`
/home/ahobsons/rust/tclscan/src/lib.rs:120             Ok(true) => println!("DANGER: {}", token_strs.connnect(' ')),
                                                                                                     ^~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `tclscan`.

To learn more, run the command again with --verbose.

(count the 'n's)

It'd be nice if this made the suggestion for 'connect' (like misspelling a variable does).
I had a look but can't see any existing issues for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions