File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed
tests/ui/traits/non_lifetime_binders Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/drop-impl-pred.rs:6:12
3+ |
4+ LL | #![feature(non_lifetime_binders)]
5+ | ^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
8+ = note: `#[warn(incomplete_features)]` on by default
9+
10+ error[E0367]: `Drop` impl requires `H: Foo` but the struct it is implemented for does not
11+ --> $DIR/drop-impl-pred.rs:19:15
12+ |
13+ LL | for<H> H: Foo,
14+ | ^^^
15+ |
16+ note: the implementor must specify the same requirement
17+ --> $DIR/drop-impl-pred.rs:12:1
18+ |
19+ LL | struct Bar<T>(T) where T: Foo;
20+ | ^^^^^^^^^^^^^
21+
22+ error: aborting due to previous error; 1 warning emitted
23+
24+ For more information about this error, try `rustc --explain E0367`.
Original file line number Diff line number Diff line change 1+ // revisions: no yes
2+ //[yes] check-pass
3+
4+ // Issue 110557
5+
6+ #![ feature( non_lifetime_binders) ]
7+ //~^ WARN the feature `non_lifetime_binders` is incomplete
8+
9+ pub trait Foo { }
10+
11+ #[ cfg( no) ]
12+ struct Bar < T > ( T ) where T : Foo ;
13+
14+ #[ cfg( yes) ]
15+ struct Bar < T > ( T ) where for < H > H : Foo ;
16+
17+ impl < T > Drop for Bar < T >
18+ where
19+ for < H > H : Foo ,
20+ //[no]~^ ERROR `Drop` impl requires `H: Foo` but the struct it is implemented for does not
21+ {
22+ fn drop ( & mut self ) { }
23+ }
24+
25+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/drop-impl-pred.rs:6:12
3+ |
4+ LL | #![feature(non_lifetime_binders)]
5+ | ^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
8+ = note: `#[warn(incomplete_features)]` on by default
9+
10+ warning: 1 warning emitted
11+
You can’t perform that action at this time.
0 commit comments