mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
14 lines
254 B
Rust
14 lines
254 B
Rust
#![feature(type_alias_impl_trait)]
|
|
struct Foo;
|
|
|
|
type Bar = impl Sized;
|
|
//~^ ERROR unconstrained opaque type
|
|
|
|
impl Foo {
|
|
fn foo(self: Bar) {}
|
|
//~^ ERROR: invalid `self` parameter type: `Bar`
|
|
//~| ERROR: item does not constrain
|
|
}
|
|
|
|
fn main() {}
|