about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-28Move ___asan_globals_registered exportbjorn3-6/+4
All other sanitizer symbols are handled in prepare_lto already.
2025-08-28Only export the sanitizer symbols for LTO and move export code to cg_llvmbjorn3-48/+29
Don't export them from cdylibs. There is no need to do so and it complicates exported_non_generic_symbols. In addition the GCC backend likely uses different symbols and may potentially not even need us to explicitly tell it to export the symbols it needs.
2025-08-28dates(types,traits): refresh date-check annotations for Aug/2025-08; ↵Ali Nazzal-9/+9
preserve local style
2025-08-28dates(queries): refresh date-check annotations to 2025-08; preserve local styleAli Nazzal-3/+3
2025-08-28fix(lexer): Don't require frontmatters to be escaped with indented fencesEd Page-74/+51
The RFC only limits hyphens at the beginning of lines and not if they are indented or embedded in other content. Sticking to that approach was confirmed by the T-lang liason at https://github.com/rust-lang/rust/issues/141367#issuecomment-3202217544 There is a regression in error message quality which I'm leaving for someone if they feel this needs improving.
2025-08-28compiler: Include span of too huge enum with -Cdebuginfo=2Martin Nordholts-10/+33
We have a ui test to ensure we emit an error if we encounter too big enums. Before this fix, compiling the test with `-Cdebuginfo=2` would not include the span of the instantiation site, because the error is then emitted from a different code path that does not include the span. Propagate the span to the error also in the debuginfo case, so the test passes regardless of debuginfo level.
2025-08-28Clarify that align_offset overalignsgonzalobg-3/+2
The current documentation is not clear whether adding `a` to a pointer overaligns (align up) or underaligns (align down). It should say this explicitly.
2025-08-28Update uitest stderrJonathan Brouwer-50/+4
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-28Improve error messages around invalid literals in attribute argumentsJonathan Brouwer-35/+52
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-28Add another case to the bad-lit-suffixes testJonathan Brouwer-1/+23
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-28Auto merge of #145807 - zachs18:only-consider-auto-traits-empty, ↵bors-1/+167
r=compiler-errors When determining if a trait has no entries for the purposes of omitting vptrs from subtrait vtables, consider its transitive supertraits' entries, instead of just its own entries. When determining if a non-first supertrait vptr can be omitted from a subtrait vtable, check if the supertrait or any of its (transitive) supertraits have methods, instead of only checking if the supertrait itself has methods. This fixes the soundness issue where a vptr would be omitted for a supertrait with no methods but that itself had a supertrait with methods, while still optimizing the case where the supertrait is "truly" empty (it has no own vtable entries, and none of its (transitive) supertraits have any own vtable entries). Fixes <https://github.com/rust-lang/rust/issues/145752> ----- Old description: ~~Treat all non-auto traits as non-empty (possibly having methods) for purposes of determining if we need to emit a vptr for a non-direct supertrait (and for new "sibling" entries after a direct or non-direct supertrait).~~ This fixes (I believe) the soundness issue, ~~but regresses vtable sizes and possibly upcasting perf in some cases when using trait hierarchies with empty non-auto traits (see `tests/ui/traits/vtable/multiple-markers.stderr`) since we use vptrs in some cases where we could re-use the vtable.~~ Fixes <https://github.com/rust-lang/rust/issues/145752> Re-opens (not anymore) <https://github.com/rust-lang/rust/issues/114942> Should not affect <https://github.com/rust-lang/rust/issues/131813> (i.e. the soundness issue is still fixed, ~~though the relevant vtables in the `trait Evil` example will be larger now~~) cc implementation history <https://github.com/rust-lang/rust/pull/131864> <https://github.com/rust-lang/rust/pull/113856> ----- ~~It should be possible to check if a trait has any methods from itself *or* supertraits (instead of just from itself), but to fix the immediate soundness issue, just assume any non-auto trait could have methods. A more optimistic check can be implemented later (or if someone does it soon it could just supercede this PR :smile:).~~ Done in latest push `@rustbot` label A-dyn-trait F-trait_upcasting
2025-08-28Merge pull request #20561 from ChayimFriedman2/no-table-for-youChayim Refael Friedman-59/+52
minor: Don't require a full `InferenceTable` for `CastTy`
2025-08-28Add ui test for unsupported `doc(attribute = "...")` case for attributes ↵Guillaume Gomez-0/+18
with namespace
2025-08-28Create new `Item::is_fake_item` method as equivalent to check for ↵Guillaume Gomez-23/+58
`is_primitive`, `is_keyword` and `is_attribute` methods
2025-08-28Add documentation for `doc(attribute = "...")` attributeGuillaume Gomez-1/+18
2025-08-28Don't require a full `InferenceTable` for `CastTy`Chayim Refael Friedman-59/+52
A DB is enough.
2025-08-28dates(infra): refresh date-check annotations for Aug 2025; preserve local styleAli Nazzal-12/+12
2025-08-28Add progress bars to more places in analysis-statsChayim Refael Friedman-3/+52
Namely, mir lowering, const eval and IDE things.
2025-08-28Fix `print_literal` suggests wrongly for inline literal following a numbered ↵Samuel Tardieu-10/+68
arg (#15583) Closes rust-lang/rust-clippy#15576 changelog: [`numbered arg`] fix wrong suggestions for inline literal following a numbered arg
2025-08-28fix: `print_literal` suggests wrongly for inline literal following a ↵yanglsh-10/+68
numbered arg
2025-08-28Add tests for `doc(attribute = "...")` attributeGuillaume Gomez-5/+135
2025-08-28Add new `doc(attribute = "...")` attributeGuillaume Gomez-47/+168
2025-08-28Auto merge of #145958 - Zalathar:rollup-ii9z77c, r=Zalatharbors-1712/+2182
Rollup of 9 pull requests Successful merges: - rust-lang/rust#142727 (wasm: rm static mut) - rust-lang/rust#143193 (Port `#[link]` to the new attribute parsing infrastructure ) - rust-lang/rust#144864 (No source fixes) - rust-lang/rust#145913 (Add spin_loop hint for LoongArch) - rust-lang/rust#145926 (compiletest: Remove several remnants of the old libtest-based executor) - rust-lang/rust#145928 (Rename `Location::file_with_nul` to `file_as_c_str`) - rust-lang/rust#145930 (`const`ify (the unstable) `str::as_str`) - rust-lang/rust#145941 (Disable `integer_to_ptr_transmutes` suggestion for unsized types) - rust-lang/rust#145953 (Update `icu_list` to 2.0) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-28`map_identity`: suggest making the variable mutable when necessary (#15268)Timo-50/+148
While working on rust-lang/rust-clippy#15229, I noticed a test case in `map_identity` which avoids linting in the case where removing the `.map()` would require the iterator variable to be made mutable. But then I saw rust-lang/rust-clippy#14140, and thought I'd try to adapt its approach, by suggesting both removing the `.map()` _and_ making the variable mutable. This is WIP only because I'm not sure about the very last `diag.span_note` -- I think having a method chained immediately after the `.map()` is the only case which requires adding `mut`, so it should be safe to say that `method_requiring_mut` is always `Some`. I'd like to do a lintcheck run to see if that's actually true. @samueltardieu do you think this is a good approach? Maybe there are more lints where we could lint + suggest making the variable mut, instead of not linting? changelog:`map_identity`: suggest making the variable mutable when necessary
2025-08-28Merge pull request #4539 from Stypox/tracing-docsRalf Jung-0/+292
Add documentation for tracing
2025-08-28Rollup merge of #145953 - robertbastian:master, r=ManishearthStuart Cook-442/+193
Update `icu_list` to 2.0 This updates the `icu_list` crate, which is used for error formatting, from 1.5 to 2.0.
2025-08-28Rollup merge of #145941 - Urgau:int_to_ptr_transmutes-unsized, r=lcnrStuart Cook-13/+69
Disable `integer_to_ptr_transmutes` suggestion for unsized types This PR disables the machine-applicable `integer_to_ptr_transmutes` lint suggestion for unsized types, as [`std::ptr::with_exposed_provenance`](https://doc.rust-lang.org/std/ptr/fn.with_exposed_provenance.html) requires sized types. We should probably mention [`std::ptr::from_raw_parts`](https://doc.rust-lang.org/std/ptr/fn.from_raw_parts.html) when it becomes stable. Related to https://github.com/rust-lang/rust/issues/145935
2025-08-28Rollup merge of #145930 - GrigorenkoPV:const_str_as_str, r=joshtriplettStuart Cook-1/+1
`const`ify (the unstable) `str::as_str` Tracking issue: rust-lang/rust#130366 The method was not initially marked `const` presumably because it is only useful with `Deref`. But now that const traits seem to be a thing that can actually become real, why not make it `const`? PR `const`ifying `Deref`: rust-lang/rust#145279
2025-08-28Rollup merge of #145928 - Darksonn:file_as_c_str, r=joshtriplettStuart Cook-5/+5
Rename `Location::file_with_nul` to `file_as_c_str` This renames the method to be consistent with the ongoing T-libs-api FCP found at https://github.com/rust-lang/rust/issues/141727#issuecomment-3228016708. I did not rename the unstable feature as we are going to be stabilizing it soon anyway. This will probably break RfL, so it will require an updated commit hash for the Linux Kernel that I will add here soon. r? `@Amanieu`
2025-08-28Rollup merge of #145926 - Zalathar:no-libtest, r=jieyouxuStuart Cook-90/+53
compiletest: Remove several remnants of the old libtest-based executor I noticed a few bits of low-hanging cleanup that are possible now that the non-libtest executor is well and truly established.
2025-08-28Rollup merge of #145913 - heiher:loong-hint, r=joshtriplettStuart Cook-33/+23
Add spin_loop hint for LoongArch
2025-08-28Rollup merge of #144864 - Muscraft:no-source-fixes, r=jieyouxuStuart Cook-43/+128
No source fixes This PR started as a fix for a rendering bug that [got noticed in #143661](https://github.com/rust-lang/rust/pull/143661#discussion_r2199109530), but turned into a fix for any rendering bugs related to files with no source. - Don't add an end column separator after a file with no source - Add column separator before secondary messages with no source - Render continuation between no source labels Before ``` error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap` ╭▸ $DIR/multi-suggestion.rs:17:13 │ LL │ let _ = std::collections::HashMap(); │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ╭▸ $SRC_DIR/std/src/collections/hash/map.rs:LL:COL │ ╰ note: `std::collections::HashMap` defined here ╰╴ note: constructor is not visible here due to private fields ╭▸ $SRC_DIR/alloc/src/boxed.rs:LL:COL │ ╰ note: private field │ ╰ note: private field ``` After ``` error[E0423]: expected function, tuple struct or tuple variant, found struct `std::collections::HashMap` ╭▸ $DIR/multi-suggestion.rs:17:13 │ LL │ let _ = std::collections::HashMap(); │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━ ╰╴ ╭▸ $SRC_DIR/std/src/collections/hash/map.rs:LL:COL │ ╰ note: `std::collections::HashMap` defined here note: constructor is not visible here due to private fields ╭▸ $SRC_DIR/alloc/src/boxed.rs:LL:COL │ ├ note: private field │ ╰ note: private field ``` Note: This PR also makes it so `rustc` and `annotate-snippets` match in these cases
2025-08-28Rollup merge of #143193 - JonathanBrouwer:link_rework, r=jdonszelmannStuart Cook-1078/+1700
Port `#[link]` to the new attribute parsing infrastructure Ports `link` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
2025-08-28Rollup merge of #142727 - hkBst:rm-static-mut-wasm, r=ChrisDentonStuart Cook-7/+10
wasm: rm static mut More https://github.com/rust-lang/rust/issues/125035. I'm not sure this is correct, but it compiles.
2025-08-28Add documentation for tracingStypox-0/+292
2025-08-28Add `rustc-demangle` to `[workspace.dependencies]`.Nicholas Nethercote-3/+4
2025-08-28Add `polonius-engine` to `[workspace.dependencies]`.Nicholas Nethercote-3/+4
2025-08-28Add `odht` to `[workspace.dependencies]`.Nicholas Nethercote-2/+3
2025-08-28Add `scoped-tls` to `[workspace.dependencies]`.Nicholas Nethercote-3/+4
2025-08-28Add `measureme` to `[workspace.dependencies]`.Nicholas Nethercote-3/+4
2025-08-28Add `derive-where` to `[workspace.dependencies]`.Nicholas Nethercote-3/+4
2025-08-28Add `rustc-hash` to `[workspace.dependencies]`.Nicholas Nethercote-5/+6
2025-08-28Add `indexmap` to `[workspace.dependencies]`.Nicholas Nethercote-7/+8
2025-08-28Add `tempfile` to `[workspace.dependencies]`.Nicholas Nethercote-8/+9
2025-08-28Add `rustc_apfloat` to `[workspace.dependencies]`.Nicholas Nethercote-4/+5
2025-08-28Add `proc-macro2` and `quote` to `[workspace.dependencies]`.Nicholas Nethercote-8/+10
2025-08-28Add `either` to `[workspace.dependencies]`.Nicholas Nethercote-5/+6
2025-08-28Add `serde_json` to `[workspace.dependencies]`.Nicholas Nethercote-18/+19
2025-08-28Add `libc` to `[workspace.dependencies]`.Nicholas Nethercote-12/+13
2025-08-28Add an overlooked `tracing` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1