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.
Rollup merge of rust-lang#116379 - fmease:opaq-hid-inf-bnds-non-lt-bndrs, r=compiler-errors non_lifetime_binders: fix ICE in lint opaque-hidden-inferred-bound Opaque types like `impl for<T> Trait<T>` would previously lead to an ICE. r? `@compiler-errors`
- Loading branch information
Showing
3 changed files
with
30 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// check-pass | ||
|
||
#![feature(non_lifetime_binders)] | ||
//~^ WARN the feature `non_lifetime_binders` is incomplete | ||
|
||
trait Trait<T: ?Sized> {} | ||
|
||
impl<T: ?Sized> Trait<T> for i32 {} | ||
|
||
fn produce() -> impl for<T> Trait<T> { | ||
16 | ||
} | ||
|
||
fn main() { | ||
let _ = produce(); | ||
} |
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 @@ | ||
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/on-rpit.rs:3:12 | ||
| | ||
LL | #![feature(non_lifetime_binders)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|