about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-06-05Auto merge of #138677 - shepmaster:consistent-elided-lifetime-syntax, ↵bors-47/+56
r=traviscross,jieyouxu Add a new `mismatched-lifetime-syntaxes` lint The lang-team [discussed this](https://hackmd.io/nf4ZUYd7Rp6rq-1svJZSaQ) and I attempted to [summarize](https://github.com/rust-lang/rust/pull/120808#issuecomment-2701863833) their decision. The summary-of-the-summary is: - Using two different kinds of syntax for elided lifetimes is confusing. In rare cases, it may even [lead to unsound code](https://github.com/rust-lang/rust/issues/48686)! Some examples: ```rust // Lint will warn about these fn(v: ContainsLifetime) -> ContainsLifetime<'_>; fn(&'static u8) -> &u8; ``` - Matching up references with no lifetime syntax, references with anonymous lifetime syntax, and paths with anonymous lifetime syntax is an exception to the simplest possible rule: ```rust // Lint will not warn about these fn(&u8) -> &'_ u8; fn(&'_ u8) -> &u8; fn(&u8) -> ContainsLifetime<'_>; ``` - Having a lint for consistent syntax of elided lifetimes will make the [future goal](https://github.com/rust-lang/rust/issues/91639) of warning-by-default for paths participating in elision much simpler. --- This new lint attempts to accomplish the goal of enforcing consistent syntax. In the process, it supersedes and replaces the existing `elided-named-lifetimes` lint, which means it starts out life as warn-by-default.
2025-06-05Auto merge of #142081 - matthiaskrgr:rollup-secpezz, r=matthiaskrgrbors-238/+251
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-05Merge pull request #19933 from Veykril/push-uyxorpyvnzslLukas Wirth-10/+134
Better parser recovery for macro calls in type bound position
2025-06-05change tests to use fixed constants to let them pass with miriLorrensP-2158466-1/+3
2025-06-05Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of NoneOli Scherer-2/+2
2025-06-05Better parser recovery for macro calls in type bound positionLukas Wirth-10/+134
2025-06-05Rollup merge of #141709 - aDotInTheVoid:split-for-docs, r=GuillaumeGomezMatthias Krüger-238/+251
jsondocck: Refactor directive handling Best reviewed commit by commit. 1. Moves directive handling into its own file. This makes it easier to link to in the dev-guide (https://github.com/rust-lang/rustc-dev-guide/pull/2422#discussion_r2112724234), but also makes the code nicer in it's own right 2. Renames command to directive. This is what compiletest uses, and it's nice to not have 2 words for this. r? ``@GuillaumeGomez``
2025-06-05fix: Record macro calls in signatures in `ChildBySource` implsLukas Wirth-19/+77
2025-06-05jsondocck: Explain what `KNOWN_DIRECTIVE_NAMES` is doingAlona Enraght-Moony-1/+1
2025-06-05Rollup merge of #140638 - RalfJung:unsafe-pinned-shared-aliased, ↵Matthias Krüger-0/+131
r=workingjubilee UnsafePinned: also include the effects of UnsafeCell This tackles https://github.com/rust-lang/rust/issues/137750 by including an `UnsafeCell` in `UnsafePinned`, thus imbuing it with all the usual properties of interior mutability (no `noalias` nor `dereferenceable` on shared refs, special treatment by Miri's aliasing model). The soundness issue is not fixed yet because coroutine lowering does not use `UnsafePinned`. The RFC said that `UnsafePinned` would not permit mutability on shared references, but since then, https://github.com/rust-lang/rust/issues/137750 has demonstrated that this is not tenable. In the face of those examples, I propose that we do the "obvious" thing and permit shared mutable state inside `UnsafePinned`. This seems loosely consistent with the fact that we allow going from `Pin<&mut T>` to `&T` (where the former can be aliased with other pointers that perform mutation, and hence the same goes for the latter) -- but the `as_ref` example shows that we in fact would need to add this `UnsafeCell` even if we didn't have a safe conversion to `&T`, since for the compiler and Miri, `&T` and `Pin<&T>` are basically the same type. To make this possible, I had to remove the `Copy` and `Clone` impls for `UnsafePinned`. Tracking issue: https://github.com/rust-lang/rust/issues/125735 Cc ``@rust-lang/lang`` ``@rust-lang/opsem`` ``@Sky9x`` I don't think this needs FCP since the type is still unstable -- we'll finally decide whether we like this approach when `UnsafePinned` is moved towards stabilization (IOW, this PR is reversible). However, I'd still like to make sure that the lang team is okay with the direction I am proposing here.
2025-06-05Stabilize `const_eq_ignore_ascii_case`Paolo Barbolini-14/+0
2025-06-05Merge pull request #19928 from Veykril/push-kznpuqllrvvqLukas Wirth-297/+160
Deduplicate code in proc-macro-srv
2025-06-05Deduplicate code in proc-macro-srvLukas Wirth-297/+160
2025-06-05Merge from rustcThe Miri Cronjob Bot-5/+4
2025-06-05Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-05feat: ide-assist, generate single field struct FromA4-Tacks-6/+1043
2025-06-04add qualifiers to attribute completionsRyan Mehri-14/+30
2025-06-04Replace `elided_named_lifetimes` with `mismatched_lifetime_syntaxes`Jake Goulding-45/+54
2025-06-04Introduce the `mismatched_lifetime_syntaxes` lintJake Goulding-2/+2
2025-06-04Rollup merge of #141570 - chenyukang:yukang-fix-eq_unspanned, r=workingjubileeMatthias Krüger-1/+3
Fix incorrect eq_unspanned in TokenStream Fixes rust-lang/rust#141522 r? ``@workingjubilee`` should we remove this function? since it's used in several places, i'd prefer to keep it.
2025-06-04match on segments of path and some small cleanupRyan Mehri-23/+14
2025-06-04refactor: Cleanup descension stuffLukas Wirth-35/+46
2025-06-04Merge pull request #19922 from Veykril/push-oxyomxrsplpxLukas Wirth-217/+405
feat: Add `dyn` keyword inlay hints
2025-06-04feat: Add `dyn` keyword inlay hintsLukas Wirth-2/+142
2025-06-04Give path segment type anchors their own grammar ruleLukas Wirth-158/+223
2025-06-04Remove unnecessary parameters in inlay-hint computationLukas Wirth-58/+41
2025-06-04Merge pull request #4372 from nia-e/multiple-native-libsOli Scherer-57/+70
native-lib: allow multiple libraries and/or dirs
2025-06-04Merge pull request #19913 from ↵Laurențiu Nicola-3/+3
rust-lang/dependabot/npm_and_yarn/editors/code/tar-fs-2.1.3 chore(deps): bump tar-fs from 2.1.2 to 2.1.3 in /editors/code
2025-06-04Merge pull request #19914 from ↵Lukas Wirth-0/+253
davidbarsky/davidbarsky/add-some-additional-incrementalism-tests hir-ty: add incremental tests checking for `infer` invalidation
2025-06-04ci: Pin `cargo-workspaces` version to `0.3.6`, againShoyu Vanilla-2/+2
2025-06-04fix: Typo mistake in autopublish workflowShoyu Vanilla (Flint)-1/+1
2025-06-04Rollup merge of #141871 - nia-e:fix-bitset, r=eholkMatthias Krüger-4/+1
index: add method for checking range on DenseBitSet Micro-optimisation that Miri benefits from with the new isolated allocator for native-libs mode. Also possibly just a useful method to have on `DenseBitSet`
2025-06-04ci: When autopublishing, remove `xtask` from workspaceShoyu Vanilla (Flint)-3/+3
Revert `cargo-workspaces` version fix
2025-06-04Merge from rustcThe Miri Cronjob Bot-667/+3459
2025-06-04Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-04Merge pull request #19915 from ShoyuVanilla/publish-libs-crashLaurențiu Nicola-1/+1
ci: Pin `cargo-workspaces` to `0.3.6`
2025-06-03Auto merge of #141984 - matthiaskrgr:rollup-wy6j9ca, r=matthiaskrgrbors-339/+388
Rollup of 8 pull requests Successful merges: - rust-lang/rust#137725 (Add `iter` macro) - rust-lang/rust#141455 (std: abort the process on failure to allocate a TLS key) - rust-lang/rust#141569 (Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`) - rust-lang/rust#141698 (Use the informative error as the main const eval error message) - rust-lang/rust#141925 (Remove bootstrap cfgs from library/) - rust-lang/rust#141943 (Remove pre-expansion AST stats.) - rust-lang/rust#141945 (Remove `Path::is_ident`.) - rust-lang/rust#141957 (Add missing `dyn` keywords to tests that do not test for them Part 2) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-04index: add method for checking range on DenseBitSetNia Espera-4/+1
2025-06-03Rollup merge of #141698 - oli-obk:ctfe-err-flip, r=RalfJungMatthias Krüger-12/+12
Use the informative error as the main const eval error message r? `@RalfJung` I only did the minimal changes necessary to the const eval error machinery. I'd prefer not to mix test changes with refactorings 😆
2025-06-03Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3Matthias Krüger-327/+354
Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi` Our `conv_from_spec_abi`, `adjust_abi`, and `is_abi_supported` combine to give us a very confusing way of reasoning about what _actual_ calling convention we want to lower our code to and whether we want to compile the resulting code at all. Instead of leaving this code as a miniature adventure game in which someone tries to combine stateful mutations into a Rube Goldberg machine that will let them escape the maze and arrive at the promised land of codegen, we let `AbiMap` devour this complexity. Once you have an `AbiMap`, you can answer which `ExternAbi`s will lower to what `CanonAbi`s (and whether they will lower at all). Removed: - `conv_from_spec_abi` replaced by `AbiMap::canonize_abi` - `adjust_abi` replaced by same - `Conv::PreserveAll` as unused - `Conv::Cold` as unused - `enum Conv` replaced by `enum CanonAbi` target-spec.json changes: - If you have a target-spec.json then now your "entry-abi" key will be specified in terms of one of the `"{abi}"` strings Rust recognizes, e.g. ```json "entry-abi": "C", "entry-abi": "win64", "entry-abi": "aapcs", ```
2025-06-03native-lib: allow multiple libraries and/or dirsNia Espera-57/+70
2025-06-03Auto merge of #141229 - tgross35:builtins-josh-subtree, r=Kobzolbors-0/+2
Merge `compiler-builtins` as a Josh subtree Use the Josh [1] utility to add `compiler-builtins` as a subtree, which will allow us to stop using crates.io for updates. This is intended to help resolve some problems when unstable features change and require code changes in `compiler-builtins`, which sometimes gets trapped in a bootstrap cycle. This was done using `josh-filter` built from the r24.10.04 tag: git fetch https://github.com/rust-lang/compiler-builtins.git 233434412fe7eced8f1ddbfeddabef1d55e493bd josh-filter ":prefix=library/compiler-builtins" FETCH_HEAD git merge --allow-unrelated FILTERED_HEAD The HEAD in the `compiler-builtins` repository is 233434412f ("fix an if statement that can be collapsed"). [1]: https://github.com/josh-project/josh
2025-06-03Add `iter` macroOli Scherer-0/+22
This adds an `iter!` macro that can be used to create movable generators. This also adds a yield_expr feature so the `yield` keyword can be used within iter! macro bodies. This was needed because several unstable features each need `yield` expressions, so this allows us to stabilize them separately from any individual feature. Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de> Co-authored-by: Jieyou Xu <jieyouxu@outlook.com> Co-authored-by: Travis Cross <tc@traviscross.com>
2025-06-03hir-ty: add incremental tests checking for `infer` invalidationDavid Barsky-0/+253
2025-06-03Enable Float non-determinism in miri. Update and add tests and changeLorrensP-2158466-62/+327
change tests in std, core and coretests.
2025-06-03miri: sed to CanonAbiJubilee Young-327/+354
2025-06-03Remove uses of `stdarch_x86_avx512`sayantn-6/+0
2025-06-04ci: Pin `cargo-workspaces` to `0.3.6`Shoyu Vanilla-1/+1
2025-06-03Auto merge of #141954 - matthiaskrgr:rollup-zptd6t9, r=matthiaskrgrbors-299/+3037
Rollup of 9 pull requests Successful merges: - rust-lang/rust#141554 (Improve documentation for codegen options) - rust-lang/rust#141817 (rustc_llvm: add Windows system libs only when cross-compiling from Wi…) - rust-lang/rust#141843 (Add `visit_id` to ast `Visitor`) - rust-lang/rust#141881 (Subtree update of `rust-analyzer`) - rust-lang/rust#141898 ([rustdoc-json] Implement PartialOrd and Ord for rustdoc_types::Id) - rust-lang/rust#141921 (Disable f64 minimum/maximum tests for arm 32) - rust-lang/rust#141930 (Enable triagebot `[concern]` functionality) - rust-lang/rust#141936 (Decouple "reporting in deps" from `FutureIncompatibilityReason`) - rust-lang/rust#141949 (move `test-float-parse` tool into `src/tools` dir) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-03Rollup merge of #141949 - onur-ozkan:move-test-float-parse, r=KobzolMatthias Krüger-1/+2396
move `test-float-parse` tool into `src/tools` dir Obviously `test-float-parse` is a tool like any other in `src/tools`. cc `@tgross35`