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