about summary refs log tree commit diff
path: root/tests/ui/traits/non_lifetime_binders/shadowed.rs
blob: 1c480e3940b89f5ccffec60122e3e3b8c8b4438d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

fn function<T>() where for<T> (): Sized {}
//~^ ERROR the name `T` is already used for a generic parameter

struct Struct<T>(T) where for<T> (): Sized;
//~^ ERROR the name `T` is already used for a generic parameter

impl<T> Struct<T> {
    fn method() where for<T> (): Sized {}
    //~^ ERROR the name `T` is already used for a generic parameter
}

fn repeated() where for<T, T> (): Sized {}
//~^ ERROR the name `T` is already used for a generic parameter

fn main() {}