add ui test for #64430
This commit is contained in:
parent
57e82878c0
commit
b98a844cf3
2 changed files with 26 additions and 0 deletions
14
src/test/ui/issues/issue-64430.rs
Normal file
14
src/test/ui/issues/issue-64430.rs
Normal 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{}
|
||||
}
|
12
src/test/ui/issues/issue-64430.stderr
Normal file
12
src/test/ui/issues/issue-64430.stderr
Normal 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`.
|
Loading…
Reference in a new issue