about summary refs log tree commit diff
path: root/tests/ui/self/arbitrary-self-opaque.rs
blob: b176a982e5fcc0936382e7f63dd0e7a3e901a695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(type_alias_impl_trait)]
struct Foo;

type Bar = impl Sized;

impl Foo {
    #[define_opaque(Bar)]
    fn foo(self: Bar) {}
    //~^ ERROR: invalid `self` parameter type: `Bar`
    //~| ERROR: item does not constrain
}

fn main() {}