forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create helper
maybe_report_similar_assoc_fn
- Loading branch information
Showing
4 changed files
with
66 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
fn main() { | ||
String::from::utf8; | ||
//~^ ERROR ambiguous associated type [E0223] | ||
//~| HELP you might have meant to use `from_utf8` | ||
//~| HELP there is an associated function with a similar name: `from_utf8` | ||
String::from::utf8(); | ||
//~^ ERROR ambiguous associated type [E0223] | ||
//~| HELP you might have meant to use `from_utf8` | ||
//~| HELP there is an associated function with a similar name: `from_utf8` | ||
String::from::utf16(); | ||
//~^ ERROR ambiguous associated type [E0223] | ||
//~| HELP you might have meant to use `from_utf16` | ||
//~| HELP there is an associated function with a similar name: `from_utf16` | ||
String::from::method_that_doesnt_exist(); | ||
//~^ ERROR ambiguous associated type [E0223] | ||
//~| HELP if there were a trait named `Example` with associated type `from` | ||
str::from::utf8(); | ||
//~^ ERROR ambiguous associated type [E0223] | ||
//~| HELP you might have meant to use `from_utf8` | ||
//~| HELP if there were a trait named `Example` with associated type `from` | ||
str::from::utf8_mut(); | ||
//~^ ERROR ambiguous associated type [E0223] | ||
//~| HELP you might have meant to use `from_utf8_mut` | ||
//~| HELP if there were a trait named `Example` with associated type `from` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters