about summary refs log tree commit diff
path: root/tests/ui/coherence/orphan-check-weak-aliases-covering.rs
blob: a8b9e905c70b56526f17ce5c477df538b212b8d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Weak aliases cover type parameters if they normalize to a (local) type that covers them.

//@ check-pass
//@ revisions: classic next
//@[next] compile-flags: -Znext-solver

//@ aux-crate:foreign=parametrized-trait.rs
//@ edition:2021

#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

type Alias<T> = LocalWrapper<T>;

struct Local;
struct LocalWrapper<T>(T);

impl<T> foreign::Trait1<Local, T> for Alias<T> {}

fn main() {}