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.
Auto merge of rust-lang#116891 - aliemjay:opaque-region-infer-rework-…
…2, r=<try> rework opaque type region inference fixes rust-lang#113971 Pass -> Error fixes rust-lang#111906 ICE -> Pass fixes rust-lang#110623 == fixes rust-lang#109059 == fixes rust-lang#112841 Pass -> Error fixes rust-lang#110726 ICE->Error r? `@ghost`
- Loading branch information
Showing
20 changed files
with
498 additions
and
117 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
12 changes: 12 additions & 0 deletions
12
tests/ui/impl-trait/defining-use-captured-non-universal-region.infer.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,12 @@ | ||
error[E0792]: expected generic lifetime parameter, found `'_` | ||
--> $DIR/defining-use-captured-non-universal-region.rs:15:18 | ||
| | ||
LL | fn foo<'a>() -> impl Sized + 'a { | ||
| -- this generic parameter must be used with a generic lifetime parameter | ||
... | ||
LL | let i: i32 = foo::<'_>(); | ||
| ^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0792`. |
24 changes: 24 additions & 0 deletions
24
tests/ui/impl-trait/defining-use-captured-non-universal-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,24 @@ | ||
// This was an ICE. See #110726. | ||
// | ||
// FIXME(#111935) revision `statik` should not pass. | ||
|
||
// revisions: statik infer fixed | ||
//[fixed] check-pass | ||
//[statik] check-pass | ||
#![allow(unconditional_recursion)] | ||
|
||
fn foo<'a>() -> impl Sized + 'a { | ||
#[cfg(statik)] | ||
let i: i32 = foo::<'static>(); | ||
|
||
#[cfg(infer)] | ||
let i: i32 = foo::<'_>(); | ||
//[infer]~^ ERROR expected generic lifetime parameter, found `'_` | ||
|
||
#[cfg(fixed)] | ||
let i: i32 = foo::<'a>(); | ||
|
||
i | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.