-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #105788, Remove unreasonable help message for auto trait
- Loading branch information
1 parent
998e1a9
commit e2e9a31
Showing
5 changed files
with
33 additions
and
51 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
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,28 +1,18 @@ | ||
error[E0380]: auto traits cannot have associated items | ||
error[E0753]: auto traits cannot have associated items | ||
--> $DIR/issue-105732.rs:4:8 | ||
| | ||
LL | auto trait Foo { | ||
| --- auto trait cannot have associated items | ||
LL | fn g(&self); | ||
| ---^-------- help: remove these associated items | ||
|
||
error[E0599]: the method `g` exists for reference `&Self`, but its trait bounds were not satisfied | ||
error[E0599]: no method named `g` found for reference `&Self` in the current scope | ||
--> $DIR/issue-105732.rs:9:14 | ||
| | ||
LL | self.g(); | ||
| ^ | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`Self: Foo` | ||
which is required by `&Self: Foo` | ||
`&Self: Foo` | ||
= help: items from traits can only be used if the type parameter is bounded by the trait | ||
help: the following trait defines an item `g`, perhaps you need to add a supertrait for it: | ||
| | ||
LL | trait Bar: Foo { | ||
| +++++ | ||
| ^ help: there is a method with a similar name: `f` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0380, E0599. | ||
For more information about an error, try `rustc --explain E0380`. | ||
Some errors have detailed explanations: E0599, E0753. | ||
For more information about an error, try `rustc --explain E0599`. |