forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#113648 - aliemjay:opaque-binder-ice, r=oli-obk
don't replace opaque types under binders with infer vars Fixes an ICE in the ui test code. Fixes rust-lang#109636 Fixes rust-lang#109281 Fixes rust-lang#86800 r? `@oli-obk`
- Loading branch information
Showing
5 changed files
with
27 additions
and
31 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
13 changes: 3 additions & 10 deletions
13
tests/ui/generic-associated-types/issue-90014-tait2.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,12 +1,5 @@ | ||
error: | ||
--> $DIR/issue-90014-tait2.rs:44:27 | ||
| | ||
LL | fn make_fut(&self) -> Box<dyn for<'a> Trait<'a, Thing = Fut<'a>>> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^query stack during panic: | ||
#0 [typeck] type-checking `<impl at $DIR/issue-90014-tait2.rs:43:1: 43:13>::make_fut` | ||
#1 [type_of] computing type of `Fut::{opaque#0}` | ||
#2 [check_mod_item_types] checking item types in top-level module | ||
#3 [analysis] running analysis passes on this crate | ||
end of query stack | ||
error[E0792]: expected generic lifetime parameter, found `'a` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0792`. |
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,9 @@ | ||
#![feature(type_alias_impl_trait)] | ||
|
||
type Opaque<'a> = impl Sized + 'a; | ||
|
||
fn test(f: fn(u8)) -> fn(Opaque<'_>) { | ||
f //~ ERROR E0792 | ||
} | ||
|
||
fn main() {} |
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/under-binder.rs:6:5 | ||
| | ||
LL | type Opaque<'a> = impl Sized + 'a; | ||
| -- this generic parameter must be used with a generic lifetime parameter | ||
... | ||
LL | f | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0792`. |