about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-04-27name ATOMIC_INIT without unstable aliasChristopher Durham-3/+3
2025-04-27use generic Atomic type where possibleChristopher Durham-268/+279
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2025-04-27add generic Atomic<T> type aliasChristopher Durham-0/+94
2025-04-26Auto merge of #140336 - matthiaskrgr:rollup-kxo6ljw, r=matthiaskrgrbors-316/+573
Rollup of 6 pull requests Successful merges: - #140215 (transmutability: Support char, NonZeroXxx) - #140226 (Update wasm-component-ld to 0.5.13) - #140317 (Remove redundant check) - #140318 (Simply try to unpeel AsyncFnKindHelper goal in `emit_specialized_closure_kind_error`) - #140320 (replace `GenericArg` with `Term` where applicable) - #140325 (Grammar fixes for BufRead::has_data_left docs) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-26Rollup merge of #140325 - ↵Matthias Krüger-2/+2
ethanwu10:ethanwu10/grammar-fixes-for-bufread-has-data-left-docs, r=jhpratt Grammar fixes for BufRead::has_data_left docs Fix some grammar in the documentation for `BufRead::has_data_left`
2025-04-26Rollup merge of #140320 - lcnr:wf-use-term, r=compiler-errorsMatthias Krüger-174/+189
replace `GenericArg` with `Term` where applicable r? types
2025-04-26Rollup merge of #140318 - compiler-errors:specialized-async-fn-kind-err, ↵Matthias Krüger-31/+53
r=fee1-dead Simply try to unpeel AsyncFnKindHelper goal in `emit_specialized_closure_kind_error` Tweak the handling of `AsyncFnKindHelper` goals in `emit_specialized_closure_kind_error` to not be so special-casey, and just try to unpeel one or two layers of obligation causes to get to their underlying `AsyncFn*` goal. Fixes https://github.com/rust-lang/rust/issues/140292
2025-04-26Rollup merge of #140317 - mejrs:check_on_uni, r=compiler-errorsMatthias Krüger-1/+0
Remove redundant check We still check for `rustc_on_unimplemented` on implementations, but this functionality was removed in https://github.com/rust-lang/rust/pull/139091, since then it always returns `Ok` when called with a non-trait defid. https://github.com/rust-lang/rust/blob/b4c8b0c3f0533bb342a4873ff59bdad3883ab8e3/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs#L557-L564
2025-04-26Rollup merge of #140226 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-62/+27
Update wasm-component-ld to 0.5.13 This commit updates the vendored `wasm-component-ld` binary to 0.5.13 which includes some various bug fixes and new feature updates for upcoming component model features coming down the pike. Not expected to break any existing workflows, just a normal update.
2025-04-26Rollup merge of #140215 - joshlf:transmutability-char-nonzero, r=jswrennMatthias Krüger-46/+302
transmutability: Support char, NonZeroXxx Note that `NonZero` support is not wired up, as the author encountered bugs while attempting this. A future commit will wire up `NonZero` support. r? ````@jswrenn````
2025-04-25Grammar fixes for BufRead::has_data_left docsEthan Wu-2/+2
2025-04-26Auto merge of #140324 - matthiaskrgr:rollup-jlzvdre, r=matthiaskrgrbors-139/+526
Rollup of 8 pull requests Successful merges: - #139865 (Stabilize proc_macro::Span::{start,end,line,column}.) - #140086 (If creating a temporary directory fails with permission denied then retry with backoff) - #140216 (Document that "extern blocks must be unsafe" in Rust 2024) - #140253 (Add XtensaAsmPrinter) - #140272 (Improve error message for `||` (or) in let chains) - #140305 (Track per-obligation recursion depth only if there is inference in the new solver) - #140306 (handle specialization in the new trait solver) - #140308 (stall generator witness obligations: add regression test) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-26Rollup merge of #140308 - lcnr:add-ui-test, r=compiler-errorsMatthias Krüger-0/+25
stall generator witness obligations: add regression test fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/180 r? ```@compiler-errors```
2025-04-26Rollup merge of #140306 - lcnr:specialization-new, r=compiler-errorsMatthias Krüger-51/+290
handle specialization in the new trait solver fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/187 also fixes the regression in `plonky2_field` from https://github.com/rust-lang/trait-system-refactor-initiative/issues/188 cc https://github.com/rust-lang/rust/pull/111994 r? ```@compiler-errors```
2025-04-26Rollup merge of #140305 - compiler-errors:coerce-loop, r=lcnrMatthias Krüger-8/+46
Track per-obligation recursion depth only if there is inference in the new solver Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit. This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls. fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/186 r? lcnr
2025-04-26Rollup merge of #140272 - Kivooeo:new-fix-four, r=est31Matthias Krüger-63/+100
Improve error message for `||` (or) in let chains **Description** This PR improves the error message when using `||` in an if let chain expression, addressing #140263. **Changes** 1. Creates a dedicated error message specifically for `||` usage in let chains 2. Points the primary span directly at the `||` operator 3. Removes confusing secondary notes about "let statements" and unsupported contexts 5. Adds UI tests verifying the new error message and valid cases **Before** ```rust error: expected expression, found let statement --> src/main.rs:2:8 | 2 | if let true = true || false {} | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of if and while expressions note: || operators are not supported in let chain expressions --> src/main.rs:2:24 | 2 | if let true = true || false {} | ``` **After** ```rust error: `||` operators are not supported in let chain conditions --> src/main.rs:2:24 | 2 | if let true = true || false {} | ^^ ``` **Implementation details** 1. Added new `OrInLetChain` diagnostic in errors.rs 2. Modified `CondChecker` in expr.rs to prioritize the `||` error 3. Updated fluent message definitions to use clearer wording **Related issue** Fixes #140263 cc ```@ehuss``` (issue author)
2025-04-26Rollup merge of #140253 - SergioGasquez:feat/xtensa-asm-printer, r=cuviperMatthias Krüger-0/+1
Add XtensaAsmPrinter See https://github.com/rust-lang/rust/pull/133601. The PR was closed because it required LLVM 19 in CI added with (https://github.com/rust-lang/rust/commit/12167d7064597993355e41d3a8c20654bccaf0be)
2025-04-26Rollup merge of #140216 - t5kd:master, r=tgross35Matthias Krüger-2/+6
Document that "extern blocks must be unsafe" in Rust 2024 The [documentation on `extern`](https://doc.rust-lang.org/std/keyword.extern.html) contains the following code sample: ```rust #[link(name = "my_c_library")] extern "C" { fn my_c_function(x: i32) -> bool; } ``` Due to #123743, attempting to compile such code with the 2024 edition of Rust fails: ``` error: extern blocks must be unsafe ``` This PR extends the `extern` documentation with a brief explanation of the new requirement. It also adds the missing `unsafe` keyword to the code sample, which should be compatible with rustc since v1.82. **Related docs:** - https://doc.rust-lang.org/reference/items/external-blocks.html - https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.html
2025-04-26Rollup merge of #140086 - ChrisDenton:backoff, r=petrochenkovMatthias Krüger-11/+54
If creating a temporary directory fails with permission denied then retry with backoff On Windows, if creating a temporary directory fails with permission denied then use a retry/backoff loop. This hopefully fixes a recuring error in our CI. cc ```@jieyouxu,``` https://github.com/rust-lang/rust/issues/133959
2025-04-26Rollup merge of #139865 - m-ou-se:stabilize-proc-macro-span-location, r=tgross35Matthias Krüger-4/+4
Stabilize proc_macro::Span::{start,end,line,column}. This stabilizes part of https://github.com/rust-lang/rust/issues/54725 Specifically, the part related to getting the location of a span: ```rust impl Span { pub fn start(&self) -> Span; // Empty span at the start of this span pub fn end(&self) -> Span; // Empty span at the end of this span pub fn line(&self) -> usize; // Line where the span starts pub fn column(&self) -> usize; // Column where the span starts } ``` History of this part of the API: Originally, `start` and `end` returned a `LineColumn` struct (containing the line and column). This has been simplified/changed: - No more `LineColumn`: `Span` now directly has `.line()` and `.column()` methods. This means we can easily add `.byte_offset()` or `.byte_range()` in the future if we want to. - `Span::start()` and `Span::end()` are now the equivalent of rustc's internal `shrink_to_lo()` and `shrink_to_hi()`. This means you can do e.g. `span.end().column()`, removing the need for a `span.end_column()` or similar.
2025-04-26remove unnecessary matchlcnr-20/+9
2025-04-26convert some `GenericArg` to `Term`lcnr-154/+180
2025-04-26Auto merge of #140177 - tmandry:compiletest-par, r=jieyouxubors-40/+62
[compiletest] Parallelize test discovery Certain filesystems are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
2025-04-26Simply try to unpeel AsyncFnKindHelper goal in ↵Michael Goulet-31/+53
emit_specialized_closure_kind_error
2025-04-26Remove redundant checkmejrs-1/+0
2025-04-25Auto merge of #140295 - antoyo:subtree-update_cg_gcc_2025-04-25, ↵bors-39/+46
r=GuillaumeGomez Subtree update cg_gcc 2025/04/25 r? GuillaumeGomez
2025-04-25Update `extern` docs for Rust 2024 and add safety remarksTobias-2/+6
2025-04-25transmutability: Support char, NonZeroXxxJoshua Liebow-Feeser-46/+302
Note that `NonZero` support is not wired up, as the author encountered bugs while attempting this. A future commit will wire up `NonZero` support.
2025-04-25add regression testlcnr-0/+25
2025-04-25Auto merge of #140298 - matthiaskrgr:rollup-5tc1gvb, r=matthiaskrgrbors-168/+317
Rollup of 8 pull requests Successful merges: - #137683 (Add a tidy check for GCC submodule version) - #138968 (Update the index of Result to make the summary more comprehensive) - #139572 (docs(std): mention const blocks in const keyword doc page) - #140152 (Unify the format of rustc cli flags) - #140193 (fix ICE in `#[naked]` attribute validation) - #140205 (Tidying up UI tests [2/N]) - #140284 (remove expect() in `unnecessary_transmutes`) - #140290 (rustdoc: fix typo change from equivelent to equivalent) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-25Track per-obligation recursion depth only if there is inferenceMichael Goulet-8/+46
2025-04-25handle specialization in the new trait solverlcnr-51/+290
uwu :3
2025-04-25Auto merge of #139756 - Zoxc:out-of-order-dep-graph, r=oli-obkbors-43/+215
Allow out of order dep graph node encoding This allows out of order dep graph node encoding by also encoding the index instead of using the file node order as the index. `MemEncoder` is also brought back to life and used for encoding. Both of these are done to enable thread-local encoding of dep graph nodes. This is based on https://github.com/rust-lang/rust/pull/139636.
2025-04-25Rollup merge of #140290 - styvane:patch0001-fix-typo-in-rusdoc-search, ↵Matthias Krüger-1/+1
r=GuillaumeGomez rustdoc: fix typo change from equivelent to equivalent This PR fixes a typo in the search section in `rustdoc` book.
2025-04-25Rollup merge of #140284 - bend-n:fix-expectation-unmet, r=jieyouxuMatthias Krüger-5/+22
remove expect() in `unnecessary_transmutes` removes expect() from #136083 and fixes #140277 includes regression test r? lcnr
2025-04-25Rollup merge of #140205 - reddevilmidzy:clean-up-test, r=jieyouxuMatthias Krüger-41/+44
Tidying up UI tests [2/N] Part of #133895 Moved the location of the tests that were in `tests/ui` and added descriptions! I'll squash before merge! r? jieyouxu
2025-04-25Rollup merge of #140193 - folkertdev:fix-issue-140082, r=jdonszelmannMatthias Krüger-3/+33
fix ICE in `#[naked]` attribute validation fixes https://github.com/rust-lang/rust/issues/140082 The comment here https://github.com/rust-lang/rust/pull/139615/files#r2040684192 is relevant, a better way to print the full path would be nice. If there's an issue I should `FIXME` this with let me know. r? `@jdonszelmann` cc `@nnethercote` https://github.com/rust-lang/rust/pull/139615
2025-04-25Rollup merge of #140152 - xizheyin:issue-140102, r=jieyouxuMatthias Krüger-115/+130
Unify the format of rustc cli flags As mentioned in #140102, I unified the format of rustc CLI flags. I use the following rules: 1. `<param>`: Indicates a required parameter 2. `[param]`: Indicates an optional parameter 3. `|`: Indicates a mutually exclusive option 4. `*`: a list element with description Current output: ```bash Usage: rustc [OPTIONS] INPUT Options: -h, --help Display this message --cfg <SPEC> Configure the compilation environment. SPEC supports the syntax `<NAME>[="<VALUE>"]`. --check-cfg <SPEC> Provide list of expected cfgs for checking -L [<KIND>=]<PATH> Add a directory to the library search path. The optional KIND can be one of <dependency|crate|native|framework|all> (default: all). -l [<KIND>[:<MODIFIERS>]=]<NAME>[:<RENAME>] Link the generated crate(s) to the specified native library NAME. The optional KIND can be one of <static|framework|dylib> (default: dylib). Optional comma separated MODIFIERS <bundle|verbatim|whole-archive|as-needed> may be specified each with a prefix of either '+' to enable or '-' to disable. --crate-type <bin|lib|rlib|dylib|cdylib|staticlib|proc-macro> Comma separated list of types of crates for the compiler to emit --crate-name <NAME> Specify the name of the crate being built --edition <2015|2018|2021|2024|future> Specify which edition of the compiler to use when compiling code. The default is 2015 and the latest stable edition is 2024. --emit <TYPE>[=<FILE>] Comma separated list of types of output for the compiler to emit. Each TYPE has the default FILE name: * asm - CRATE_NAME.s * llvm-bc - CRATE_NAME.bc * dep-info - CRATE_NAME.d * link - (platform and crate-type dependent) * llvm-ir - CRATE_NAME.ll * metadata - libCRATE_NAME.rmeta * mir - CRATE_NAME.mir * obj - CRATE_NAME.o * thin-link-bitcode - CRATE_NAME.indexing.o --print <INFO>[=<FILE>] Compiler information to print on stdout (or to a file) INFO may be one of <all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models>. -g Equivalent to -C debuginfo=2 -O Equivalent to -C opt-level=3 -o <FILENAME> Write output to FILENAME --out-dir <DIR> Write output to compiler-chosen filename in DIR --explain <OPT> Provide a detailed explanation of an error message --test Build a test harness --target <TARGET> Target triple for which the code is compiled -A, --allow <LINT> Set lint allowed -W, --warn <LINT> Set lint warnings --force-warn <LINT> Set lint force-warn -D, --deny <LINT> Set lint denied -F, --forbid <LINT> Set lint forbidden --cap-lints <LEVEL> Set the most restrictive lint level. More restrictive lints are capped at this level -C, --codegen <OPT>[=<VALUE>] Set a codegen option -V, --version Print version info and exit -v, --verbose Use verbose output Additional help: -C help Print codegen options -W help Print 'lint' options and default settings -Z help Print unstable compiler options --help -v Print the full set of options rustc accepts ```
2025-04-25Rollup merge of #139572 - ↵Matthias Krüger-1/+8
ismailarilik:docs/std/mention-const-blocks-in-const-keyword-doc-page, r=tgross35 docs(std): mention const blocks in const keyword doc page Aims to close #139549
2025-04-25Rollup merge of #138968 - Natural-selection1:update-Result-doc, r=AmanieuMatthias Krüger-2/+30
Update the index of Result to make the summary more comprehensive fix #138966 This PR and #138957 are twin PR r? `@Amanieu`
2025-04-25Rollup merge of #137683 - Kobzol:tidy-gcc-submodule, r=GuillaumeGomezMatthias Krüger-0/+49
Add a tidy check for GCC submodule version To make sure that it stays in sync with the required GCC version of the GCC codegen backend. The check should succeed on CI, although it will fail after https://github.com/rust-lang/rust/pull/137660, until the next GCC sync. r? `@GuillaumeGomez`
2025-04-25Merge commit '4f83a4258deb99f3288a7122c0d5a78200931c61' into ↵Antoni Boucher-39/+46
subtree-update_cg_gcc_2025-04-25
2025-04-25Merge pull request #652 from rust-lang/sync_from_rust_2025_04_25_2antoyo-64/+68
Sync from rust 2025/04/25
2025-04-25Fix testAntoni Boucher-0/+1
2025-04-25Fix clippy warningsAntoni Boucher-38/+38
2025-04-25Update to nightly-2025-04-25Antoni Boucher-1/+1
2025-04-25Merge branch 'master' into sync_from_rust_2025_04_25_2Antoni Boucher-0/+30
2025-04-25Auto merge of #140282 - matthiaskrgr:rollup-g6ze4jj, r=matthiaskrgrbors-1515/+1410
Rollup of 8 pull requests Successful merges: - #137653 (Deprecate the unstable `concat_idents!`) - #138957 (Update the index of Option to make the summary more comprehensive) - #140006 (ensure compiler existance of tools on the dist step) - #140143 (Move `sys::pal::os::Env` into `sys::env`) - #140202 (Make #![feature(let_chains)] bootstrap conditional in compiler/) - #140236 (norm nested aliases before evaluating the parent goal) - #140257 (Some drive-by housecleaning in `rustc_borrowck`) - #140278 (Don't use item name to look up associated item from trait item) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-25remove expect() in unnecessary_transmutesbendn-5/+22
2025-04-25resolved conflictKivooeo-63/+100