about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-20 18:21:01 +0000
committerbors <bors@rust-lang.org>2024-06-20 18:21:01 +0000
commit433355166d769afc9c19f761cc7efc4d152e9a2c (patch)
tree2412ee497bc589da0ba13b9f3ccc3ec166d745bb /compiler
parentcb8a7ea0ed866295e0f65725cea6662bea51971a (diff)
parent7b5ed5a66c7e1ec0d2d8ba3657a4048ceea36988 (diff)
downloadrust-433355166d769afc9c19f761cc7efc4d152e9a2c.tar.gz
rust-433355166d769afc9c19f761cc7efc4d152e9a2c.zip
Auto merge of #126745 - matthiaskrgr:rollup-xagplef, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #126095 (Migrate `link-args-order`, `ls-metadata` and `lto-readonly-lib` `run-make` tests to `rmake`)
 - #126629 (Migrate `run-make/compressed-debuginfo` to `rmake.rs`)
 - #126644 (Rewrite `extern-flag-rename-transitive`. `debugger-visualizer-dep-info`, `metadata-flag-frobs-symbols`, `extern-overrides-distribution` and `forced-unwind-terminate-pof` `run-make` tests to rmake)
 - #126735 (collect attrs in const block expr)
 - #126737 (Remove `feature(const_closures)` from libcore)
 - #126740 (add `needs-unwind` to UI test)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_resolve/src/def_collector.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/def_collector.rs b/compiler/rustc_resolve/src/def_collector.rs
index fb6e55f2b7b..60789c08313 100644
--- a/compiler/rustc_resolve/src/def_collector.rs
+++ b/compiler/rustc_resolve/src/def_collector.rs
@@ -343,6 +343,9 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> {
                 self.create_def(expr.id, kw::Empty, DefKind::Closure, expr.span)
             }
             ExprKind::ConstBlock(ref constant) => {
+                for attr in &expr.attrs {
+                    visit::walk_attribute(self, attr);
+                }
                 let def = self.create_def(
                     constant.id,
                     kw::Empty,