Rollup merge of #64439 - 12101111:fix-owned-box, r=Centril

fix #64430, confusing `owned_box` error message in no_std build

Fixes #64430
This commit is contained in:
Mazdak Farrokhzad 2019-09-14 16:42:42 +02:00 committed by GitHub
commit 1c7959bb5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 26 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`.