diff options
| author | bors <bors@rust-lang.org> | 2025-08-06 23:23:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-06 23:23:26 +0000 |
| commit | 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd (patch) | |
| tree | 7404b3b99695ca9e1343e7ae067f38a3aae59a2a /compiler/rustc_passes/src | |
| parent | 7d82b83ed57d188ab3f2441a765a6419685a88a3 (diff) | |
| parent | d369a1fe5e7fbf17cc3ed74057928b875fe40ce7 (diff) | |
| download | rust-6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd.tar.gz rust-6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd.zip | |
Auto merge of #145020 - GuillaumeGomez:rollup-5prs9kw, r=GuillaumeGomez
Rollup of 15 pull requests Successful merges: - rust-lang/rust#144195 (Parser: Recover from attributes applied to types and generic args) - rust-lang/rust#144794 (Port `#[coroutine]` to the new attribute system) - rust-lang/rust#144835 (Anonymize binders in tail call sig) - rust-lang/rust#144861 (Stabilize `panic_payload_as_str` feature) - rust-lang/rust#144917 (Enforce tail call type is related to body return type in borrowck) - rust-lang/rust#144948 (we only merge candidates for trait and normalizes-to goals) - rust-lang/rust#144956 (Gate const trait syntax) - rust-lang/rust#144970 (rustdoc: fix caching of intra-doc links on reexports) - rust-lang/rust#144972 (add code example showing that file_prefix treats dotfiles as the name of a file, not an extension) - rust-lang/rust#144975 (`File::set_times`: Update documentation and example to support setting timestamps on directories) - rust-lang/rust#144977 (Fortify generic param default checks) - rust-lang/rust#144996 (simplifycfg: Mark as changed when start is modified in collapse goto chain) - rust-lang/rust#144998 (mir: Do not modify NonUse in `super_projection_elem`) - rust-lang/rust#145000 (Remove unneeded `stage` parameter when setting up stdlib Cargo) - rust-lang/rust#145008 (Fix rustdoc scrape examples crash) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 2663d5fe99c..890028d977d 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -324,6 +324,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> { &Attribute::Parsed(AttributeKind::Coverage(attr_span, _)) => { self.check_coverage(attr_span, span, target) } + &Attribute::Parsed(AttributeKind::Coroutine(attr_span)) => { + self.check_coroutine(attr_span, target) + } Attribute::Unparsed(attr_item) => { style = Some(attr_item.style); match attr.path().as_slice() { @@ -390,9 +393,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { [sym::autodiff_forward, ..] | [sym::autodiff_reverse, ..] => { self.check_autodiff(hir_id, attr, span, target) } - [sym::coroutine, ..] => { - self.check_coroutine(attr, target); - } [sym::linkage, ..] => self.check_linkage(attr, span, target), [ // ok @@ -2651,11 +2651,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> { } } - fn check_coroutine(&self, attr: &Attribute, target: Target) { + fn check_coroutine(&self, attr_span: Span, target: Target) { match target { Target::Closure => return, _ => { - self.dcx().emit_err(errors::CoroutineOnNonClosure { span: attr.span() }); + self.dcx().emit_err(errors::CoroutineOnNonClosure { span: attr_span }); } } } |
