2020-02-22 01:16:39 -06:00
|
|
|
impl dyn A {
|
2017-04-13 14:37:05 -05:00
|
|
|
Y
|
2020-02-22 01:16:39 -06:00
|
|
|
} //~ ERROR expected one of `!` or `::`, found `}`
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2017-03-25 01:00:21 -05:00
|
|
|
struct S;
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
trait X {
|
|
|
|
X() {} //~ ERROR expected one of `!` or `::`, found `(`
|
2019-10-25 20:30:02 -05:00
|
|
|
fn xxx() { ### }
|
|
|
|
L = M;
|
|
|
|
Z = { 2 + 3 };
|
|
|
|
::Y ();
|
|
|
|
}
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
trait A {
|
|
|
|
X() {} //~ ERROR expected one of `!` or `::`, found `(`
|
2019-10-25 20:30:02 -05:00
|
|
|
}
|
|
|
|
trait B {
|
|
|
|
fn xxx() { ### } //~ ERROR expected
|
|
|
|
}
|
2020-02-22 01:16:39 -06:00
|
|
|
trait C {
|
|
|
|
L = M; //~ ERROR expected one of `!` or `::`, found `=`
|
2019-10-25 20:30:02 -05:00
|
|
|
}
|
2020-02-22 01:16:39 -06:00
|
|
|
trait D {
|
|
|
|
Z = { 2 + 3 }; //~ ERROR expected one of `!` or `::`, found `=`
|
2019-10-25 20:30:02 -05:00
|
|
|
}
|
|
|
|
trait E {
|
2017-11-20 06:13:27 -06:00
|
|
|
::Y (); //~ ERROR expected one of
|
2017-04-13 14:37:05 -05:00
|
|
|
}
|
|
|
|
|
2017-03-25 01:00:21 -05:00
|
|
|
impl S {
|
2017-11-20 06:13:27 -06:00
|
|
|
pub hello_method(&self) { //~ ERROR missing
|
2017-03-25 01:00:21 -05:00
|
|
|
println!("Hello");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2020-01-08 10:05:31 -06:00
|
|
|
S.hello_method(); //~ no method named `hello_method` found
|
2017-03-25 01:00:21 -05:00
|
|
|
}
|