about summary refs log tree commit diff
path: root/tests/crashes
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-11-12 06:27:17 +0100
committerGitHub <noreply@github.com>2024-11-12 06:27:17 +0100
commitb7dc4813a8ea9debafd7bc86bda3baafe6646f93 (patch)
treebd2d761c689d84e3b2f938d44891676e9a4ae0d5 /tests/crashes
parent2ad4a3568d9932bc4ecba48142a1f400c6c260aa (diff)
parent1d6e8476746d79d21bde97243c30937738750227 (diff)
downloadrust-b7dc4813a8ea9debafd7bc86bda3baafe6646f93.tar.gz
rust-b7dc4813a8ea9debafd7bc86bda3baafe6646f93.zip
Rollup merge of #132653 - BoxyUwU:const_arg_stmt_mac_call, r=compiler-errors
Don't use `maybe_unwrap_block` when checking for macro calls in a block expr

Fixes #131915

Using `maybe_unwrap_block` to determine if we are looking at a `{ mac_call!{} }` will fail sometimes as `mac_call!{}` could be a `StmtKind::MacCall` not a `StmtKind::Expr`. This caused the def collector to think that `{ mac_call!{} }` was a non-trivial const argument and create a definition for it even though it should not.

r? `@compiler-errors`  cc `@camelid`
Diffstat (limited to 'tests/crashes')
-rw-r--r--tests/crashes/131915.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/crashes/131915.rs b/tests/crashes/131915.rs
deleted file mode 100644
index 58d45adcb3b..00000000000
--- a/tests/crashes/131915.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ known-bug: #131915
-
-macro_rules! y {
-    ( $($matcher:tt)*) => {
-        x
-    };
-}
-
-const _: A<
-    {
-        y! { test.tou8 }
-    },
->;