about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-05-27Rollup merge of #140367 - folkertdev:asm-cfg, r=nnethercoteTrevor Gross-2/+1
add `asm_cfg`: `#[cfg(...)]` within `asm!` tracking issue: https://github.com/rust-lang/rust/issues/140364 blocked on: https://github.com/rust-lang/rust/pull/140490 This feature was discussed in https://github.com/rust-lang/rust/issues/140279. It allows configuring templates and operands in the assembly macros, for example: ```rust asm!( // or global_asm! or naked_asm! "nop", #[cfg(target_feature = "sse2")] "nop", // ... #[cfg(target_feature = "sse2")] a = const 123, // only used on sse2 ); ``` r? `@tgross35` cc `@traviscross` `@Amanieu` Now builds on https://github.com/rust-lang/rust/pull/140490, which should be merged first.
2025-05-28fix: Skip pattern analysis on type mismatchesShoyu Vanilla-0/+17
2025-05-27Auto merge of #129658 - saethlin:spare-a-crumb, r=jhprattbors-4/+1
Add some track_caller info to precondition panics Currently, when you encounter a precondition check, you'll always get the caller location of the implementation of the precondition checks. But with this PR, you'll be told the location of the invalid call. Which is useful. I thought of this while looking at https://github.com/rust-lang/rust/pull/129642#issuecomment-2311703898. The changes to `tests/ui/const*` happen because the const-eval interpreter skips `#[track_caller]` frames in its backtraces. The perf implications of this are: * Increased debug binary sizes. The caller_location implementation requires that the additional data we want to display here be stored in const allocations, which are deduplicated but not across crates. There is no impact on optimized build sizes. The panic path and the caller location data get optimized out. * The compile time hit to opt-incr-patched bitmaps happens because the patch changes the line number of some function calls with precondition checks, causing us to go from 0 dirty CGUs to 1 dirty CGU. * The other compile time hits are marginal but real, and due to doing a handful of new queries. Adding more useful data isn't completely free.
2025-05-27Rollup merge of #141645 - klensy:fluent-b, r=jieyouxuMatthias Krüger-1/+1
bump fluent-* crates This bumps fluent-* crates, switching to more up-to-date deps, reducing number of old ones. changelogs is pure refactoring: https://github.com/projectfluent/fluent-rs/blob/fluent-bundle%400.16.0/fluent-bundle/CHANGELOG.md https://github.com/projectfluent/fluent-rs/blob/fluent-bundle%400.16.0/fluent-syntax/CHANGELOG.md
2025-05-27Rollup merge of #141495 - compiler-errors:rename-unpack, r=fmeaseMatthias Krüger-33/+33
Rename `{GenericArg,Term}::unpack()` to `kind()` A well-deserved rename IMO. r? `@oli-obk` or `@lcnr` (or anyone) cc `@rust-lang/types,` but I'd be surprised if this is controversial.
2025-05-27Avoid including text direction codepoints in lint messagesMatthew Jasper-0/+12
2025-05-27Update tests with Range parameter to `BTreeMap::extract_if` etc.Sidney Cammeresi-1/+1
2025-05-27attempt to fix squash on WindowsRalf Jung-1/+22
2025-05-27Rename unpack to kindMichael Goulet-33/+33
2025-05-27bump fluent-* cratesklensy-1/+1
2025-05-27Rollup merge of #141611 - ehuss:update-mdbook, r=Mark-SimulacrumMichael Goulet-3/+3
Update mdbook to 0.4.51 This fixes a silly regression introduced in 0.4.50 that broke the search hotkey (https://github.com/rust-lang/rust/pull/141457). Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0451
2025-05-27Merge pull request #4212 from tiif/setflRalf Jung-8/+262
Support F_GETFL and F_SETFL for fcntl
2025-05-27Make `Semantics<'db, DB>` support `Semantics<'db, dyn HirDatabase>`, by use ↵Vincent Esche-1/+1
of `DB: ?Sized`
2025-05-27Support F_GETFL and F_SETFL for fcntltiif-8/+262
2025-05-27move asm parsing code into `rustc_parse`Folkert de Vries-2/+1
2025-05-27pacify clippyRalf Jung-3/+1
2025-05-27fmtThe Miri Cronjob Bot-2/+8
2025-05-27Merge from rustcThe Miri Cronjob Bot-66/+116
2025-05-27Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-05-27Fix inference of `AsyncFnX` return typeChayim Refael Friedman-11/+81
2025-05-27Reduce `P<T>` to a typedef of `Box<T>`.Nicholas Nethercote-3/+3
Keep the `P` constructor function for now, to minimize immediate churn. All the `into_inner` calls are removed, which is nice.
2025-05-26Add stubs for environment variables; document some of the important onesjyn-6/+69
This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all. This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all. In particular, this generates stubs for the following env vars: - COLORTERM - QNX_TARGET - RUST_BACKTRACE - RUSTC_BLESS - RUSTC_BOOTSTRAP - RUSTC_BREAK_ON_ICE - RUSTC_CTFE_BACKTRACE - RUSTC_FORCE_RUSTC_VERSION - RUSTC_GRAPHVIZ_FONT - RUSTC_ICE - RUSTC_LOG - RUSTC_OVERRIDE_VERSION_STRING - RUSTC_RETRY_LINKER_ON_SEGFAULT - RUSTC_TRANSLATION_NO_DEBUG_ASSERT - RUST_DEP_GRAPH_FILTER - RUST_DEP_GRAPH - RUST_FORBID_DEP_GRAPH_EDGE - RUST_MIN_STACK - RUST_TARGET_PATH - SDKROOT - TERM - UNSTABLE_RUSTDOC_TEST_LINE - UNSTABLE_RUSTDOC_TEST_PATH [rendered](![screenshot of unstable-book running locally, with 14 environment variables shown in the sidebar](https://github.com/user-attachments/assets/8238d094-fb7a-456f-ad43-7c07aa2c44dd))
2025-05-26Merge pull request #19862 from ChayimFriedman2/item-resolve-macro-hirChayim Refael Friedman-29/+74
fix: Fix IDE resolution of item macros
2025-05-26Update mdbook to 0.4.51Eric Huss-3/+3
This fixes a silly regression introduced in 0.4.50 that broke the search hotkey (https://github.com/rust-lang/rust/pull/141457). Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0451
2025-05-27Rollup merge of #141526 - jyn514:env-vars, r=petrochenkov许杰友 Jieyou Xu (Joe)-0/+7
add a dedicated section for compiler environment variables in the unstable book rendered: ![image](https://github.com/user-attachments/assets/dcb6e2a3-2e2d-43bb-8f45-79715705bf45) fixes https://github.com/rust-lang/rust/issues/141523
2025-05-27Rollup merge of #141513 - nia-e:allocbytes-extend, r=RalfJung许杰友 Jieyou Xu (Joe)-7/+13
interpret: add allocation parameters to `AllocBytes` Necessary for a better implementation of [rust-lang/miri#4343](https://github.com/rust-lang/miri/pull/4343). Also included here is the code from that PR, adapted to this new interface for the sake of example and so that CI can run on them; the Miri changes can be reverted and merged separately, though. r? `@RalfJung`
2025-05-27Rollup merge of #141433 - compiler-errors:unsafe-binder-captures, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+2
Properly analyze captures from unsafe binders We need to represent the unsafe binder unwrap as an adjustment in HIR. Pretty straightforward b/c we already represent it as a projection elem in MIR. Fixes #141418 Fixes #141417 r? oli-obk
2025-05-26Auto merge of #141406 - RalfJung:less-force-allocate, r=oli-obkbors-53/+54
interpret: do not force_allocate all return places A while ago I cleaned up our `PlaceTy` a little, but as a side-effect of that, return places had to always be force-allocated. That turns out to cause quite a few extra allocations, and for a project we are doing where we marry Miri with a model checker, that means a lot of extra work -- local variables are just so much easier to reason about than allocations. So, this PR brings back the ability to have the return place be just a local of the caller. To make this work cleanly I had to rework stack pop handling a bit, which also changes the output of Miri in some cases as the span for errors occurring during a particular phase of stack pop changed. With these changes, a no-std binary with a function of functions that just take and return scalar types and that uses no pointers now does not move *any* local variables into memory. :) r? `@oli-obk`
2025-05-26fix: formated to clippyvremyavnikuda-1/+1
2025-05-26remove eq_unspanned from TokenStreamyukang-1/+3
2025-05-26fix: the lines are formatted according to clippyvremyavnikuda-1/+1
2025-05-26fix: the lines are formatted according to clippyvremyavnikuda-2/+2
2025-05-26docs: add documentation for find_all_refs constructor search (#10725)vremyavnikuda-3/+158
2025-05-26Merge pull request #19792 from A4-Tacks/fix-generate-mut-trait-impl-indentLukas Wirth-3/+91
fix: ide-assists, generate mut trait impl indent
2025-05-26Merge pull request #19819 from Veykril/push-utvzwvwuuvlmLukas Wirth-3/+3
Change import prefix default to be by crate
2025-05-26Merge pull request #19785 from A4-Tacks/fix-generate-new-indentLukas Wirth-1/+136
fixes: ide-assists, generate_new indent loses
2025-05-26Merge pull request #19851 from ChayimFriedman2/normalize-exhaustivenessLukas Wirth-25/+81
fix: Normalize when checking for uninhabited types for pattern exhaustiveness checking
2025-05-26Merge pull request #19864 from ChayimFriedman2/is-in-macroLukas Wirth-85/+125
fix: Properly implement `might_be_inside_macro_call()` using semantic information instead of syntactical hacks
2025-05-26extend allocbytes with associated typeNia Espera-7/+13
2025-05-25Update tidy exceptionsbjorn3-0/+2
2025-05-25Properly implement `might_be_inside_macro_call()` using semantic information ↵Chayim Refael Friedman-85/+125
instead of syntactical hacks And rename it to `is_inside_macro_call()` accordingly.
2025-05-25Fix IDE resolution of item macrosChayim Refael Friedman-29/+74
It wasn't inside the source, because there was no source map.
2025-05-25add "Compiler environment variables" section to the unstable bookjyn-0/+7
2025-05-25feat(unstable-book): Added unstable feature doc comments as feature descriptionsRoss Sullivan-6/+38
2025-05-25fmtThe Miri Cronjob Bot-1/+3
2025-05-25Merge from rustcThe Miri Cronjob Bot-84/+39
2025-05-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-05-24Rollup merge of #141511 - Noratrieb:codegen-fn-attrs, r=compiler-errorsGuillaume Gomez-2/+2
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-23/+23
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 #141487 - GuillaumeGomez:update-askama, r=notriddleGuillaume Gomez-1/+1
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```