mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 03:27:44 +00:00
14 lines
243 B
Rust
14 lines
243 B
Rust
#![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() {}
|