rust/tests/ui/self/arbitrary-self-opaque.rs
Oli Scherer cdcca7e8f4 Switch can_eq and can_sub to DefineOpaqueTypes::Yes
They are mostly used in diagnostics anyway
2024-04-04 14:25:45 +00:00

13 lines
212 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
}
fn main() {}