diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-04-05 13:18:17 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 13:18:17 +1100 |
| commit | 66ccc4fe28785e4e7d6f3b59eadbffd5296f8ad7 (patch) | |
| tree | ab8653e1f67995ce243188f582e73f9a4dce06cf /compiler/rustc_ast_lowering | |
| parent | 6907e011e452751b687b17dfd7178e02b62f5707 (diff) | |
| parent | b9e13cb539c23a320e3856eba82711cd6360407e (diff) | |
| download | rust-66ccc4fe28785e4e7d6f3b59eadbffd5296f8ad7.tar.gz rust-66ccc4fe28785e4e7d6f3b59eadbffd5296f8ad7.zip | |
Rollup merge of #139341 - nnethercote:fix-137874, r=petrochenkov
Apply `Recovery::Forbidden` when reparsing pasted macro fragments. Fixes #137874. The changes to the output of `tests/ui/associated-consts/issue-93835.rs` partly undo the changes seen when `NtTy` was removed in #133436, which is good. r? ``@petrochenkov``
Diffstat (limited to 'compiler/rustc_ast_lowering')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index 28f596ac092..958a6917dff 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -676,12 +676,9 @@ impl<'hir> LoweringContext<'_, 'hir> { let ty = self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::StaticTy)); let safety = self.lower_safety(*safety, hir::Safety::Unsafe); - - // njn: where for this? if define_opaque.is_some() { self.dcx().span_err(i.span, "foreign statics cannot define opaque types"); } - (ident, hir::ForeignItemKind::Static(ty, *mutability, safety)) } ForeignItemKind::TyAlias(box TyAlias { ident, .. }) => { |
