about summary refs log tree commit diff
path: root/tests/ui/lazy-type-alias/trailing-where-clause.rs
blob: ac9598fe5f6aa53513b2eb6813311ba8b7dc95aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

// Check that we allow & respect trailing where-clauses on lazy type aliases.

type Alias<T> = T
where
    String: From<T>;

fn main() {
    let _: Alias<&str>;
    let _: Alias<()>; //~ ERROR the trait bound `String: From<()>` is not satisfied
}