diff options
| author | bors <bors@rust-lang.org> | 2025-06-16 14:25:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-16 14:25:08 +0000 |
| commit | 3bc767e1a215c4bf8f099b32e84edb85780591b1 (patch) | |
| tree | 3da6113318c7c7b0fb401939b8888137c2c7388b /compiler/rustc_builtin_macros/src/test.rs | |
| parent | d9ca9bd014074e2bac567eaa2b66bfacb2591028 (diff) | |
| parent | 78d12b7e56ef5691d31b6f1697aba79eabe4bb2f (diff) | |
| download | rust-3bc767e1a215c4bf8f099b32e84edb85780591b1.tar.gz rust-3bc767e1a215c4bf8f099b32e84edb85780591b1.zip | |
Auto merge of #142574 - Kobzol:rollup-ldj386u, r=Kobzol
Rollup of 12 pull requests Successful merges: - rust-lang/rust#141639 (Expose discriminant values in stable_mir) - rust-lang/rust#142082 (Refactor `rustc_attr_data_structures` documentation) - rust-lang/rust#142125 (Stabilize "file_lock" feature) - rust-lang/rust#142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls) - rust-lang/rust#142373 (Fix Debug for Location) - rust-lang/rust#142416 (Assorted bootstrap cleanups (step 2)) - rust-lang/rust#142431 (Add initial version of snapshot tests to bootstrap) - rust-lang/rust#142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`) - rust-lang/rust#142528 (clarify `rustc_do_not_const_check` comment) - rust-lang/rust#142530 (use `if let` guards where possible) - rust-lang/rust#142561 (Remove an `njn:` comment accidentaly left behind.) - rust-lang/rust#142566 (Fix `-nopt` CI jobs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_builtin_macros/src/test.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/test.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index b439fa34f5b..b067578794b 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -118,10 +118,7 @@ pub(crate) fn expand_test_or_bench( let (item, is_stmt) = match item { Annotatable::Item(i) => (i, false), - Annotatable::Stmt(stmt) if matches!(stmt.kind, ast::StmtKind::Item(_)) => { - // FIXME: Use an 'if let' guard once they are implemented - if let ast::StmtKind::Item(i) = stmt.kind { (i, true) } else { unreachable!() } - } + Annotatable::Stmt(box ast::Stmt { kind: ast::StmtKind::Item(i), .. }) => (i, true), other => { not_testable_error(cx, attr_sp, None); return vec![other]; |
