Skip to content

fix: emit diagnostic for AVR target without target-cpu#158776

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
amirHdev:fix-139223-avr-target-cpu-diagnostic
Jul 6, 2026
Merged

fix: emit diagnostic for AVR target without target-cpu#158776
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
amirHdev:fix-139223-avr-target-cpu-diagnostic

Conversation

@amirHdev

@amirHdev amirHdev commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #139223

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 4, 2026
@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @nnethercote (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 75 candidates
  • Random selection from 22 candidates

@folkertdev

Copy link
Copy Markdown
Contributor

Is it feasible to add a test for this? Or is that tricky with a custom target json etc.

@amirHdev

amirHdev commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Is it feasible to add a test for this? Or is that tricky with a custom target json etc.

Yes it is
There is already test coverage in tests/ui/target-cpu/explicit-target-cpu.rs specifically the avr_nocpu test case uses the default avr-none target without the use of -Ctarget-cpu and should trigger the existing CpuRequired error message

@folkertdev

Copy link
Copy Markdown
Contributor

Right, I'm asking though whether a test can be added for the specific ICE that was fixed in this PR?

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
@amirHdev amirHdev force-pushed the fix-139223-avr-target-cpu-diagnostic branch from 1f6491b to 6ef22de Compare July 5, 2026 11:42
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Jul 5, 2026
@amirHdev

amirHdev commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Right, I'm asking though whether a test can be added for the specific ICE that was fixed in this PR?

I added regression test for it

@nnethercote

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6ef22de has been approved by nnethercote

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 2. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 6, 2026
…-diagnostic, r=nnethercote

fix: emit diagnostic for AVR target without target-cpu

Fixes rust-lang#139223
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 20 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158807 (Add regression test for CString::clone_into unwind safety)
 - #158825 (Fix typo)
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 24 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158694 (Positive test for closures needing expectations)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158310 (Remove unexpected usage of Unambig in non-infer variants)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158810 (Add supplementary information for get_unchecked(mut))
 - #158825 (Fix typo)
 - #158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 24 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158694 (Positive test for closures needing expectations)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158310 (Remove unexpected usage of Unambig in non-infer variants)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158810 (Add supplementary information for get_unchecked(mut))
 - #158825 (Fix typo)
 - #158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 24 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158694 (Positive test for closures needing expectations)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #158819 (Put `InhabitedPredicate::NotInModule` earlier in disjunction since it can be a lot faster)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158310 (Remove unexpected usage of Unambig in non-infer variants)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158810 (Add supplementary information for get_unchecked(mut))
 - #158825 (Fix typo)
 - #158838 (tidy: Use `empty_alternate = true` for triagebot mention glob check)
@rust-bors rust-bors Bot merged commit 6fe47a6 into rust-lang:main Jul 6, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 6, 2026
rust-timer added a commit that referenced this pull request Jul 6, 2026
Rollup merge of #158776 - amirHdev:fix-139223-avr-target-cpu-diagnostic, r=nnethercote

fix: emit diagnostic for AVR target without target-cpu

Fixes #139223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE should be a request to set -Ctarget-cpu

4 participants