blob: 8e93c538217bbd2e4ec90cabd41e0b03d192fbc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Check that while a trait with by-value self is object-safe, we
// can't actually invoke it from an object (yet...?).
#![feature(rustc_attrs)]
trait Bar {
fn bar(self);
}
trait Baz {
fn baz(self: Self);
}
fn use_bar(t: Box<dyn Bar>) {
t.bar() //~ ERROR cannot move a value of type `dyn Bar`
}
fn main() { }
|