forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#115353 - Enselic:no-optimized-mir, r=oli-obk
Emit error instead of ICE when optimized MIR is missing Closes rust-lang#51388
- Loading branch information
Showing
6 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ | |
pub struct Foo { | ||
pub field: i32, | ||
} | ||
|
||
pub fn missing_optimized_mir() { | ||
println!("indeed"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|