diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-14 16:42:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-14 16:42:42 +0200 |
| commit | 1c7959bb5d8d780e84eef29db9ae32b4d4b4b3d2 (patch) | |
| tree | 02f2665ed12dcf87a18bf431eee4d8ae31a90adc /src/test/ui | |
| parent | bf1253b347d26cc930f769f2e61205075a953b3c (diff) | |
| parent | e484f213eebd2a61870eb25a6cee0992eab6275c (diff) | |
| download | rust-1c7959bb5d8d780e84eef29db9ae32b4d4b4b3d2.tar.gz rust-1c7959bb5d8d780e84eef29db9ae32b4d4b4b3d2.zip | |
Rollup merge of #64439 - 12101111:fix-owned-box, r=Centril
fix #64430, confusing `owned_box` error message in no_std build Fixes #64430
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/issues/issue-64430.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-64430.stderr | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-64430.rs b/src/test/ui/issues/issue-64430.rs new file mode 100644 index 00000000000..0bc66e06e67 --- /dev/null +++ b/src/test/ui/issues/issue-64430.rs @@ -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{} +} diff --git a/src/test/ui/issues/issue-64430.stderr b/src/test/ui/issues/issue-64430.stderr new file mode 100644 index 00000000000..f1b2de8d8b3 --- /dev/null +++ b/src/test/ui/issues/issue-64430.stderr @@ -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`. |
