-
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.
best_blame_constraint
: add a special case to recover object lifetim…
…e default notes
- Loading branch information
Showing
6 changed files
with
51 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
error[E0521]: borrowed data escapes outside of method | ||
--> $DIR/issue-54779-anon-static-lifetime.rs:32:9 | ||
error: lifetime may not live long enough | ||
--> $DIR/issue-54779-anon-static-lifetime.rs:32:24 | ||
| | ||
LL | cx: &dyn DebugContext, | ||
| -- - let's call the lifetime of this reference `'1` | ||
| | | ||
| `cx` is a reference that is only valid in the method body | ||
| - let's call the lifetime of this reference `'1` | ||
... | ||
LL | bar.debug_with(cx); | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| `cx` escapes the method body here | ||
| argument requires that `'1` must outlive `'static` | ||
| ^^ coercion requires that `'1` must outlive `'static` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0521`. |
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