Panic when checking an unknown stability attribute

This commit is contained in:
Maybe Waffle 2022-07-31 16:02:45 +04:00
parent 1e1d6fe84d
commit e11b4b8e02

View File

@ -428,9 +428,11 @@ fn find_stability_generic<'a, I>(
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, _, _) => {