Skip to content

Commit b98a844

Browse files
committed
add ui test for #64430
1 parent 57e8287 commit b98a844

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/test/ui/issues/issue-64430.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// compile-flags:-C panic=abort
2+
3+
#![no_std]
4+
pub struct Foo;
5+
6+
fn main() {
7+
Foo.bar()
8+
//~^ ERROR E0599
9+
}
10+
11+
#[panic_handler]
12+
fn panic(_info: &core::panic::PanicInfo) -> ! {
13+
loop{}
14+
}

src/test/ui/issues/issue-64430.stderr

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

0 commit comments

Comments
 (0)