-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[beta] Clippy beta backport #148029
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
Closed
Closed
[beta] Clippy beta backport #148029
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mulacrum [beta] Initial cut for 1.91 beta https://forge.rust-lang.org/release/process.html#beta-pr Also backports: - Only run Cranelift dist test on nightly rust-lang#146582 r? `@Mark-Simulacrum`
This reverts commit 095fa86.
…youxu [beta] Revert "compiler: Add Windows resources to rustc-main and rustc_driver" This reverts rust-lang#146018 due to rust-lang#146693
…mulacrum [beta] bump to released stable compiler https://forge.rust-lang.org/release/process.html#beta-stage0-update-friday r? `@Mark-Simulacrum`
…iser Revert "Auto merge of rust-lang#144086 - clubby789:alloc-zeroed, r=nikic" This reverts commit 040a98a, reversing changes made to e8a792d. This reverts rust-lang#144086 on beta due to rust-lang#145995. On master the issue will be fixed by rust-lang#146766.
(cherry picked from commit 4fcafc9)
(cherry picked from commit 83532f8)
(cherry picked from commit 5a4e536)
(cherry picked from commit 5c95f8b)
(cherry picked from commit 1c85a1d)
[beta] backports - remove incorrect fast path rust-lang#146919 - Fix infinite recursion in Path::eq with String rust-lang#146958 - Make #[link="dl"] an FCW rather than an error rust-lang#147262 r? cuviper
(cherry picked from commit e3f1046)
Signed-off-by: Jonathan Brouwer <[email protected]> (cherry picked from commit 4787834)
(cherry picked from commit 1589c6c)
When building with `rust.rpath = false`, every `rustc` invocation needs to include the library path as well. I particularly ran into this in `generate_target_spec_json_schema` when testing 1.91-beta in Fedora, where we do disable rpath for our system builds. The new helper function will hopefully encourage the right thing going forward. (cherry picked from commit 03cdcb5)
(cherry picked from commit 95ddfa1)
(cherry picked from commit a3482d9)
[beta] backports - Don't normalize higher-ranked assumptions if they're not used rust-lang#147299 - Fix target list of `link_section` rust-lang#147418 - bootstrap: add `Builder::rustc_cmd` that includes the lib path rust-lang#147419 - Update LLVM to 21.1.2 rust-lang#146953 - Remove the temporary directory when a check ends -- part of rust-lang#147518 r? cuviper
…nglo [beta-1.91] Update cargo submodule 2 commits in 785a383cf715417fcd68c4a98a4523c2d082bb0f..ea2d97820c16195b0ca3fadb4319fe512c199a43 2025-10-04 19:17:20 -0500 to 2025-10-10 15:19:24 -0400 - [beta-1.91] fix: use `host-tuple` for host target subsitution (rust-lang/cargo#16032) - [beta-1.91] fix(timings): compute codegen start time to draw dep lines (rust-lang/cargo#16057) r? ghost
…rtening, r=jackh726 [beta-1.91] Warn on future errors from temporary lifetimes shortening in Rust 1.92 Pursuant to [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23145838.3A.20beta-nominated/near/540530631), this implements a future-compatibility warning lint `macro_extended_temporary_scopes` for errors in Rust 1.92 caused by rust-lang#145838: ``` warning: temporary lifetime shortening in Rust 1.92 --> $DIR/macro-extended-temporary-scopes.rs:54:14 | LL | &struct_temp().field | ^^^^^^^^^^^^^ this expression creates a temporary value... ... LL | } else { | - ...which will be dropped at the end of this block in Rust 1.92 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see <https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#macro-extended-temporary-scopes> = note: consider using a `let` binding to create a longer lived value ``` Implementation-wise, this reuses the existing temporary scoping FCW machinery introduced for the `tail_expr_drop_order` edition lint: this adds `BackwardIncompatibleDropHint` statements to the MIR at the end of the shortened scopes for affected temporaries; these are then checked in borrowck to warn if the temporary is used after the future drop hint. There are trade-offs here: on one hand, I believe this gives some assurance over ad-hoc pattern-recognition that there are no false positives[^1]. On the other hand, this fails to lint on future dangling raw pointers and it complicates the potential addition of explanatory diagnostics or suggestions[^2]. I'm hopeful that the limitation around dangling pointers won't be relevant in real code, though; the only real instance we've seen of breakage so far is future errors in formatting macro invocations, which this should be able to catch. Release logistics notes: - This PR targets the beta branch directly, since the breakage it's a FCW for is landing in the next Rust version. - rust-lang#146098 undoes the breakage this is a FCW for. If that behavior is merged and stabilizes in Rust 1.92, this PR should be reverted (or shouldn't be merged) in order to avoid spurious warnings. cc `@traviscross` `@rustbot` label +T-lang [^1]: In particular, more syntactic approaches are complicated by having to avoid warning on promoted constants; they'd either be full of holes, they'd need a lot of extra logic, or they'd need to hack more MIR-to-HIR mapping into `PromoteTemps`. [^2]: It's definitely possible to add more context and a suggestion, but the ways I've thought of to do so are either too hacky or too complex to feel appropriate for a last-minute direct-to-beta lint.
(cherry picked from commit 029579d)
…aceholders (cherry picked from commit 30bedc7)
(cherry picked from commit 64c023b)
(cherry picked from commit 2048b9c)
[beta] backports - Change int-to-ptr transmute lowering back to inttoptr rust-lang#147541 - rewrite outlives placeholder constraints to outlives static when handling opaque types rust-lang#147566 - GVN: Invalidate derefs at loop headers rust-lang#147607 r? cuviper
…5660) Fixes rust-lang/rust-clippy#15657 changelog: [`len_zero`]: fix ICE when `fn len` has a return type without generic type params
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
|
The issue linked in the commit is changed by the system from clippy to rust, making it point to an unrelated issue in the commit (but not in the top comment). |
f2f881b to
f435972
Compare
|
☔ The latest upstream changes (presumably #142712) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
added a commit
that referenced
this pull request
Oct 27, 2025
[stable] Prepare Rust 1.91.0 release - [beta-1.91] Add more context to the temporary lifetime extension FCW #148174 - rustdoc-search: JavaScript optimization based on Firefox Profiler output #146484 - rustdoc-search: use the same ID for entry and path to same item #147045 - rustdoc-search: stringdex update with more packing #147002 - rustdoc-search: stringdex 0.0.2 #147660 - [beta] Clippy beta backport #148029 - 1.91.0 release notes #148013 r? cuviper
|
I included this in #148179. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backporting only a single commit, fixing an ICE introduced in 1.91.0-beta.
GenericArgs::type_atrust-clippy#15660r? @Mark-Simulacrum