diff options
| author | bors <bors@rust-lang.org> | 2021-12-14 11:30:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-14 11:30:17 +0000 |
| commit | 404c8471aba60c2d837fa728e7c729a0f52d5830 (patch) | |
| tree | fea112a2f7f32d0c68df6fe15f0440bb49436ff4 /src/test | |
| parent | 83b32f27fc6c34b0b411f47be31ab4ae07eafed4 (diff) | |
| parent | 1dde0dbbf5ab3698240749f418b7270de5c31def (diff) | |
Auto merge of #91902 - matthiaskrgr:rollup-hjjyhow, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #91529 (add BinaryHeap::try_reserve and BinaryHeap::try_reserve_exact) - #91820 (Suggest to specify a target triple when lang item is missing) - #91851 (Make `MaybeUninit::zeroed` `const`) - #91875 (Use try_normalize_erasing_regions in RevealAllVisitor) - #91887 (Remove `in_band_lifetimes` from `rustc_const_eval`) - #91892 (Fix HashStable implementation on InferTy) - #91893 (Remove `in_band_lifetimes` from `rustc_hir`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/extern-flag/empty-extern-arg.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/mir/issue-91745.rs | 21 | ||||
| -rw-r--r-- | src/test/ui/missing/missing-alloc_error_handler.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/panic-handler/weak-lang-item.stderr | 3 | ||||
| -rw-r--r-- | src/test/ui/traits/vtable/issue-91807.rs | 17 |
5 files changed, 45 insertions, 1 deletions
diff --git a/src/test/ui/extern-flag/empty-extern-arg.stderr b/src/test/ui/extern-flag/empty-extern-arg.stderr index b0628a4f6dd..39a66c08de0 100644 --- a/src/test/ui/extern-flag/empty-extern-arg.stderr +++ b/src/test/ui/extern-flag/empty-extern-arg.stderr @@ -1,6 +1,9 @@ error: extern location for std does not exist: error: language item required, but not found: `eh_personality` + | + = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library + = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config` error: `#[panic_handler]` function required, but not found diff --git a/src/test/ui/mir/issue-91745.rs b/src/test/ui/mir/issue-91745.rs new file mode 100644 index 00000000000..ca3d66b1c8e --- /dev/null +++ b/src/test/ui/mir/issue-91745.rs @@ -0,0 +1,21 @@ +// check-pass + +pub trait Foo { + type Bar; +} + +pub trait Broken { + type Assoc; + fn broken(&self) where Self::Assoc: Foo; +} + +impl<T> Broken for T { + type Assoc = (); + fn broken(&self) where Self::Assoc: Foo { + let _x: <Self::Assoc as Foo>::Bar; + } +} + +fn main() { + let _m: &dyn Broken<Assoc=()> = &(); +} diff --git a/src/test/ui/missing/missing-alloc_error_handler.stderr b/src/test/ui/missing/missing-alloc_error_handler.stderr index ed84493deb5..995fa7cf85e 100644 --- a/src/test/ui/missing/missing-alloc_error_handler.stderr +++ b/src/test/ui/missing/missing-alloc_error_handler.stderr @@ -1,6 +1,6 @@ error: `#[alloc_error_handler]` function required, but not found -note: Use `#![feature(default_alloc_error_handler)]` for a default error handler +note: use `#![feature(default_alloc_error_handler)]` for a default error handler error: aborting due to previous error diff --git a/src/test/ui/panic-handler/weak-lang-item.stderr b/src/test/ui/panic-handler/weak-lang-item.stderr index 1f14b20e451..cc25f08e33a 100644 --- a/src/test/ui/panic-handler/weak-lang-item.stderr +++ b/src/test/ui/panic-handler/weak-lang-item.stderr @@ -11,6 +11,9 @@ LL | extern crate core as other_core; | error: language item required, but not found: `eh_personality` + | + = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library + = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config` error: `#[panic_handler]` function required, but not found diff --git a/src/test/ui/traits/vtable/issue-91807.rs b/src/test/ui/traits/vtable/issue-91807.rs new file mode 100644 index 00000000000..f435ff09dc3 --- /dev/null +++ b/src/test/ui/traits/vtable/issue-91807.rs @@ -0,0 +1,17 @@ +// check-pass +// incremental + +struct Struct<T>(T); + +impl<T> std::ops::Deref for Struct<T> { + type Target = dyn Fn(T); + fn deref(&self) -> &Self::Target { + unimplemented!() + } +} + +fn main() { + let f = Struct(Default::default()); + f(0); + f(0); +} |
