mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
13 lines
280 B
Rust
13 lines
280 B
Rust
trait Trait {
|
|
fn baz(&self, _: Self) {}
|
|
fn bat(&self) -> Self {}
|
|
}
|
|
|
|
fn bar(x: &dyn Trait) {} //~ ERROR the trait `Trait` cannot be made into an object
|
|
|
|
trait Other: Sized {}
|
|
|
|
fn foo(x: &dyn Other) {} //~ ERROR the trait `Other` cannot be made into an object
|
|
|
|
fn main() {}
|