Skip to content

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Oct 18, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Oneirical and others added 21 commits October 12, 2025 00:33
…deathness

error from const eval lint causes ICE at check_pat in late_lint, because the function expects the typeck result isn't tainted by error but it is.
To avoid the ICE, check_pat returns earlier if the typeck_result is tainted.

check_mod_deathness also has an issue from the same reason. visit_body for making live symbols expects the typeck result has no error.
So this commit adds a check in visit_nested_body to avoid the ICE.
However, if visit_nested_body just returns without doing anything, all codes with the error are marked as dead, because live_symbols is empty.
To avoid this side effect, visit_nested_body and other visit_* functions in MarkSymbolVistior should return appropriate error.
If a function returns ControlFlow::Break, live_symbols_and_ignore_derived_traits returns earlier with error,
then check_mod_deathness, the caller of the function returns earlier without pushing everything into dead_codes.
Signed-off-by: Jonathan Brouwer <[email protected]>
Issue-125323: ICE non-ADT in struct pattern when long time constant evaluation is in for loop

This PR fixes rust-lang#125323

## Context
According to the issue, the ICE happens since rust-lang#121206.
In the PR, some error methods were reorganized. For example, has_errors() was renamed to has_errors_exclude_lint_errors(). However, some codes which used the original has_errors() were not switched to has_errors_exclude_lint_errors(). I finally found that report_error() in writeback.rs causes this ICE. Currently the method uses tainted_by_errors() to get guar (ErrorGuaranteed), but originally it used dcx().has_errors() but it wasn't changed to has_errors_exclude_lint_errors() when changes in rust-lang#121206 were merged. I don't think I fully understand how an error is propagated, but I suppose that the error from long time constant evaluation is unexpectedly propagated other parts (in this ICE, for loop), then cause the non-ADT in struct pattern ICE.

## Change
- Fix report_error() in writeback.rs: use dcx().has_errors_exclude_lint_errors() instead of tainted_by_errors() to prevent error propagation from constant evaluation.
- Add test for the ICE
- Modify some tests to align the change: Due to this fix, E0282 error happens (or not happen anymore) in some tests.

## NOTE
The 4th commit aims to revert the fix in rust-lang#123516 because I confirmed that the ICE solved by the PR doesn't happen if I modify report_error(). I think the root cause of that ICE is the same as rust-lang#125323 . But I can discard this commit since we can fix rust-lang#125323 without it.
…r=lcnr,petrochenkov

Deny-by-default never type lints

In Rust [1.89.0](https://github.com/rust-lang/rust/milestone/133) we started emitting these lints in dependencies. I discussed the future steps with `@lcnr` and we think that before stabilizing the never type (and doing the breaking changes) we should deny the lints for ~4 releases.

This PR marks `never_type_fallback_flowing_into_unsafe` and `dependency_on_unit_never_type_fallback` lints as deny-by-default.

Tracking:

- rust-lang#35121

Related:

- rust-lang#141937
…r=jieyouxu

Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang#5 of Batch rust-lang#2]

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that Kivooeo was using.

r? `@jieyouxu`
…dule-in-msg, r=fee1-dead

Rename "non-inline module" to "file module" in proc macro diagnostics

This PR updates diagnostic messages to use "file module" instead of "non-inline module". because the term "non-inline module" can be confusing, especially for non-native English speakers.

follow up PR rust-lang#147395
related of rust-lang#147314, [#general > Rename "non-inline modules" to "external modules"](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/.E2.9C.94.20Rename.20.22non-inline.20modules.22.20to.20.22external.20modules.22/near/543361244)

cc `@Kivooeo`
…r=jdonszelmann

Fix ICE in pattern matching with generic const array length errors

Fixes rust-lang#139815
… r=jdonszelmann

Warn on unused_attributes in uitests

r? `@jdonszelmann`

Because:
- unused_attributes warnings are usually actual mistakes, rather than just unused code, and we want to notify test writers they may be accidentally making a mistake
- Because the lint was allowed by default previously, we missed real bugs, because the test coverage is worse
  1. rust-lang#147417
  2. rust-lang#147411
…o, r=jieyouxu

Do not error out for `download-rustc` if LTO is configured

Noted [here](rust-lang#141953 (comment)). LTO should indeed be mostly a perf-only change.

r? `@jieyouxu`
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 18, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Oct 18, 2025

📌 Commit c721e50 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 18, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 18, 2025
@bors
Copy link
Collaborator

bors commented Oct 18, 2025

⌛ Testing commit c721e50 with merge ec669eb...

bors added a commit that referenced this pull request Oct 18, 2025
Rollup of 8 pull requests

Successful merges:

 - #138679 (Issue-125323: ICE non-ADT in struct pattern when long time constant evaluation is in for loop)
 - #146167 (Deny-by-default never type lints)
 - #146490 (Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#5 of Batch #2])
 - #147438 (Rename "non-inline module" to "file module" in proc macro diagnostics)
 - #147724 (Fix ICE in pattern matching with generic const array length errors)
 - #147813 (Warn on unused_attributes in uitests )
 - #147816 (Do not error out for `download-rustc` if LTO is configured)
 - #147845 (Add regression test for 134355)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-20-3 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

test result: FAILED. 64 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out; finished in 700.91ms

all doctests ran in 1.42s; merged doctests compilation took 0.68s
error: doctest failed, to rerun pass `-p rustc_lint_defs --doc`
Bootstrap failed while executing `--stage 1 test --skip src/tools/tidy`
Build completed unsuccessfully in 0:50:03
  local time: Sat Oct 18 21:51:48 UTC 2025
  network time: Sat, 18 Oct 2025 21:51:48 GMT
##[error]Process completed with exit code 1.

@bors
Copy link
Collaborator

bors commented Oct 18, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 18, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 18, 2025
Copy link

@jdgarcia1487-collab jdgarcia1487-collab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

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

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.