diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /tests/ui/rmeta | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rmeta')
-rw-r--r-- | tests/ui/rmeta/auxiliary/rmeta-meta.rs | 4 | ||||
-rw-r--r-- | tests/ui/rmeta/no_optitimized_mir.rs | 11 | ||||
-rw-r--r-- | tests/ui/rmeta/no_optitimized_mir.stderr | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/rmeta/auxiliary/rmeta-meta.rs b/tests/ui/rmeta/auxiliary/rmeta-meta.rs index 6d8ed95bd..6d4350495 100644 --- a/tests/ui/rmeta/auxiliary/rmeta-meta.rs +++ b/tests/ui/rmeta/auxiliary/rmeta-meta.rs @@ -6,3 +6,7 @@ pub struct Foo { pub field: i32, } + +pub fn missing_optimized_mir() { + println!("indeed"); +} diff --git a/tests/ui/rmeta/no_optitimized_mir.rs b/tests/ui/rmeta/no_optitimized_mir.rs new file mode 100644 index 000000000..c503005f1 --- /dev/null +++ b/tests/ui/rmeta/no_optitimized_mir.rs @@ -0,0 +1,11 @@ +// aux-build:rmeta-meta.rs +// no-prefer-dynamic +// build-fail + +// Check that we do not ICE when we need optimized MIR but it is missing. + +extern crate rmeta_meta; + +fn main() { + rmeta_meta::missing_optimized_mir(); +} diff --git a/tests/ui/rmeta/no_optitimized_mir.stderr b/tests/ui/rmeta/no_optitimized_mir.stderr new file mode 100644 index 000000000..a17024c53 --- /dev/null +++ b/tests/ui/rmeta/no_optitimized_mir.stderr @@ -0,0 +1,10 @@ +error: missing optimized MIR for an item in the crate `rmeta_meta` + | +note: missing optimized MIR for this item (was the crate `rmeta_meta` compiled with `--emit=metadata`?) + --> $DIR/auxiliary/rmeta-meta.rs:10:1 + | +LL | pub fn missing_optimized_mir() { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + |