Skip to content

Commit f606127

Browse files
committed
make tidy accept multi-line rustc_const_unstable attributes
1 parent de341fe commit f606127

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/tidy/src/features.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ fn map_lib_features(
538538
becoming_feature = None;
539539
if line.contains("rustc_const_unstable(") {
540540
// `const fn` features are handled specially.
541-
let feature_name = match find_attr_val(line, "feature") {
541+
let feature_name = match find_attr_val(line, "feature").or_else(|| {
542+
iter_lines.peek().and_then(|next| find_attr_val(next.1, "feature"))
543+
}) {
542544
Some(name) => name,
543545
None => err!("malformed stability attribute: missing `feature` key"),
544546
};

0 commit comments

Comments
 (0)