about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-05-20Rollup merge of #141261 - RalfJung:current_dll_path, r=NoratriebStuart Cook-1/+1
current_dll_path: fix mistake in assertion message Follow-up to https://github.com/rust-lang/rust/pull/141239 r? `@Noratrieb`
2025-05-20Rollup merge of #141259 - rustbot:docs-update, r=ehussStuart Cook-0/+0
Update books ## rust-lang/book 4 commits in d33916341d480caede1d0ae57cbeae23aab23e88..230c68bc1e08f5f3228384a28cc228c81dfbd10d 2025-05-19 14:25:14 UTC to 2025-05-08 21:28:56 UTC - Chapter 6 from tech review (rust-lang/book#4370) - Chapter 5 from tech review (rust-lang/book#4359) - Chapter 4 from tech review (rust-lang/book#4358) - Chapter 3 from tech review (rust-lang/book#4353) ## rust-lang/reference 12 commits in 387392674d74656f7cb437c05a96f0c52ea8e601..acd0231ebc74849f6a8907b5e646ce86721aad76 2025-05-19 15:41:22 UTC to 2025-05-06 21:36:01 UTC - Add doc for avx512 target features (rust-lang/reference#1778) - Parse grammar without regexes (rust-lang/reference#1827) - Parse optionals and repeats without regexes (rust-lang/reference#1826) - Fix grammar for `RangePatternBound` regarding literals (rust-lang/reference#1825) - Fix grammar for `LiteralPattern` regarding `-` (rust-lang/reference#1824) - Doc: Add the LoongArch stabilized target features (rust-lang/reference#1707) - Fix naked em-dash (rust-lang/reference#1820) - Add missing attribute for statement macros (rust-lang/reference#1819) - Make linked rules are clicked, highlight the color (rust-lang/reference#1817) - Use the reference grammar for inline assembly (rust-lang/reference#1807) - Fix typo in introduction (rust-lang/reference#1810) - Add an example admonition (rust-lang/reference#1812) ## rust-lang/rust-by-example 2 commits in 8a8918c698534547fa8a1a693cb3e7277f0bfb2f..c9d151f9147c4808c77f0375ba3fa5d54443cb9e 2025-05-13 17:49:05 UTC to 2025-05-13 17:48:43 UTC - fix(docs): standardize on `no_run` attribute for documentation examples (rust-lang/rust-by-example#1929) - Fix typo in Japanese translation (rust-lang/rust-by-example#1928)
2025-05-20Rollup merge of #141257 - Shourya742:2025-05-19-trim-cache-module, r=onur-ozkanStuart Cook-50/+0
trim cache module in utils bootstrap We don't use other variants of Interner in bootstrap, so this PR streamlines the bootstrap cache utils module. r? `@onur-ozkan`
2025-05-20Rollup merge of #141211 - fluiderson:dev, r=thomccStuart Cook-2/+1
Replace `try_reserve_exact` with `try_with_capacity` in `std::fs::read` This change restores the previous behavior prior to #117925. That PR was made to handle OOM errors that turn into a panic with `Vec::with_capacity`. `try_reserve_exact` was used for that since there was no `try_with_capacity` method at the time. It was added later in #120504. I think it'd a better fit here.
2025-05-20Merge pull request #2392 from rust-lang/rustc-pullTshepang Mbambo-10587/+15509
Rustc pull update
2025-05-20Remove `MetaItemListParser::all_{word,path}_list`, which are unused.Nicholas Nethercote-14/+0
2025-05-19only resolve top-level guard patterns' guards oncedianne-1/+63
We resolve guard patterns' guards in `resolve_pattern_inner`, so to avoid resolving them multiple times, we must avoid doing so earlier. To accomplish this, `LateResolutionVisitor::visit_pat` contains a case for guard patterns that avoids visiting their guards while walking patterns. This fixes an ICE due to `visit::walk_pat` being used instead, which meant guards at the top level of a pattern would be visited twice.
2025-05-19Fix ICE while computing type layout (#14837)Jason Newcomb-7/+39
If a type is incomplete, for example if generic parameters are not available yet, although they are not escaping, its layout may not be computable. Calling `TyCtxt::layout_of()` would create a delayed bug in the compiler. changelog: [`zero_sized_map_values`]: fix ICE Fixes rust-lang/rust-clippy#14822 r? @Jarcho
2025-05-19Replace `string_to_string` with `char_lit_as_u8` in driver.shSamuel Moelius-3/+3
2025-05-19Account for changes from issue 14396Samuel Moelius-26/+23
2025-05-19Fix adjacent codeSamuel Moelius-19/+14
2025-05-19Extend `implicit_clone` to handle `to_string` callsSamuel Moelius-14/+43
2025-05-20Fix ICE while computing type layoutSamuel Tardieu-7/+39
If a type is incomplete, for example if generic parameters are not available yet, although they are not escaping, its layout may not be computable. Calling `TyCtxt::layout_of()` would create a delayed bug in the compiler.
2025-05-20Avoid `rustc_span::` qualifiers.Nicholas Nethercote-17/+16
In several files they are entirely unnecessary, with the relevant names already imported. And in a few I have added the necessary `use` item.
2025-05-20Fix up some comments.Nicholas Nethercote-16/+15
Some are too long (> 100 chars), some are too short, some are missing full stops, some are missing upper-case letters at the start of sentences.
2025-05-20Simplify `Accepts`.Nicholas Nethercote-10/+7
There only needs to be one `Fn` per symbol, not multiple.
2025-05-20Various macro fixes for loop lints Samuel Tardieu-8/+93
The `explicit_into_iter_loop`, `explicit_iter_loop` and `iter_next_loop` will now: - trigger only when the triggering expression is not located into macro code; - properly expose code rewrite proposal with code coming from the root context.
2025-05-20Introduce some typedefs to improve readability.Nicholas Nethercote-6/+10
2025-05-19`needless_match`: do not pretend that `return` is not significant in an ↵Alejandra González-15/+42
expression (#14757) A `return` in an expression makes it divergent and cannot be removed blindly. While this stripping might have been introduced as a way to catch more cases, it was improperly used, and no tests exhibit a failure when this special handling is removed. changelog: [`needless_match`]: do not strip `return` as it might make the `if let` or `match` divergent in some cases Fixes rust-lang/rust-clippy#14754
2025-05-20Warning when dependency crate has async drop types, and the feature is ↵Andrew Zhogin-3/+3
disabled - typo fixed
2025-05-19Use interned symbols instead of strings in more places (#14840)Jason Newcomb-703/+946
This patch series makes heavy use of interned symbols when matching against known method names: - the first commit reorders the current list of symbols in `clippy_utils::sym` - the second commit adds symbol reordering and order checking to `clippy dev fmt` / `clippy dev fmt --check` - the third commit converts many uses of string matching during linting to symbols matching The symbols are kept as-is (not rendered as strings) as much as possible to avoid needing locking the interner as much as possible. Static strings have been kept when they are only used when emitting a diagnostic, as there is no benefit in using interned strings for de-interning them right after. changelog: none r? @Alexendoo
2025-05-19Use symbols instead of `&str` when possibleSamuel Tardieu-653/+857
2025-05-19Ensure that symbols list stays sortedSamuel Tardieu-2/+39
2025-05-19Sort the existing list of symbolsSamuel Tardieu-48/+50
2025-05-19Auto merge of #138023 - melrief:97227_impl_Seek_for_Take, r=tgross35bors-1/+173
Add `std::io::Seek` instance for `std::io::Take` Library tracking issue [#97227](https://github.com/rust-lang/rust/issues/97227). ACP: https://github.com/rust-lang/libs-team/issues/555 1. add a `len` field to `Take` to keep track of the original number of bytes that `Take` could read 2. add a `position()` method to return the current position of the cursor inside `Take` 3. implement `std::io::Seek` for `std::io::Take` Closes: https://github.com/rust-lang/libs-team/issues/555
2025-05-19Properly remove Noratrieb from review rotation nora-3/+0
I've put myself on vacation a while ago, but really I just want to remove myself from the queue because I couldn't get around to reviewing all the PRs, I'm still here and available :3.
2025-05-19current_dll_path: fix mistake in assertion messageRalf Jung-1/+1
2025-05-19Access items through `rustc_session` instead of `rustc_lint_defs` (#14852)Alejandra González-20/+10
Items such as the `declare_tool_lint!()` macro are publicly reexported from `rustc_lint_defs` to `rustc_session`. Use the latter for consistency. changelog: none
2025-05-19`cargo dev fmt`: format `clippy_lints_internal` as well (#14853)Jason Newcomb-0/+1
changelog: none r? @Jarcho
2025-05-19Fixed possible ICE in annotate_mut_binding_to_immutable_bindingJosh Gunter-15/+46
2025-05-19Update booksrustbot-0/+0
2025-05-19Remove obsolete restriction in code (#14851)Samuel Tardieu-10/+5
changelog: none
2025-05-19trim cache module in utilsbit-aloo-50/+0
2025-05-19Auto merge of #141255 - matthiaskrgr:rollup-ravsgen, r=matthiaskrgrbors-56/+182
Rollup of 6 pull requests Successful merges: - #131200 (Handle `rustc_query_system` cases of `rustc::potential_query_instability` lint) - #141244 (windows: document that we rely on an undocumented property of GetUserProfileDirectoryW) - #141247 (skip compiler tools sanity checks on certain commands) - #141248 (fix data race in ReentrantLock fallback for targets without 64bit atomics) - #141249 (introduce common macro for `MutVisitor` and `Visitor` to dedup code) - #141253 (Warning added when dependency crate has async drop types, and the feature is disabled) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-19`cargo dev fmt`: format `clippy_lints_internal` as wellSamuel Tardieu-0/+1
2025-05-19Rollup merge of #141253 - ↵Matthias Krüger-1/+55
azhogin:azhogin/async-drop-feature-inconsistency-warning, r=oli-obk Warning added when dependency crate has async drop types, and the feature is disabled In continue of https://github.com/rust-lang/rust/pull/141031. When dependency crate has non-empty `adt_async_destructor` table in metadata, and `async_drop` feature is disabled for local crate, warning will be emitted. Test `dependency-dropped` has two revisions - with and without feature enabled. With feature enabled, async drop for dropee is executed ("Async drop" printed). Without the feature enabled, sync drop is executed ("Sync drop" printed) and warning is emitted. Warning example: ``` warning: found async drop types in dependecy `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped` --> $DIR/dependency-dropped.rs:7:1 | LL | #![cfg_attr(with_feature, feature(async_drop))] | ^ | = help: if async drop type will be dropped in a crate without `feature(async_drop)`, sync Drop will be used ```
2025-05-19Rollup merge of #141249 - fee1-dead-contrib:push-mwxxsvrsotvs, r=oli-obkMatthias Krüger-49/+73
introduce common macro for `MutVisitor` and `Visitor` to dedup code helps with #127615. I can do everything in one go but I figured it might be worth it to open a PR first for vibeck. r? oli-obk
2025-05-19Rollup merge of #141248 - RalfJung:reentrant-lock-race, r=joboetMatthias Krüger-2/+26
fix data race in ReentrantLock fallback for targets without 64bit atomics See [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/reentrant.20lock.20failure.20on.20musl) for details: the address used to identify a thread might get lazily allocated inside `tls_addr()`, so if we call that *after* doing the `tls_addr.load()` it is too late to establish synchronization with prior threads that used the same address -- the `load()` thus races with the `store()` by that prior thread, and might hence see outdated values, and then the entire logic breaks down. r? `@joboet`
2025-05-19Rollup merge of #141247 - onur-ozkan:141246, r=albertlarsan68Matthias Krüger-3/+17
skip compiler tools sanity checks on certain commands Closes #141246
2025-05-19Rollup merge of #141244 - RalfJung:GetUserProfileDirectoryW, r=ChrisDentonMatthias Krüger-0/+2
windows: document that we rely on an undocumented property of GetUserProfileDirectoryW r? `@ChrisDenton` Also see https://github.com/rust-lang/miri/pull/4332
2025-05-19Rollup merge of #131200 - ↵Matthias Krüger-1/+9
ismailarilik:handle-potential-query-instability-lint-for-rustc-query_system, r=fee1-dead Handle `rustc_query_system` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_query_system/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_query_system/src/lib.rs#L2) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447 r? `@compiler-errors`
2025-05-19Access items through `rustc_session` instead of `rustc_lint_defs`Samuel Tardieu-20/+10
Items such as the `declare_tool_lint!()` macro are publicly reexported from `rustc_lint_defs` to `rustc_session`. Use the latter for consistency.
2025-05-19Add `std::io::Seek` instance for `std::io::Take`Mario Pastorelli-1/+173
2025-05-19Remove obsolete restriction in codeSamuel Tardieu-10/+5
2025-05-19add s390x z17 target featuresFolkert de Vries-10/+36
2025-05-19Merge pull request #4334 from RalfJung/GetUserProfileDirectoryW-issueRalf Jung-2/+2
GetUserProfileDirectoryW: reference issue regarding implementation details we rely on
2025-05-19Add new `useless_concat` lint (#13829)Samuel Tardieu-0/+280
Fixes #13793. Interestingly enough, to actually check that the macro call has at least two arguments, we need to use the rust lexer after getting the original source code snippet. changelog: Add new `useless_concat` lint
2025-05-19GetUserProfileDirectoryW: reference issue regarding implementation details ↵Ralf Jung-2/+2
we rely on
2025-05-19windows: document that we rely on an undocumented property of ↵Ralf Jung-0/+2
GetUserProfileDirectoryW
2025-05-19Warning added when dependency crate has async drop types, and the feature is ↵Andrew Zhogin-1/+55
disabled