Skip to content

Commit 7731802

Browse files
committedJun 26, 2024
Auto merge of #126979 - matthiaskrgr:rollup-fdqledz, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #126724 (Fix a span in `parse_ty_bare_fn`.) - #126812 (Rename `tcx` to `cx` in new solver generic code) - #126879 (fix Drop items getting leaked in Filter::next_chunk) - #126925 (Change E0369 to give note informations for foreign items.) - #126938 (miri: make sure we can find link_section statics even for the local crate) - #126954 (resolve: Tweak some naming around import ambiguities) - #126964 (Migrate `lto-empty`, `invalid-so` and `issue-20626` `run-make` tests to rmake.rs) - #126968 (Don't ICE during RPITIT refinement checking for resolution errors after normalization) - #126971 (Bump black, ruff and platformdirs) - #126973 (Fix bad replacement for unsafe extern block suggestion) r? `@ghost` `@rustbot` modify labels: rollup
2 parents a299aa5 + b272086 commit 7731802

File tree

62 files changed

+904
-605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+904
-605
lines changed
 

‎compiler/rustc_ast/src/ast.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,8 @@ pub struct BareFnTy {
21262126
pub ext: Extern,
21272127
pub generic_params: ThinVec<GenericParam>,
21282128
pub decl: P<FnDecl>,
2129-
/// Span of the `fn(...) -> ...` part.
2129+
/// Span of the `[unsafe] [extern] fn(...) -> ...` part, i.e. everything
2130+
/// after the generic params (if there are any, e.g. `for<'a>`).
21302131
pub decl_span: Span,
21312132
}
21322133

‎compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ impl<'a> AstValidator<'a> {
464464
{
465465
self.dcx().emit_err(errors::InvalidSafetyOnExtern {
466466
item_span: span,
467-
block: self.current_extern_span(),
467+
block: self.current_extern_span().shrink_to_lo(),
468468
});
469469
}
470470
}

0 commit comments

Comments
 (0)
Please sign in to comment.