about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-02 15:31:06 +0000
committerbors <bors@rust-lang.org>2022-10-02 15:31:06 +0000
commit39323a5877ee6b85e75c652c2518a97a1433a2dc (patch)
tree27348d8ceb2103ee0e7332e0385233435ad1ff7f /src/tools
parent91931ec2fcb67a8e61080a97345c828a875c86ec (diff)
parent0b2596723bade820e3d5ba58d3e142dedeff566d (diff)
downloadrust-39323a5877ee6b85e75c652c2518a97a1433a2dc.tar.gz
rust-39323a5877ee6b85e75c652c2518a97a1433a2dc.zip
Auto merge of #102586 - Dylan-DPC:rollup-g107h6z, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #100451 (Do not panic when a test function returns Result::Err.)
 - #102098 (Use fetch_update in sync::Weak::upgrade)
 - #102538 (Give `def_span` the same SyntaxContext as `span_with_body`.)
 - #102556 (Make `feature(const_btree_len)` implied by `feature(const_btree_new)`)
 - #102566 (Add a known-bug test for #102498)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/compiletest/src/main.rs5
-rw-r--r--src/tools/tidy/src/features.rs4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index dccfd4e0d98..b48395035d4 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -797,7 +797,10 @@ fn make_test_closure(
     let config = config.clone();
     let testpaths = testpaths.clone();
     let revision = revision.cloned();
-    test::DynTestFn(Box::new(move || runtest::run(config, &testpaths, revision.as_deref())))
+    test::DynTestFn(Box::new(move || {
+        runtest::run(config, &testpaths, revision.as_deref());
+        Ok(())
+    }))
 }
 
 /// Returns `true` if the given target is an Android target for the
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 28a0700a64b..d8b3903b98e 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -538,7 +538,9 @@ fn map_lib_features(
                 becoming_feature = None;
                 if line.contains("rustc_const_unstable(") {
                     // `const fn` features are handled specially.
-                    let feature_name = match find_attr_val(line, "feature") {
+                    let feature_name = match find_attr_val(line, "feature").or_else(|| {
+                        iter_lines.peek().and_then(|next| find_attr_val(next.1, "feature"))
+                    }) {
                         Some(name) => name,
                         None => err!("malformed stability attribute: missing `feature` key"),
                     };