Skip to content

Commit e11b4b8

Browse files
committed
Panic when checking an unknown stability attribute
1 parent 1e1d6fe commit e11b4b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_attr/src/builtin.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,11 @@ where
428428
ConstStability { level, feature, promotable: false },
429429
attr.span,
430430
));
431-
} else {
431+
} else if sym::rustc_default_body_unstable == meta_name {
432432
body_stab =
433433
Some((DefaultBodyStability { level, feature }, attr.span));
434+
} else {
435+
unreachable!("Unknown stability attribute {meta_name}");
434436
}
435437
}
436438
(None, _, _) => {

0 commit comments

Comments
 (0)