-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
review comments: change wording and visual output
- Loading branch information
Showing
6 changed files
with
26 additions
and
59 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
14 changes: 6 additions & 8 deletions
14
src/test/ui/traits/trait-param-without-lifetime-constraint.stderr
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,21 +1,19 @@ | ||
error: `impl` item signature doesn't match `trait` item signature | ||
--> $DIR/trait-param-without-lifetime-constraint.rs:14:5 | ||
| | ||
LL | pub trait HaveRelationship<To> { | ||
| -- this type parameter might not have a lifetime compatible with the `impl` | ||
LL | fn get_relation(&self) -> To; | ||
| ----------------------------- | ||
| | | | ||
| | you might want to borrow this type parameter in the trait to make it match the `impl` | ||
| expected `fn(&Article) -> &ProofReader` | ||
| ----------------------------- expected `fn(&Article) -> &ProofReader` | ||
... | ||
LL | fn get_relation(&self) -> &ProofReader { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&Article) -> &ProofReader` | ||
| | ||
= note: expected `fn(&Article) -> &ProofReader` | ||
found `fn(&Article) -> &ProofReader` | ||
= note: the lifetime requirements from the `trait` could not be satisfied by the `impl` | ||
= help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output | ||
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` | ||
--> $DIR/trait-param-without-lifetime-constraint.rs:10:31 | ||
| | ||
LL | fn get_relation(&self) -> To; | ||
| ^^ consider borrowing this type parameter in the trait | ||
|
||
error: aborting due to previous error | ||
|