-
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.
Rollup merge of #128239 - compiler-errors:error-on-object-cand-confir…
…m, r=oli-obk Don't ICE when encountering error regions when confirming object method candidate See the inline comment for an explanation. Fixes #122914
- Loading branch information
Showing
4 changed files
with
35 additions
and
12 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 was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
tests/ui/methods/dont-ice-on-object-lookup-w-error-region.rs
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Fix for issue: #122914 | ||
|
||
use std::future::Future; | ||
use std::pin::Pin; | ||
|
||
fn project(x: Pin<&'missing mut dyn Future<Output = ()>>) { | ||
//~^ ERROR use of undeclared lifetime name `'missing` | ||
let _ = x.poll(todo!()); | ||
} | ||
|
||
fn main() {} |
11 changes: 11 additions & 0 deletions
11
tests/ui/methods/dont-ice-on-object-lookup-w-error-region.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0261]: use of undeclared lifetime name `'missing` | ||
--> $DIR/dont-ice-on-object-lookup-w-error-region.rs:6:20 | ||
| | ||
LL | fn project(x: Pin<&'missing mut dyn Future<Output = ()>>) { | ||
| - ^^^^^^^^ undeclared lifetime | ||
| | | ||
| help: consider introducing lifetime `'missing` here: `<'missing>` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0261`. |