rust/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs

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

17 lines
340 B
Rust
Raw Normal View History

// Weak aliases might not cover type parameters.
//@ aux-crate:foreign=parametrized-trait.rs
//@ edition:2021
#![feature(lazy_type_alias)]
#![allow(incomplete_features)]
type Identity<T> = T;
struct Local;
impl<T> foreign::Trait1<Local, T> for Identity<T> {}
//~^ ERROR type parameter `T` must be covered by another type
fn main() {}