about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-05-26Rollup merge of #140952 - SimonSapin:ascii_whitespace_definition, r=dtolnayJacob Pratt-1/+3
Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
2025-05-26Rollup merge of #140936 - teor2345:wtf-surrogate-docs, r=workingjubileeJacob Pratt-6/+6
Clarify WTF-8 safety docs This PR is a follow-up to PR #140159, which clarifies ~~two things~~: - the WTF-8 safety comment [was confusing](https://github.com/rust-lang/rust/pull/140159#discussion_r2082766965), either surrogate condition is actually sufficient for safety, both are not required - ~~the private `os_str::Slice` type name is easily confused with `std::slice`~~ ~~Happy to bikeshed the `OsSlice` name, other alternatives are `OsStrSlice` and `StrSlice`. Now it's got a distinct name from `std::slice`, it's easy to search and replace.~~ cc ``@thaliaarchi`` ``@workingjubilee``
2025-05-26Rollup merge of #140863 - GuillaumeGomez:cleanup-tyalias-render, r=lolbinarycatJacob Pratt-214/+376
[rustdoc] Unify type aliases rendering with other ADT Fixes #140739. Better reviewed one commit at a time. Just one thing I'm wondering: should we also render non-`repr` attributes? If so, I wonder if we shouldn't simply change `clean::TypeAlias` to contain the other ADT directly (`Struct`, `Enum` and `Union`) and remove the `TypeAlias::generics` field. Can be done in a follow-up too. cc ``@camelid`` r? ``@notriddle``
2025-05-26Rollup merge of #140539 - nnethercote:simplify-attribute_groups, r=jdonszelmannJacob Pratt-48/+47
Simplify `attribute_groups` It's more complicated than it needs to be. r? ``@jdonszelmann``
2025-05-26Rollup merge of #134696 - ChrisDenton:normalize-lexically, r=workingjubileeJacob Pratt-1/+132
Implement `normalize_lexically` Implements #134694 This is, I think, the most straightforward implementation I could do, which will hopefully more easily allow experimentation if we decide to change the design here.
2025-05-25Auto merge of #141557 - bjorn3:sync_cg_clif-2025-05-25, r=bjorn3bors-265/+1112
Subtree sync for rustc_codegen_cranelift The main highlights this time are a Cranelift update and (thanks for beetrees) f16/f128 support. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-05-25Update tidy exceptionsbjorn3-0/+2
2025-05-25Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into ↵bjorn3-265/+1110
sync_cg_clif-2025-05-25
2025-05-25Rustup to rustc 1.89.0-nightly (5e16c6620 2025-05-24)bjorn3-1/+1
2025-05-25Sync from rust 5e16c662062fd6dee91f0fe2a1580483488d80cfbjorn3-1/+1
2025-05-25Auto merge of #141545 - GuillaumeGomez:rollup-myrvuqq, r=GuillaumeGomezbors-62/+197
Rollup of 6 pull requests Successful merges: - rust-lang/rust#141413 (Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRING) - rust-lang/rust#141443 (make teach_help message for cast-before-pass-to-variadic more precise) - rust-lang/rust#141508 (bootstrap: clippy: set TESTNAME based on given paths) - rust-lang/rust#141512 (Avoid extra path trimming in method not found error) - rust-lang/rust#141530 (Added unstable feature doc comments to unstable book) - rust-lang/rust#141541 (Random nits) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-25Update to new APIGuillaume Gomez-2/+3
2025-05-25Rollup merge of #141541 - compiler-errors:nits, r=lcnrGuillaume Gomez-5/+6
Random nits Two completely random commits that I didn't know where to integrate into another PR. * Don't use the full type relation machinery to equate two regions (it's overkill). * Add a comment that `select_in_new_trait_solver` shouldn't be used directly. r? lcnr or reassign
2025-05-25Rollup merge of #141530 - ranger-ross:unstable-feature-doc-comments, r=UrgauGuillaume Gomez-6/+38
Added unstable feature doc comments to unstable book This PR adds doc comments for unstables features in [compiler/rustc_feature/src/unstable.rs](https://github.com/rust-lang/rust/blob/d3a2440384b54664dddd56e0081ca094c444e869/compiler/rustc_feature/src/unstable.rs#L190-L191) to the unstable book feature pages. Fixes rust-lang/rust#141528 Example features rendered ![image](https://github.com/user-attachments/assets/2b65f534-26f8-441f-ba29-65554c9154b7) ![image](https://github.com/user-attachments/assets/6077491b-ddaf-447e-9519-0bc110c7a893) r? `@jyn514`
2025-05-25Rollup merge of #141512 - Noratrieb:stop-trimming-this-much, r=compiler-errorsGuillaume Gomez-47/+63
Avoid extra path trimming in method not found error Method errors have an extra check that force trim paths whenever the normal string is longer than 10 characters, which can be quite unhelpful when multiple items have the same name (for example an `Error`). A user reported this force trimming as being quite unhelpful when they had a method error where the precise path of the `Error` mattered. The code uses `tcx.short_string` already to get the normal path, which tries to be clever around trimming paths if necessary, so there is no reason for this extra force trimming.
2025-05-25Rollup merge of #141508 - xtexx:gh-104200, r=onur-ozkanGuillaume Gomez-1/+18
bootstrap: clippy: set TESTNAME based on given paths This addresses #104200 by setting the TESTNAME environment variable automatically based on the paths from run configs, marking a selected set of UI tests to be run. Note that this does not filter out other unit tests using #[test].
2025-05-25Rollup merge of #141443 - RalfJung:c-variadic-teach-help, r=workingjubileeGuillaume Gomez-1/+1
make teach_help message for cast-before-pass-to-variadic more precise r? `@workingjubilee` based on your comment [here](https://github.com/rust-lang/rust/issues/44930#issuecomment-2199663198)
2025-05-25Rollup merge of #141413 - est31:cfg_version_env_var, r=jieyouxuGuillaume Gomez-2/+71
Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRING The `#[cfg(version(...))]` feature is currently under-tested. Part of it is the difficulty that it is hard to write a test that never changes, while the version of the Rust compiler indeed *does* change. PR #81468 added the first and so far only test of `#[cfg(version(...))]`'s functionality (there is one other test for the *syntax*, that also acts as feature gate). But that test uses a proc macro that parses the version: the text of the test doesn't contain the actual `#[cfg(version(...))]`. This PR makes `#[cfg(version(...))]` respect `RUSTC_OVERRIDE_VERSION_STRING`, added by PR #124339, allowing us to virtually pin the rustc version and write tests from all directions against some specific version. The PR also adds a functional test of `#[cfg(version(...))]` that leverages `RUSTC_OVERRIDE_VERSION_STRING`. Pulled out of #141137. Tracking issue: #64796
2025-05-25Improve codeGuillaume Gomez-49/+50
2025-05-25Add regression test for #140739Guillaume Gomez-0/+42
2025-05-25Tweak attribute rendering depending on wether or not it is a type aliasGuillaume Gomez-80/+173
2025-05-25Rename the `document_*` argument/field into `is_type_alias`Guillaume Gomez-12/+12
2025-05-25Split `Item::attributes` method into threeGuillaume Gomez-70/+81
2025-05-25Unify rendering of type aliases without ADT itemsGuillaume Gomez-137/+151
2025-05-25Rename `clean::Enum::variants` method into `non_stripped_variants`Guillaume Gomez-3/+3
2025-05-25Auto merge of #141086 - a1phyr:spec_advance_by, r=jhprattbors-5/+31
Implement `advance_by` via `try_fold` for `Sized` iterators When `try_fold` is overriden, it is usually easier for compilers to optimize. Example difference: https://iter.godbolt.org/z/z8cEfnKro
2025-05-25feat(unstable-book): Added unstable feature doc comments as feature descriptionsRoss Sullivan-6/+38
2025-05-25Comment for not using select_in_new_trait_solverMichael Goulet-0/+1
2025-05-25Don't use relation just to equate regions in responseMichael Goulet-5/+5
2025-05-25Implement normalize lexicallyChris Denton-1/+132
2025-05-25Auto merge of #141529 - jhpratt:rollup-8dle839, r=jhprattbors-232/+229
Rollup of 4 pull requests Successful merges: - rust-lang/rust#139831 (rustdoc: on mobile, make the sidebar full width and linewrap) - rust-lang/rust#140950 (More option optimization tests) - rust-lang/rust#141108 (Docs(lib): Fix `extract_if` docs) - rust-lang/rust#141361 (use `cfg_select!` to select the right `VaListImpl` definition) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-25fix help messageRalf Jung-1/+1
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2025-05-25Rollup merge of #141361 - folkertdev:varargs-cfg, r=workingjubileeJacob Pratt-175/+136
use `cfg_select!` to select the right `VaListImpl` definition tracking issue: https://github.com/rust-lang/rust/issues/44930 Just a bit of cleanup really. We could use `PhantomInvariantLifetime<'f>` (https://github.com/rust-lang/rust/issues/135806) to make it more precise what that `PhantomData<&'f mut &'f c_void>` marker is doing. I'm not sure how ready that feature is though, `@jhpratt` are these types good to use internally? --- Some research into the lifetimes of `VaList` and `VaListImpl`: It's easy to see why the lifetime of these types should not be extended, a `VaList` or `VaListImpl` escaping its function is a bad idea. I don't currently see why coercing the lifetime to a shorter lifetime is problematic though, but probably I just don't understand variance well enough to see it. The history does not provide much explanation: - https://github.com/immunant/rust/commit/08140878fefaa4b16939b904bf825b7107069b42 original implementation - https://github.com/immunant/rust/commit/b9ea653aee231114acbe6d4b3c7b1d692772d060 adds `VaListImpl<'f>`, but it is only covariant in `'f` - https://github.com/rust-lang/rust/pull/62639 makes `VaListImpl<'f>` invariant over `'f` (because `VaList<'a, 'f>` is already invariant over `'f`, but I think that is just an implementation detail?) Beyond that I don't see how the lifetime situation can be simplified significantly, e.g. this function really needs `'copy` to be unconstrained. ```rust /// Copies the `va_list` at the current location. pub unsafe fn with_copy<F, R>(&self, f: F) -> R where F: for<'copy> FnOnce(VaList<'copy, 'f>) -> R, { let mut ap = self.clone(); let ret = f(ap.as_va_list()); // SAFETY: the caller must uphold the safety contract for `va_end`. unsafe { va_end(&mut ap); } ret } ``` `@rustbot` label +F-c_variadic r? `@workingjubilee`
2025-05-25Rollup merge of #141108 - PaulDance:fix-extract_if-docs, r=Mark-SimulacrumJacob Pratt-27/+29
Docs(lib): Fix `extract_if` docs Various fixes to the documentation comments of the several `extract_if` collection methods available. It originally started with a small typo fix in `Vec`'s spotted when reading the 1.87 release notes, but then by looking at the others' for comparison in order to try determining what was the intended sentence, some inconsistencies were spotted. Therefore, some other changes are also proposed here to reduce these avoidable differences, going more and more nit-picky along the way. See the individual commits for more details about each change. `@rustbot` label T-libs A-collections A-docs
2025-05-25Rollup merge of #140950 - clubby789:nonzero-ord-test, r=Mark-SimulacrumJacob Pratt-10/+52
More option optimization tests I noticed that although adding a manual implementation for PartialOrd on Option in #122024, I didn't add a test so that we can easily check if this behavior has improved. This also adds a couple of `should-fail` tests - this will allow us to remove these hacky implementations if upstream LLVM improves.
2025-05-25Rollup merge of #139831 - lolbinarycat:rustdoc-mobile-sidebar, r=GuillaumeGomezJacob Pratt-20/+12
rustdoc: on mobile, make the sidebar full width and linewrap this is because the mobile sidebar cannot be resized, unlike on desktop.
2025-05-25bootstrap: clippy: set TESTNAME based on given pathsxtex-1/+18
This addresses issue 104200 by setting the TESTNAME environment variable automatically based on the paths from run configs, marking a selected set of UI tests to be run. Note that this does not filter out other unit tests using #[test].
2025-05-24Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRINGest31-2/+71
2025-05-24Avoid extra path trimming in method not found errorNoratrieb-47/+63
Method errors have an extra check that force trim paths whenever the normal string is longer than 10 characters, which can be quite unhelpful when multiple items have the same name (for example an `Error`). A user reported this force trimming as being quite unhelpful when they had a method error where the precise path of the `Error` mattered. The code uses `tcx.short_string` already to get the normal path, which tries to be clever around trimming paths if necessary, so there is no reason for this extra force trimming.
2025-05-24Auto merge of #141518 - GuillaumeGomez:rollup-ivjep2j, r=GuillaumeGomezbors-112/+155
Rollup of 6 pull requests Successful merges: - rust-lang/rust#140066 (Stabilize `<[T; N]>::as_mut_slice` as `const`) - rust-lang/rust#141105 (additional edge cases tests for `path.rs` 🧪 ) - rust-lang/rust#141487 (Update askama to `0.14.0`) - rust-lang/rust#141498 (Use C-string literals to reduce boilerplate) - rust-lang/rust#141505 (rename internal panicking::try to catch_unwind) - rust-lang/rust#141511 (Cleanup CodegenFnAttrFlags) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-24Rollup merge of #141511 - Noratrieb:codegen-fn-attrs, r=compiler-errorsGuillaume Gomez-34/+31
Cleanup CodegenFnAttrFlags - Rename `USED` to `USED_COMPILER` to better reflect its behavior. - Reorder some items to group the used and allocator flags together - Renumber them without gaps
2025-05-24Rollup merge of #141505 - RalfJung:catch_unwind, r=NoratriebGuillaume Gomez-28/+28
rename internal panicking::try to catch_unwind The public function is called `catch_unwind`, the intrinsic at some point got renamed to `catch_unwind` -- there's no reason to have the internal implementation of this still be called `try`, so let's rename it to match the rest.
2025-05-24Rollup merge of #141498 - tamird:cstr-example-noise, r=jhprattGuillaume Gomez-34/+7
Use C-string literals to reduce boilerplate Reduce boilerplate in doctests by replacing fallible function calls with literals.
2025-05-24Rollup merge of #141487 - GuillaumeGomez:update-askama, r=notriddleGuillaume Gomez-15/+57
Update askama to `0.14.0` [Askama 0.14.0 release notes](https://github.com/askama-rs/askama/releases/tag/v0.14.0) Just one change needed for a filter in rustdoc. r? ```@notriddle```
2025-05-24Rollup merge of #141105 - GrantBirki:grantbirki/path-tests, r=jhprattGuillaume Gomez-0/+31
additional edge cases tests for `path.rs` 🧪 This pull request adds a few new edge case tests to the `std::path` module. The new tests cover scenarios such as paths with only separators, non-ASCII and Unicode characters, embedded new lines, etc. Each new test is documented with some helpful in-line comments as well.
2025-05-24Rollup merge of #140066 - thaliaarchi:const-array-as-mut-slice, r=jhprattGuillaume Gomez-1/+1
Stabilize `<[T; N]>::as_mut_slice` as `const` This is trivial and has no design questions. Tracked in https://github.com/rust-lang/rust/issues/133333. r? libs-api
2025-05-24Cleanup CodegenFnAttrFlagsNoratrieb-34/+31
- Rename `USED` to `USED_COMPILER` to better reflect its behavior. - Reorder some items to group the used and allocator flags together - Renumber them without gaps
2025-05-24Auto merge of #141372 - khuey:ir_call_dbg_loc, r=jieyouxubors-0/+48
Use the fn_span when emitting function calls for better debug info. This especially improves the developer experience for long chains of function calls that span multiple lines, which is common with builder patterns, chains of iterator/future combinators, etc. try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: arm-android r? `@jieyouxu`
2025-05-24rename internal panicking::try to catch_unwindRalf Jung-28/+28
2025-05-24Auto merge of #141506 - matthiaskrgr:rollup-80f1geg, r=matthiaskrgrbors-296/+451
Rollup of 6 pull requests Successful merges: - #137323 (Guarantee behavior of transmuting `Option::<T>::None` subject to NPO) - #139254 (std: sys: net: uefi: Implement TCP4 connect) - #141432 (refactor `CanonicalVarKind`) - #141480 (document some -Z flags as living in the rustc-dev-guide) - #141486 (rustdoc book: add argument explanation for `html_playground_url`) - #141496 (Enable `[issue-links]` and `[no-mentions]` in triagebot) r? `@ghost` `@rustbot` modify labels: rollup