add ui test for #64430

This commit is contained in:
12101111 2019-09-14 03:13:51 +08:00
parent 57e82878c0
commit b98a844cf3
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,14 @@
// compile-flags:-C panic=abort
#![no_std]
pub struct Foo;
fn main() {
Foo.bar()
//~^ ERROR E0599
}
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop{}
}

View file

@ -0,0 +1,12 @@
error[E0599]: no method named `bar` found for type `Foo` in the current scope
--> $DIR/issue-64430.rs:7:9
|
LL | pub struct Foo;
| --------------- method `bar` not found for this
...
LL | Foo.bar()
| ^^^ method not found in `Foo`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.