Skip to content

Rollup of 7 pull requests #144294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
00feedc
Add modern AVR mcus like avr128db28 and attiny3224
tomtor Jun 13, 2025
1323fd6
Add missing avr64* series
tomtor Jun 13, 2025
4e53043
populate the target_config now before its usage and update the test a…
Shourya742 Jul 18, 2025
a2586f0
tidy: running of eslint, tsc, and es-check are now an extra check
lolbinarycat Jun 23, 2025
4bd3b74
update CI to use new tidy extra checks for rustdoc js
lolbinarycat Jun 23, 2025
c8e2a65
tidy: use a lockfile for js tools instead of npx
lolbinarycat Jun 27, 2025
2ffa711
REUSE.toml: add new package.json and package-lock.json
lolbinarycat Jul 11, 2025
ca39010
update completions
lolbinarycat Jul 19, 2025
c6d50ea
integrate build_helper::npm into js checks and package.json usage
lolbinarycat Jul 19, 2025
258e410
Unquerify maybe_unused_trait_imports.
cjgillot Jul 3, 2025
725523e
tests: cover more `exported_private_dependencies` cases
mladedav Jul 16, 2025
fa92464
opt-dist: add an option for setting path to stage0 root
ognevny Jul 21, 2025
4ca5afd
add default_lld_opt_in_targets method and modified test accordingly
Shourya742 Jul 18, 2025
fb10084
add test_lld_opt_in test
Shourya742 Jul 21, 2025
b5d36e5
Dont ICE on copy error being suppressed due to overflow
compiler-errors Jul 21, 2025
ed92e53
Rollup merge of #142454 - tomtor:avr-update, r=tgross35
matthiaskrgr Jul 22, 2025
73305e2
Rollup merge of #142924 - lolbinarycat:tidy-js-extra-checks, r=Kobzol
matthiaskrgr Jul 22, 2025
b934f1a
Rollup merge of #143373 - cjgillot:bare-unused-trait-imports, r=petro…
matthiaskrgr Jul 22, 2025
cdc79bd
Rollup merge of #144082 - mladedav:dm/pub-priv-tests, r=petrochenkov
matthiaskrgr Jul 22, 2025
cb3395b
Rollup merge of #144126 - Shourya742:2025-06-18-fix-target-config-iss…
matthiaskrgr Jul 22, 2025
5c9a37f
Rollup merge of #144164 - ognevny:opt-dist-stage0-root, r=Kobzol
matthiaskrgr Jul 22, 2025
749f895
Rollup merge of #144265 - compiler-errors:copy-ice, r=oli-obk
matthiaskrgr Jul 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ __pycache__/

## Node
node_modules
package-lock.json
package.json
/src/doc/rustc-dev-guide/mermaid.min.js

## Rustdoc GUI tests
Expand Down
2 changes: 2 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ path = [
"rust-bors.toml",
"triagebot.toml",
"typos.toml",
"package.json",
"package-lock.json",
"x",
"x.ps1",
"x.py",
Expand Down
9 changes: 5 additions & 4 deletions compiler/rustc_borrowck/src/diagnostics/move_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,11 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
}

fn has_ambiguous_copy(&mut self, ty: Ty<'tcx>) -> bool {
let Some(copy_trait_def) = self.infcx.tcx.lang_items().copy_trait() else { return false };
// This is only going to be ambiguous if there are incoherent impls, because otherwise
// ambiguity should never happen in MIR.
self.infcx.type_implements_trait(copy_trait_def, [ty], self.infcx.param_env).may_apply()
let Some(copy_def_id) = self.infcx.tcx.lang_items().copy_trait() else { return false };

// Avoid bogus move errors because of an incoherent `Copy` impl.
self.infcx.type_implements_trait(copy_def_id, [ty], self.infcx.param_env).may_apply()
&& self.infcx.tcx.coherent_trait(copy_def_id).is_err()
}

fn report_cannot_move_from_static(&mut self, place: Place<'tcx>, span: Span) -> Diag<'infcx> {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/check_unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(super) fn check_unused_traits(tcx: TyCtxt<'_>, (): ()) {
used_trait_imports.extend_unord(imports.items().copied());
}

for &id in tcx.maybe_unused_trait_imports(()) {
for &id in tcx.resolutions(()).maybe_unused_trait_imports.iter() {
debug_assert_eq!(tcx.def_kind(id), DefKind::Use);
if tcx.visibility(id).is_public() {
continue;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,9 +2285,6 @@ rustc_queries! {
query upvars_mentioned(def_id: DefId) -> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
desc { |tcx| "collecting upvars mentioned in `{}`", tcx.def_path_str(def_id) }
}
query maybe_unused_trait_imports(_: ()) -> &'tcx FxIndexSet<LocalDefId> {
desc { "fetching potentially unused trait imports" }
}

/// All available crates in the graph, including those that should not be user-facing
/// (such as private crates).
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3428,8 +3428,6 @@ pub struct DeducedParamAttrs {
}

pub fn provide(providers: &mut Providers) {
providers.maybe_unused_trait_imports =
|tcx, ()| &tcx.resolutions(()).maybe_unused_trait_imports;
providers.extern_mod_stmt_cnum =
|tcx, id| tcx.resolutions(()).extern_crate_map.get(&id).cloned();
providers.is_panic_runtime =
Expand Down
67 changes: 67 additions & 0 deletions compiler/rustc_target/src/spec/base/avr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ pub fn ef_avr_arch(target_cpu: &str) -> u32 {
"attiny1624" => elf::EF_AVR_ARCH_XMEGA3,
"attiny1626" => elf::EF_AVR_ARCH_XMEGA3,
"attiny1627" => elf::EF_AVR_ARCH_XMEGA3,
"attiny3224" => elf::EF_AVR_ARCH_XMEGA3,
"attiny3226" => elf::EF_AVR_ARCH_XMEGA3,
"attiny3227" => elf::EF_AVR_ARCH_XMEGA3,
"atmega808" => elf::EF_AVR_ARCH_XMEGA3,
"atmega809" => elf::EF_AVR_ARCH_XMEGA3,
"atmega1608" => elf::EF_AVR_ARCH_XMEGA3,
Expand All @@ -331,6 +334,70 @@ pub fn ef_avr_arch(target_cpu: &str) -> u32 {
"atmega4808" => elf::EF_AVR_ARCH_XMEGA3,
"atmega4809" => elf::EF_AVR_ARCH_XMEGA3,

"avr64da28" => elf::EF_AVR_ARCH_XMEGA2,
"avr64da32" => elf::EF_AVR_ARCH_XMEGA2,
"avr64da48" => elf::EF_AVR_ARCH_XMEGA2,
"avr64da64" => elf::EF_AVR_ARCH_XMEGA2,
"avr64db28" => elf::EF_AVR_ARCH_XMEGA2,
"avr64db32" => elf::EF_AVR_ARCH_XMEGA2,
"avr64db48" => elf::EF_AVR_ARCH_XMEGA2,
"avr64db64" => elf::EF_AVR_ARCH_XMEGA2,
"avr64dd14" => elf::EF_AVR_ARCH_XMEGA2,
"avr64dd20" => elf::EF_AVR_ARCH_XMEGA2,
"avr64dd28" => elf::EF_AVR_ARCH_XMEGA2,
"avr64dd32" => elf::EF_AVR_ARCH_XMEGA2,
"avr64du28" => elf::EF_AVR_ARCH_XMEGA2,
"avr64du32" => elf::EF_AVR_ARCH_XMEGA2,
"avr64ea28" => elf::EF_AVR_ARCH_XMEGA2,
"avr64ea32" => elf::EF_AVR_ARCH_XMEGA2,
"avr64ea48" => elf::EF_AVR_ARCH_XMEGA2,
"avr64sd28" => elf::EF_AVR_ARCH_XMEGA2,
"avr64sd32" => elf::EF_AVR_ARCH_XMEGA2,
"avr64sd48" => elf::EF_AVR_ARCH_XMEGA2,

"avr16dd20" => elf::EF_AVR_ARCH_XMEGA3,
"avr16dd28" => elf::EF_AVR_ARCH_XMEGA3,
"avr16dd32" => elf::EF_AVR_ARCH_XMEGA3,
"avr16du14" => elf::EF_AVR_ARCH_XMEGA3,
"avr16du20" => elf::EF_AVR_ARCH_XMEGA3,
"avr16du28" => elf::EF_AVR_ARCH_XMEGA3,
"avr16du32" => elf::EF_AVR_ARCH_XMEGA3,
"avr32da28" => elf::EF_AVR_ARCH_XMEGA3,
"avr32da32" => elf::EF_AVR_ARCH_XMEGA3,
"avr32da48" => elf::EF_AVR_ARCH_XMEGA3,
"avr32db28" => elf::EF_AVR_ARCH_XMEGA3,
"avr32db32" => elf::EF_AVR_ARCH_XMEGA3,
"avr32db48" => elf::EF_AVR_ARCH_XMEGA3,
"avr32dd14" => elf::EF_AVR_ARCH_XMEGA3,
"avr32dd20" => elf::EF_AVR_ARCH_XMEGA3,
"avr32dd28" => elf::EF_AVR_ARCH_XMEGA3,
"avr32dd32" => elf::EF_AVR_ARCH_XMEGA3,
"avr32du14" => elf::EF_AVR_ARCH_XMEGA3,
"avr32du20" => elf::EF_AVR_ARCH_XMEGA3,
"avr32du28" => elf::EF_AVR_ARCH_XMEGA3,
"avr32du32" => elf::EF_AVR_ARCH_XMEGA3,
"avr16eb14" => elf::EF_AVR_ARCH_XMEGA3,
"avr16eb20" => elf::EF_AVR_ARCH_XMEGA3,
"avr16eb28" => elf::EF_AVR_ARCH_XMEGA3,
"avr16eb32" => elf::EF_AVR_ARCH_XMEGA3,
"avr16ea28" => elf::EF_AVR_ARCH_XMEGA3,
"avr16ea32" => elf::EF_AVR_ARCH_XMEGA3,
"avr16ea48" => elf::EF_AVR_ARCH_XMEGA3,
"avr32ea28" => elf::EF_AVR_ARCH_XMEGA3,
"avr32ea32" => elf::EF_AVR_ARCH_XMEGA3,
"avr32ea48" => elf::EF_AVR_ARCH_XMEGA3,
"avr32sd20" => elf::EF_AVR_ARCH_XMEGA3,
"avr32sd28" => elf::EF_AVR_ARCH_XMEGA3,
"avr32sd32" => elf::EF_AVR_ARCH_XMEGA3,
"avr128da28" => elf::EF_AVR_ARCH_XMEGA4,
"avr128da32" => elf::EF_AVR_ARCH_XMEGA4,
"avr128da48" => elf::EF_AVR_ARCH_XMEGA4,
"avr128da64" => elf::EF_AVR_ARCH_XMEGA4,
"avr128db28" => elf::EF_AVR_ARCH_XMEGA4,
"avr128db32" => elf::EF_AVR_ARCH_XMEGA4,
"avr128db48" => elf::EF_AVR_ARCH_XMEGA4,
"avr128db64" => elf::EF_AVR_ARCH_XMEGA4,

// Unknown target CPU => Unspecified/generic code
_ => 0,
}
Expand Down
Loading
Loading