rust/tests/ui/traits/non_lifetime_binders/on-dyn.rs

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

14 lines
318 B
Rust
Raw Normal View History

// Tests to make sure that we reject polymorphic dyn trait.
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete
trait Test<T> {}
fn foo() -> &'static dyn for<T> Test<T> {
//~^ ERROR late-bound type parameter not allowed on trait object types
todo!()
}
fn main() {}