diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-07-31 16:02:45 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-07-31 16:02:45 +0400 |
| commit | e11b4b8e02495e9753df983de7bcec9ef2b8ae31 (patch) | |
| tree | 33a8501622525c776eb098f76e1e3fa65fe3b33f | |
| parent | 1e1d6fe84dd086a9075fcfe5fc63d81738c02f12 (diff) | |
| download | rust-e11b4b8e02495e9753df983de7bcec9ef2b8ae31.tar.gz rust-e11b4b8e02495e9753df983de7bcec9ef2b8ae31.zip | |
Panic when checking an unknown stability attribute
| -rw-r--r-- | compiler/rustc_attr/src/builtin.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index 2eb50d64802..62ccd734fe7 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -428,9 +428,11 @@ where ConstStability { level, feature, promotable: false }, attr.span, )); - } else { + } else if sym::rustc_default_body_unstable == meta_name { body_stab = Some((DefaultBodyStability { level, feature }, attr.span)); + } else { + unreachable!("Unknown stability attribute {meta_name}"); } } (None, _, _) => { |
