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