about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-09-23Add const parameter keyword completionA4-Tacks-1/+28
Example --- ```rust fn foo<c$0>() {} ``` -> ```rust fn foo<const $1: $0>() {} ```
2025-09-23Use ParamEnv in TraitEnvironmentJack Huey-170/+216
2025-09-23Add 'db to TraitEnvironmentJack Huey-109/+122
2025-09-23Make Field::ty return TypeNsjackh726-31/+51
2025-09-22Use ns versions of with_diagnostics queriesjackh726-8/+8
2025-09-22Auto merge of #146892 - GuillaumeGomez:rollup-fa7lp0n, r=GuillaumeGomezbors-2/+4
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146795 (Enable `limit_rdylib_exports` on wasm targets) - rust-lang/rust#146828 (fix a crash in rustdoc merge finalize without input file) - rust-lang/rust#146848 (Add x86_64-unknown-motor (Motor OS) tier 3 target) - rust-lang/rust#146884 (Fix modification check of `rustdoc-json-types`) - rust-lang/rust#146887 (Remove unused #![feature(get_mut_unchecked)] in Rc and Arc examples) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-22fix SIFA logicRalf Jung-12/+23
2025-09-22Merge pull request #20592 from A4-Tacks/add-braces-closure-in-matchShoyu Vanilla (Flint)-2/+31
Fix closure in match not applicable for add_braces
2025-09-22Merge pull request #20679 from A4-Tacks/no-comp-ty-in-nested-patShoyu Vanilla (Flint)-0/+20
Fix complete type in nested pattern
2025-09-22Merge pull request #20722 from A4-Tacks/pull-assign-up-inner-ifShoyu Vanilla (Flint)-0/+35
Fix apply in inner if for pull_assignment_up
2025-09-22Merge pull request #20723 from A4-Tacks/fix-bind-unused-applicable-underscoreShoyu Vanilla (Flint)-3/+30
Fix applicable on underscore for bind_unused_param
2025-09-22Merge pull request #20725 from ChayimFriedman2/fix-missing-lifetimeShoyu Vanilla (Flint)-25/+55
fix: Fix lifetime elision handling for `Fn`-style trait bounds
2025-09-22Merge pull request #20717 from ShoyuVanilla/migrate-moreChayim Refael Friedman-153/+122
internal: Migrate more predicate things to next-solver
2025-09-22internal: Migrate more predicate things to next-solverShoyu Vanilla-153/+122
2025-09-22Auto merge of #146683 - clarfonthey:safe-intrinsics, r=RalfJung,Amanieubors-4/+4
Mark float intrinsics with no preconditions as safe Note: for ease of reviewing, the list of safe intrinsics is sorted in the first commit, and then safe intrinsics are added in the second commit. All *recently added* float intrinsics have been correctly marked as safe to call due to the fact that they have no preconditions. This adds the remaining float intrinsics which are safe to call to the safe intrinsic list, and removes the unsafe blocks around their calls. --- Side note: this may want a try run before being added to the queue, since I'm not sure if there's any tier-2 code that uses these intrinsics that might not be tested on the usual PR flow. We've already uncovered a few places in subtrees that do this, and it's worth double-checking before clogging up the queue.
2025-09-22Fix lifetime elision handling for `Fn`-style trait boundsChayim Refael Friedman-25/+55
Two fixes were needed: 1. Previously, we enabled elision for the generic args of `Fn` itself, instead of for generic args of paths within it. 2. In lowering in the new solver the `Output` parameter did not have elision set correctly, I don't know why. In the old lowering it was done correctly.
2025-09-22share the check_nondet helper as wellRalf Jung-174/+138
2025-09-22share check_all_outcomes impl, and increase max iteration countsRalf Jung-60/+45
2025-09-22Fix modification check of `rustdoc-json-types`Jakub Beránek-2/+4
2025-09-22Merge pull request #4595 from RalfJung/tb-termsRalf Jung-197/+128
TB: update terminology to match paper & MiniRust
2025-09-22Tree::new_child: remove SIFA precondition and sync terminologyRalf Jung-70/+34
2025-09-22TB: rename Active → Unique to match paperRalf Jung-128/+95
2025-09-22avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`Petros Angelatos-0/+10
The implementation of the `Vec::extract_if` iterator violates the safety contract adverized by `slice::from_raw_parts` by always constructing a mutable slice for the entire length of the vector even though that span of memory can contain holes from items already drained. The safety contract of `slice::from_raw_parts` requires that all elements must be properly initialized. As an example we can look at the following code: ```rust let mut v = vec![Box::new(0u64), Box::new(1u64)]; for item in v.extract_if(.., |x| **x == 0) { drop(item); } ``` In the second iteration a `&mut [Box<u64>]` slice of length 2 will be constructed. The first slot of the slice contains the bitpattern of an already deallocated box, which is invalid. This fixes the issue by only creating references to valid items and using pointer manipulation for the rest. I have also taken the liberty to remove the big `unsafe` blocks in place of targetted ones with a SAFETY comment. The approach closely mirrors the implementation of `Vec::retain_mut`. Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2025-09-22Merge pull request #20724 from ChayimFriedman2/ns-cleanup3Chayim Refael Friedman-0/+32
minor: Another regression test for next solver fixed bug
2025-09-22Another regression test for next solver fixed bugChayim Refael Friedman-0/+32
2025-09-22Fix applicable on underscore for bind_unused_paramA4-Tacks-3/+30
Fixes: - applicable on underscore prefix parameter - using binding mode as an expression Examples --- ```rust fn foo($0_x: i32, y: i32) {} ``` **Before this PR**: ```rust fn foo(_x: i32, y: i32) { let _ = _x; } ``` **After this PR**: Assist not applicable --- ```rust fn foo(ref $0y: i32) {} ``` **Before this PR**: ```rust fn foo(ref y: i32) { let _ = ref y; } ``` **After this PR**: ```rust fn foo(ref y: i32) { let _ = y; } ```
2025-09-22Fix apply in internal if for pull_assignment_upA4-Tacks-0/+35
Example --- ```rust fn foo() { let mut a = 1; if true { a = 2; } else if true { $0a = 3; } else { a = 4; } } ``` **Before this PR**: ```rust fn foo() { let mut a = 1; if true { a = 2; } else a = if true { 3 } else { 4 }; } ``` **After this PR**: ```rust fn foo() { let mut a = 1; a = if true { 2 } else if true { 3 } else { 4 }; } ```
2025-09-22Clarify `rust-analyzer.inlayHints.maxLength` is not a hard guaranteeChayim Refael Friedman-1/+5
2025-09-21Mark float intrinsics with no preconditions as safeltdk-4/+4
2025-09-21Rollup merge of #143857 - Periodic1911:macro-export, r=jdonszelmannMatthias Krüger-2/+5
Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? ``@oli-obk`` cc ``@JonathanBrouwer`` ``@jdonszelmann``
2025-09-21Add panic=immediate-abortBen Kimock-7/+35
2025-09-21Port #[macro_export] to the new attribute parsing infrastructureJonathan Brouwer-2/+5
Co-authored-by: Anne Stijns <anstijns@gmail.com>
2025-09-21Implement output of colored messages with optional check contextJakub Beránek-55/+152
2025-09-21Migrate the remaining tidy checks to diagnosticsJakub Beránek-572/+560
2025-09-21Add `CheckId`, migrate the `alphabetical` check to diagnosticsJakub Beránek-45/+63
2025-09-21Add diagnostics context and migrate the `style` check to itJakub Beránek-89/+187
2025-09-21Fix not applicable on trailing comma for remove_dbgA4-Tacks-1/+16
`remove_dbg` not applicable for whitespaces after trailing comma Example --- ```rust fn foo() { dbg!( bar(), ); } ``` **Before this PR**: Assist not applicable **After this PR**: ```rust fn foo() { bar(); } ```
2025-09-20Rollup merge of #146762 - madsmtm:test-apple-sim, r=jieyouxuMatthias Krüger-4/+15
Fix and provide instructions for running test suite on Apple simulators The following now works: ```sh ./x test --host='' --target aarch64-apple-ios-sim --skip tests/debuginfo ./x test --host='' --target aarch64-apple-tvos-sim --skip tests/debuginfo ./x test --host='' --target aarch64-apple-watchos-sim --skip tests/debuginfo ./x test --host='' --target aarch64-apple-visionos-sim --skip tests/debuginfo ``` I have documented the setup I used [in the `rustc-dev-guide`](https://rustc-dev-guide.rust-lang.org/tests/running.html#testing-on-emulators), it's fairly standard use of `remote-test-server` (with a small fix to library load paths which I've made in the first commit). I first tried the somewhat simpler `target.aarch64-apple-ios-sim.runner = "xcrun simctl spawn $UDID"`, but that doesn't work as required libraries etc. also need to be copied to the device. The debuginfo tests fail, I think because the debug info in `.dSYM` isn't available. I am yet unsure exactly how to fix this, either we need to copy that directory to the target as well, or we need to configure `lldb` somehow to read it from the host. I decided to not add this to our CI, since I suspect we wouldn't gain much from it? Running on the simulator still uses the host Darwin kernel, it's basically just configured to run in another mode with more restricted permissions and different system libraries. r? jieyouxu CC ``@simlay,`` you're a lot more familiar with `xcrun simctl` than I.
2025-09-20allow take union field addresses in safe rustKivooeo-1/+60
2025-09-20Merge pull request #20706 from A4-Tacks/stdx-replace-inplaceShoyu Vanilla (Flint)-3/+41
Fix to implements in-place stdx::replace
2025-09-20Add some test for stdx::replaceA4-Tacks-0/+30
2025-09-20Merge pull request #20661 from A4-Tacks/suggest-if-bodyShoyu Vanilla (Flint)-8/+82
Fix IfExpr branches suggests
2025-09-20Fix to implements in-place stdx::replaceA4-Tacks-3/+11
2025-09-20Fix IfExpr then branch suggestA4-Tacks-8/+82
- And add logic operation suggest Example --- In the old implementation, it always suggested conditions, this is a lot of noise, e.g `contract_checks()~(use std::intrinsics::contract_checks) const fn() -> bool` ```rust fn foo() { if true { c$0 } } ```
2025-09-20Merge pull request #20710 from A4-Tacks/unused-var-shorthandShoyu Vanilla (Flint)-11/+57
Fix unused_variables fixes shorthand record field
2025-09-20Merge pull request #20709 from ↵Shoyu Vanilla (Flint)-2/+48
A4-Tacks/destruct-panic-on-not-add-deref-and-paren Fix panic `!self.data().mutable` for destructure_struct_binding
2025-09-20Merge pull request #20686 from A4-Tacks/gen-default-not-apply-selectedShoyu Vanilla (Flint)-0/+46
Fix selected applicable generate_default_from_enum_variant
2025-09-20Merge pull request #20689 from ShoyuVanilla/accurate-flycheckDavid Barsky-43/+213
fix: Make flycheck clearing dependency-aware
2025-09-20Fix selected multi variants applicable generate_default_from_enum_variantA4-Tacks-0/+46
2025-09-20Merge pull request #20688 from ↵Shoyu Vanilla (Flint)-0/+18
A4-Tacks/fix-applicable-after-l-curly-replace-is-method-with-if-let Fix applicable after l_curly for replace_is_method_with_if_let_method