From e5a3ddff86931b27c2e300501e9853fc56729742 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Thu, 9 Jul 2026 17:31:27 +0000 Subject: [PATCH 1/3] fuchsia: Ensure all existing ported sanitizers for Fuchsia are supported --- .../rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs | 1 + .../src/spec/targets/riscv64gc_unknown_fuchsia.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs index 6489e2bda8091..d16110cfd66f9 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs @@ -10,6 +10,7 @@ pub(crate) fn target() -> Target { base.stack_probes = StackProbeType::Inline; base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI + | SanitizerSet::HWADDRESS | SanitizerSet::LEAK | SanitizerSet::SHADOWCALLSTACK; base.default_sanitizers = SanitizerSet::SHADOWCALLSTACK; diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs index 8f6bbe4f641d9..fecac5fd84a38 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs @@ -10,7 +10,10 @@ pub(crate) fn target() -> Target { base.llvm_abiname = LlvmAbi::Lp64d; base.max_atomic_width = Some(64); base.stack_probes = StackProbeType::Inline; - base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::SHADOWCALLSTACK; + base.supported_sanitizers = SanitizerSet::ADDRESS + | SanitizerSet::CFI + | SanitizerSet::LEAK + | SanitizerSet::SHADOWCALLSTACK; base.default_sanitizers = SanitizerSet::SHADOWCALLSTACK; base.supports_xray = true; From 7c8a29ef9d6e2175e57cf17eab698304dc547235 Mon Sep 17 00:00:00 2001 From: LorrensP-2158466 Date: Wed, 15 Jul 2026 16:48:24 +0200 Subject: [PATCH 2/3] extract `use_injections` to be created by `LateResolverVisitor` and used by `report_errors` --- .../rustc_resolve/src/diagnostics/impls.rs | 8 ++++---- compiler/rustc_resolve/src/late.rs | 19 ++++++++++++++----- compiler/rustc_resolve/src/lib.rs | 8 ++++---- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_resolve/src/diagnostics/impls.rs b/compiler/rustc_resolve/src/diagnostics/impls.rs index b6d278c26e61d..34274b83af7a1 100644 --- a/compiler/rustc_resolve/src/diagnostics/impls.rs +++ b/compiler/rustc_resolve/src/diagnostics/impls.rs @@ -334,9 +334,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { self.tcx.dcx() } - pub(crate) fn report_errors(&mut self, krate: &Crate) { + pub(crate) fn report_errors(&mut self, krate: &Crate, use_injections: Vec>) { self.report_delayed_vis_resolution_errors(); - self.report_with_use_injections(krate); + self.report_with_use_injections(krate, use_injections); for &(span_use, span_def) in &self.macro_expanded_macro_export_errors { self.lint_buffer.buffer_lint( @@ -390,9 +390,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } } - fn report_with_use_injections(&mut self, krate: &Crate) { + fn report_with_use_injections(&mut self, krate: &Crate, use_injections: Vec>) { for UseError { mut err, candidates, node_id, instead, suggestion, path, is_call } in - mem::take(&mut self.use_injections) + use_injections { let (span, found_use) = if node_id != DUMMY_NODE_ID { UsePlacementFinder::check(krate, node_id) diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 5cc8d5af4655a..dfb65e6b0398e 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -849,6 +849,9 @@ struct LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { /// Count the number of places a lifetime is used. lifetime_uses: FxHashMap, + + /// `use` injections are delayed for better placement and deduplication. + use_injections: Vec>, } impl<'ra, 'tcx> AsRef> for LateResolutionVisitor<'_, '_, 'ra, 'tcx> { @@ -1544,6 +1547,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { // errors at module scope should always be reported in_func_body: false, lifetime_uses: Default::default(), + use_injections: Vec::new(), } } @@ -4624,7 +4628,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { is_call: source.is_call(), }; - this.r.use_injections.push(ue); + this.use_injections.push(ue); } PartialRes::new(Res::Err) @@ -4728,7 +4732,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { } } else { // If there are suggested imports, the error reporting is delayed - this.r.use_injections.push(UseError { + this.use_injections.push(UseError { err, candidates, node_id, @@ -5701,7 +5705,10 @@ impl<'ast> Visitor<'ast> for ItemInfoCollector<'_, 'ast, '_, '_> { impl<'ra, 'tcx> Resolver<'ra, 'tcx> { /// Returns the `use` and `extern crate` items of the crate, for use by `check_unused`. - pub(crate) fn late_resolve_crate<'ast>(&mut self, krate: &'ast Crate) -> Vec<&'ast Item> { + pub(crate) fn late_resolve_crate<'ast>( + &mut self, + krate: &'ast Crate, + ) -> (Vec<&'ast Item>, Vec>) { with_owner(self, CRATE_NODE_ID, |this| { let mut info_collector = ItemInfoCollector { r: this, use_items: Vec::new() }; visit::walk_crate(&mut info_collector, krate); @@ -5710,7 +5717,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { late_resolution_visitor .resolve_doc_links(&krate.attrs, MaybeExported::Ok(CRATE_NODE_ID)); visit::walk_crate(&mut late_resolution_visitor, krate); - for (id, span) in late_resolution_visitor.diag_metadata.unused_labels.iter() { + let LateResolutionVisitor { use_injections, diag_metadata, .. } = + late_resolution_visitor; + for (id, span) in diag_metadata.unused_labels.iter() { this.lint_buffer.buffer_lint( lint::builtin::UNUSED_LABELS, *id, @@ -5718,7 +5727,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { crate::diagnostics::UnusedLabel, ); } - use_items + (use_items, use_injections) }) } } diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 13576c24e6c08..18de1a233fb6d 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -1381,8 +1381,6 @@ pub struct Resolver<'ra, 'tcx> { /// Ambiguity errors are delayed for deduplication. ambiguity_errors: Vec> = Vec::new(), issue_145575_hack_applied: bool = false, - /// `use` injections are delayed for better placement and deduplication. - use_injections: Vec> = Vec::new(), /// Visibility path resolution failures are delayed until all modules are collected. delayed_vis_resolution_errors: Vec> = Vec::new(), /// Crate-local macro expanded `macro_export` referred to by a module-relative path. @@ -2051,11 +2049,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { self.tcx .sess .time("finalize_macro_resolutions", || self.finalize_macro_resolutions(krate)); - let use_items = + let (use_items, use_injections) = self.tcx.sess.time("late_resolve_crate", || self.late_resolve_crate(krate)); self.tcx.sess.time("resolve_main", || self.resolve_main()); self.tcx.sess.time("resolve_check_unused", || self.check_unused(use_items)); - self.tcx.sess.time("resolve_report_errors", || self.report_errors(krate)); + self.tcx + .sess + .time("resolve_report_errors", || self.report_errors(krate, use_injections)); self.tcx .sess .time("resolve_postprocess", || self.cstore_mut().postprocess(self.tcx, krate)); From 26bc4c94ebc316e319d5c149d93dab896b80eeb5 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Wed, 15 Jul 2026 17:55:32 +0200 Subject: [PATCH 3/3] renovate: group github actions updates --- .github/renovate.json5 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 929334c561389..e060dfd3b638b 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,15 +1,13 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended", + // Use https://github.com/rust-lang/renovate/blob/main/actions.json + "github>rust-lang/renovate:actions", // Open a PR to migrate the config when Renovate deprecates syntax ":configMigration", // Refresh lock files on the first day of each month // (still gated by dashboard approval for now) ":maintainLockFilesMonthly", - // Pin GitHub Actions to their commit SHA digests, resolving floating tags - // (e.g. `v4`) to the full SemVer version (e.g. `v4.1.2`) - "helpers:pinGitHubActionDigestsToSemver" ], // Require manual approval from the Dependency Dashboard before opening PRs "dependencyDashboardApproval": true,