rust/tests/ui/traits/non_lifetime_binders/universe-error1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
331 B
Rust
Raw Normal View History

2023-05-04 23:57:50 -05:00
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete
trait Other<U: ?Sized> {}
impl<U: ?Sized> Other<U> for U {}
#[rustfmt::skip]
fn foo<U: ?Sized>()
where
for<T> T: Other<U> {}
fn bar() {
foo::<_>();
//~^ ERROR the trait bound `T: Other<_>` is not satisfied
}
fn main() {}