about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-06-28librustdoc: remove unneeded `#[allow]`sYotam Ofek-3/+0
2025-06-28Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlinbors-1/+1
Insert checks for enum discriminants when debug assertions are enabled Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following: ```rust let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) }; ``` An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++. This check is similar to Miri's capabilities of checking for valid construction of enum values. This PR is inspired by saethlin@'s PR https://github.com/rust-lang/rust/pull/104862. Thank you so much for keeping this code up and the detailed comments! I also pair-programmed large parts of this together with vabr-g@. r? `@saethlin`
2025-06-28Merge pull request #2481 from xizheyin/submit-in-rdg-or-rTshepang Mbambo-0/+4
Explain where rdg changes should be submitted
2025-06-28move all the message types into one placeRalf Jung-31/+31
2025-06-28de-intend some code, and extend commentsRalf Jung-111/+112
2025-06-28various minor native-lib-tracing tweaks, and disable naive-lib-tracing mode ↵Ralf Jung-206/+165
by default
2025-06-28ci: Fix up release workflowLukas Wirth-5/+9
2025-06-28Add a link to rust-forge to explain where rdg changes should be submittedxizheyin-0/+4
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-28ci: Cancel workflow only after the main matrix has finishedLukas Wirth-15/+19
2025-06-28clippyRalf Jung-10/+8
2025-06-28fmtThe Miri Cronjob Bot-4/+2
2025-06-28Merge from rustcThe Miri Cronjob Bot-4020/+9058
2025-06-28Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-27Auto merge of #143116 - matthiaskrgr:rollup-zy9ez06, r=matthiaskrgrbors-31/+31
Rollup of 9 pull requests Successful merges: - rust-lang/rust#139858 (New const traits syntax) - rust-lang/rust#140809 (Reduce special casing for the panic runtime) - rust-lang/rust#142730 (suggest declaring modules when file found but module not defined) - rust-lang/rust#142806 (Normalize before computing ConstArgHasType goal in new solver) - rust-lang/rust#143046 (const validation: properly ignore zero-sized UnsafeCell) - rust-lang/rust#143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - rust-lang/rust#143096 (tag_for_variant: properly pass TypingEnv) - rust-lang/rust#143104 (hir_analysis: prohibit `dyn PointeeSized`) - rust-lang/rust#143106 (gce: don't ICE on non-local const) Failed merges: - rust-lang/rust#143036 (Remove support for `dyn*` from the compiler) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-27Fix rustdoc not correctly showing attributes with re-exportsJonathan Brouwer-1/+2
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-27Rollup merge of #143046 - RalfJung:zst-unsafe-cell, r=lcnr,oli-obkMatthias Krüger-4/+4
const validation: properly ignore zero-sized UnsafeCell Fixes https://github.com/rust-lang/rust/issues/142948 r? `@oli-obk`
2025-06-27Rollup merge of #140809 - bjorn3:panic_runtime_cleanup, r=petrochenkovMatthias Krüger-1/+2
Reduce special casing for the panic runtime See the individual commits for more info.
2025-06-27Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-deadMatthias Krüger-26/+25
New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-27Auto merge of #143064 - flip1995:clippy-subtree-update, r=GuillaumeGomezbors-844/+3161
Clippy subtree update r? `@Manishearth` Cargo.lock update due to version bump
2025-06-27Update dangling_pointer_to_raw_pointer.rsleopardracer-1/+1
2025-06-27Update README.mdleopardracer-1/+1
2025-06-27Update ui.rsleopardracer-1/+1
2025-06-27rustdoc: fix attrs of locally reexported foreign itemsbinarycat-11/+24
2025-06-27rustdoc: add regression test for issue 135092binarycat-2/+2
2025-06-27Rollup merge of #142721 - Stypox:tracing-layout-of, r=RalfJungGuillaume Gomez-12/+1
Add tracing to `InterpCx::layout_of()` This PR adds tracing calls to `instantiate_from_frame_and_normalize_erasing_regions` and to `InterpCx::layout_of()`. The latter is done by shadowing `LayoutOf`'s trait method with an inherent method on `InterpCx`. <details><summary>Previous attempt by overriding the `layout_of` query (includes downloadable `.diff` patch)</summary> This PR is meant for Miri, but requires a few changes in `rustc` code, hence why it's here. It adds tracing capabilities to the `layout_of` function in `tcx` by overriding the `layout_of` query (under `local_providers`) with a wrapper that opens a tracing span and then calls the actual `layout_of`. To make this possible, I had to make `rustc_ty_utils::layout::layout_of` public. I added an assert to ensure the `providers.layout_of` value I am replacing is actually `rustc_ty_utils::layout::layout_of`, just in case. I also considered taking the previous value in `providers.layout_of` and calling that one instead, to avoid making `layout_of` public. But then the closure would not be castable to a function pointer anymore (`providers.layout_of` is a function pointer), because it would depend on the local variable storing the previous value of `providers.layout_of`. Using a global variable would work but would rely on `unsafe` or on `Mutex`es, so I wanted to avoid it. Here is some tracing output when Miri is run on `src/tools/miri/tests/pass/hello.rs`, visualizable in https://ui.perfetto.dev: [trace-1750338860374637.json](https://github.com/user-attachments/files/20820392/trace-1750338860374637.json) Another place where I could have added tracing calls is to the `rustc_middle::ty::layout::LayoutCx` struct / `spanned_layout_of()` function, however there is no simple way to disable the tracing calls with compile-time boolean constants there (since `LayoutCx::new()` is used everywhere and referenced directly), and in any case it seems like `spanned_layout_of()` just calls `tcx.layout_of()` anyway. For completeness' sake, here is tracing output for when a tracing call is added to `spanned_layout_of()`: [trace-1750340887920584.json](https://github.com/user-attachments/files/20820609/trace-1750340887920584.json) Patch to override `layout_of` query: [tracing-layout_of-query-override.diff.txt](https://github.com/user-attachments/files/20944497/tracing-layout_of-query-override.diff.txt) </details> **Note: obtaining tracing output depends on https://github.com/rust-lang/miri/pull/4406, but this PR is standalone and can be merged without waiting for https://github.com/rust-lang/miri/pull/4406.** r? `@RalfJung`
2025-06-27Rollup merge of #142270 - lolbinarycat:rustdoc-search-Results-type, ↵Guillaume Gomez-77/+43
r=GuillaumeGomez Rustdoc js: even more typechecking improvements I noticed some oddities when I went to start working on type aliases, so I've gone and cleaned up a bunch of stuff. Notably `fullId` was nearly always an integer in practice, but tsc was being told it should be a string. r? ``@notriddle``
2025-06-27Use `.is_multiple_of()` in bootstrapSamuel Tardieu-1/+3
This makes the intent clear, and silences Clippy.
2025-06-27broken_links: Fix rustdoc API usagePhilipp Krones-1/+1
2025-06-27Merge commit 'c5dbd1de07e0407b9687619a868384d6de06253f' into ↵Philipp Krones-843/+3158
clippy-subtree-update
2025-06-27Workaround missing none group support in builtin macrosLukas Wirth-40/+22
2025-06-27Add InterpCx::layout_of with tracing, shadowing LayoutOfStypox-12/+1
2025-06-27use placeholder_snippetHayashi Mikihiro-15/+46
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-06-27use name_generatorHayashi Mikihiro-6/+21
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-06-27Fix typoxizheyin-11/+11
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-27Insert checks for enum discriminants when debug assertions are enabledBastian Kersting-1/+1
Similar to the existing nullpointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following: ```rust let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) }; ``` An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++. This check is similar to Miri's capabilities of checking for valid construction of enum values. This PR is inspired by saethlin@'s PR https://github.com/rust-lang/rust/pull/104862. Thank you so much for keeping this code up and the detailed comments! I also pair-programmed large parts of this together with vabr-g@.
2025-06-27Split exported_symbols for generic and non-generic symbolsbjorn3-4/+4
This reduces metadata decoder overhead during the monomorphization collector.
2025-06-27Merge pull request #20110 from ChayimFriedman2/ambiguous-floatLukas Wirth-1/+50
fix: Fix completion in when typing `integer.|`
2025-06-27disable caching for cargo commandsbit-aloo-3/+6
2025-06-27move execution context inside exec and prune execution context, use command ↵bit-aloo-353/+345
directly from bootstrap command inside start, and not via as_command_mut
2025-06-27make DeferredCommand a must use and move mark_as_executed inside finish processbit-aloo-1/+4
2025-06-27add caching info on bootstrap commandbit-aloo-6/+4
2025-06-27refactor deferred command and make it compatible with new commandstate, ↵bit-aloo-90/+100
remove extra caching logic from run and re-structure the changes
2025-06-27add new command state in execution contextbit-aloo-0/+11
2025-06-27add do_not_cache method and update the warning on as_command_mutbit-aloo-3/+9
2025-06-27use metadata for command cache key spawning directly from commandbit-aloo-20/+25
2025-06-27add command cache key, move to osstring, add should cache to bootstrap commandbit-aloo-19/+76
2025-06-27add caching fields inside Bootstrap commandbit-aloo-1/+26
2025-06-27Auto merge of #143074 - compiler-errors:rollup-cv64hdh, r=compiler-errorsbors-29/+35
Rollup of 18 pull requests Successful merges: - rust-lang/rust#137843 (make RefCell unstably const) - rust-lang/rust#140942 (const-eval: allow constants to refer to mutable/external memory, but reject such constants as patterns) - rust-lang/rust#142549 (small iter.intersperse.fold() optimization) - rust-lang/rust#142637 (Remove some glob imports from the type system) - rust-lang/rust#142647 ([perf] Compute hard errors without diagnostics in impl_intersection_has_impossible_obligation) - rust-lang/rust#142700 (Remove incorrect comments in `Weak`) - rust-lang/rust#142927 (Add note to `find_const_ty_from_env`) - rust-lang/rust#142967 (Fix RwLock::try_write documentation for WouldBlock condition) - rust-lang/rust#142986 (Port `#[export_name]` to the new attribute parsing infrastructure) - rust-lang/rust#143001 (Rename run always ) - rust-lang/rust#143010 (Update `browser-ui-test` version to `0.20.7`) - rust-lang/rust#143015 (Add `sym::macro_pin` diagnostic item for `core::pin::pin!()`) - rust-lang/rust#143033 (Expand const-stabilized API links in relnotes) - rust-lang/rust#143041 (Remove cache for citool) - rust-lang/rust#143056 (Move an ACE test out of the GCI directory) - rust-lang/rust#143059 (Fix 1.88 relnotes) - rust-lang/rust#143067 (Tracking issue number for `iter_macro`) - rust-lang/rust#143073 (Fix some fixmes that were waiting for let chains) Failed merges: - rust-lang/rust#143020 (codegen_fn_attrs: make comment more precise) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-26Rollup merge of #143073 - yotamofek:pr/fix-let-chains-fixmes, r=compiler-errorsMichael Goulet-3/+3
Fix some fixmes that were waiting for let chains Was inspired by looking at rust-lang/rust#143066 and spotting two fixmes that were missed, so... r? `@compiler-errors` 😅 Yay, let chains!
2025-06-26Rollup merge of #143010 - GuillaumeGomez:update-browser-ui-test, r=KobzolMichael Goulet-1/+1
Update `browser-ui-test` version to `0.20.7` This new version fixes some bugs and improve error messages. r? `````@Kobzol`````