about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-27 07:01:32 +0200
committerGitHub <noreply@github.com>2023-06-27 07:01:32 +0200
commita144272eeef54da3dbc667e73d2f0ea0c68e25fb (patch)
treedc53f4d63aa8cbcd4af4eeab4d2da6cbe383fb65 /compiler
parentb9ad9b78a2b67d59f19adf3fd06ecf2682ce56a0 (diff)
parentc6e6ceb078f57519bf246eba791dc20aa007948a (diff)
downloadrust-a144272eeef54da3dbc667e73d2f0ea0c68e25fb.tar.gz
rust-a144272eeef54da3dbc667e73d2f0ea0c68e25fb.zip
Rollup merge of #113039 - matthiaskrgr:custom_mir, r=compiler-errors
make custom mir ICE a bit nicer
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_mir_build/src/build/custom/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/build/custom/mod.rs b/compiler/rustc_mir_build/src/build/custom/mod.rs
index 32c618828c9..e5c2cc6c7bb 100644
--- a/compiler/rustc_mir_build/src/build/custom/mod.rs
+++ b/compiler/rustc_mir_build/src/build/custom/mod.rs
@@ -118,7 +118,11 @@ fn parse_attribute(attr: &Attribute) -> MirPhase {
                 phase = Some(value);
             }
             other => {
-                panic!("Unexpected key {}", other);
+                span_bug!(
+                    nested.span(),
+                    "Unexpected key while parsing custom_mir attribute: '{}'",
+                    other
+                );
             }
         }
     }