about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-08-06Add normalization for thread IDs in panic messagesTrevor Gross-1/+7
So we don't need to add normalization to every test that includes a panic message, add a global normalization to compiletest.
2025-08-06Revert "Embed GDB pretty printers in rlibs and dylibs"bjorn3-1/+0
This reverts commit b4d923cea0509933b1fb859930cb20784251f9be.
2025-08-07In extract_module.rs, generate ast::Module instead of StringHmikihiro-66/+126
2025-08-06Bump tmp from 0.2.3 to 0.2.4 in /editors/codedependabot[bot]-3/+3
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06Auto merge of #145003 - Kobzol:rollup-kgb216b, r=Kobzolbors-2/+11
Rollup of 12 pull requests Successful merges: - rust-lang/rust#144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - rust-lang/rust#144676 (Add documentation for unstable_feature_bound) - rust-lang/rust#144836 (Change visibility of Args new function) - rust-lang/rust#144910 (Add regression tests for seemingly fixed issues) - rust-lang/rust#144913 ([rustdoc] Fix wrong `i` tooltip icon) - rust-lang/rust#144924 (compiletest: add hint for when a ui test produces no errors) - rust-lang/rust#144926 (Correct the use of `must_use` on btree::IterMut) - rust-lang/rust#144928 (Drop `rust-version` from `rustc_thread_pool`) - rust-lang/rust#144945 (Autolabel PRs that change explicit tail call tests as `F-explicit_tail_calls`) - rust-lang/rust#144954 (run-make: Allow blessing snapshot files that don't exist yet) - rust-lang/rust#144971 (num: Rename `isolate_most_least_significant_one` functions) - rust-lang/rust#144978 (Fix some doc links for intrinsics) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-06Merge pull request #20393 from rust-lang/veykril/push-urpzrkwpkmxwLukas Wirth-29/+29
Fix non-lsp compliant `Response` definition
2025-08-06Fix non-lsp compliant `Response` definitionLukas Wirth-29/+29
2025-08-06Merge pull request #20392 from rust-lang/veykril/push-pxplxplxvvyyLukas Wirth-4/+8
Report the incorrect payload when failing to deserialize lsp messages
2025-08-06Report the incorrect payload when failing to deserialize lsp messagesLukas Wirth-4/+8
2025-08-06Rollup merge of #144954 - Zalathar:run-make-bless, r=jieyouxuJakub Beránek-1/+10
run-make: Allow blessing snapshot files that don't exist yet This makes it possible to bless the snapshot files used by `diff()` in newly-created run-make tests, without having to create the files manually beforehand. r? jieyouxu
2025-08-06Rollup merge of #144924 - lolbinarycat:compiletest-pass-directives-hint, ↵Jakub Beránek-1/+1
r=clubby789 compiletest: add hint for when a ui test produces no errors
2025-08-06Merge pull request #20354 from A4-Tacks/clean-lit-stmt-remove-dbgChayim Refael Friedman-0/+50
Add remove literal dbg stmt for remove_dbg
2025-08-06Add remove simple dbg stmt for remove_dbgA4-Tacks-0/+50
Remove only contain literals dbg statement ```rust fn foo() { let n = 2; $0dbg!(3); dbg!(2.6); dbg!(1, 2.5); dbg!('x'); dbg!(&n); dbg!(n); // needless comment dbg!("foo");$0 } ``` -> ```rust fn foo() { // needless comment } ``` Old: ```rust fn foo() { 3; 2.6; (1, 2.5); 'x'; &n; n; // needless comment "foo"; } ```
2025-08-06Embed GDB pretty printers in rlibs and dylibsSebastian Poeplau-0/+1
Instead of collecting pretty printers transitively when building executables/staticlibs/cdylibs, let the debugger find each crate's pretty printers via its .debug_gdb_scripts section. This covers the case where libraries defining custom pretty printers are loaded dynamically.
2025-08-06Merge pull request #20387 from ChayimFriedman2/rename-macroShoyu Vanilla (Flint)-63/+81
fix: Do not remove the original token when descending into derives
2025-08-06run-make: Allow blessing snapshot files that don't exist yetZalathar-1/+10
This makes it possible to bless the snapshot files used by `diff()` in newly-created run-make tests, without having to create the files manually beforehand.
2025-08-05Merge pull request #20384 from vxpm/fix-external-docsChayim Refael Friedman-1/+26
fix external docs for exported macros
2025-08-05fix external docs for exported macrosvinícius x-1/+26
add test
2025-08-05Merge pull request #20381 from A4-Tacks/fix-assign-sugChayim Refael Friedman-0/+82
Add assignment type analysis for ide-completion
2025-08-05fix(unicode-table-generator): fix duplicated unique indicesMarco Cavenati-1/+1
unicode-table-generator panicked while populating distinct_indices because of duplicated indices. This was introduced by swapping the order of canonical_words.push(...) and canonical_words.len().
2025-08-05Change prev whitespace to prev triviaA4-Tacks-3/+3
2025-08-05Merge pull request #20385 from Hmikihiro/migrate_expand_glob_importShoyu Vanilla (Flint)-5/+4
Migrate `expand_glob_import` assist to use `SyntaxEditor`
2025-08-05Merge pull request #20383 from ↵Shoyu Vanilla (Flint)-17/+19
Hmikihiro/remove_ted_from_replace_named_generic_with_impl remove `ted` from replace_named_generic_with_impl.rs
2025-08-05Merge pull request #20380 from Hmikihiro/add_attr_argShoyu Vanilla (Flint)-116/+185
remove `add_attr()` from edit_in_place.rs because it use `ted`.
2025-08-05Merge pull request #20389 from Veykril/push-ssyssvnrywvyLukas Wirth-7/+3
Slim down compile time artifact progress reports
2025-08-05Slim down compile time artifact progress reportsLukas Wirth-7/+3
2025-08-05Rollup merge of #144887 - lnicola:sync-from-ra, r=lnicolaSamuel Tardieu-4814/+5513
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/8d75311400a108d7ffe17dc9c38182c566952e6e. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-08-05Rollup merge of #144813 - jieyouxu:no-top-level-tests, r=KobzolSamuel Tardieu-105/+173
Add a tidy check to prevent adding UI tests directly under `tests/ui/` This PR implements https://github.com/rust-lang/compiler-team/issues/902. Only the last commit (adding the new check) is functional; earlier commits are just small drive-by changes to make the other ui/ui-fulldeps checks more logically contained. r? ```@Kobzol``` (or compiler)
2025-08-04[win][arm64ec] Fix msvc-wholearchive for Arm64ECDaniel Paoliello-8/+34
2025-08-05Do not remove the original token when descending into derivesChayim Refael Friedman-11/+9
This caused rename to remove both, because it couldn't rename the derive-expanded one. I spent some time trying to create a test for this, before giving up. But I checked manually that this works.
2025-08-05Allow renaming when there are multiple definitions (due to macros) even when ↵Chayim Refael Friedman-52/+72
some cannot rename
2025-08-04compiletest: add hint for when a ui test produces no errorsbinarycat-1/+1
2025-08-05Migrate `expand_glob_import` assist to use `SyntaxEditor`Hmikihiro-5/+4
2025-08-05remove `ted` from replace_named_generic_with_impl.rsHmikihiro-17/+19
2025-08-04Merge pull request #20378 from skewb1k/chore/folding_ranges-permsLaurențiu Nicola-0/+0
chore: fix crates/ide/src/folding_ranges.rs file perms
2025-08-04Merge pull request #20382 from ChayimFriedman2/goto-def-from-macroShoyu Vanilla (Flint)-4/+30
fix: Correctly goto `From` impl when on `into()` even when the call is inside a macro
2025-08-04Add if..else completions in LetStmt and ArgListA4-Tacks-1/+127
Example === ```rust let x = $0; ``` Old completions: ```rust let x = if $1 { $0 }; ``` This PR current completions: ```rust let x = if $1 { $2 } else { $0 }; ```
2025-08-04Correctly goto `From` impl when on `into()` even when the call is inside a macroChayim Refael Friedman-4/+30
Descend into macros first.
2025-08-04remove begin prefixKivooeo-23/+23
2025-08-04remvoe add_attr edit_in_place.rs because it use ted.Hmikihiro-116/+185
2025-08-04fix(hover): unify horizontal rule formatting to `---`skewb1k-42/+42
Replaces all `___` with `---` in hover documentation markups. Both styles are valid per the GitHub Flavored Markdown spec, but `---` is less ambiguous and already more widely used in rust-analyzer
2025-08-04chore: fix crates/ide/src/folding_ranges.rs file permsskewb1k-0/+0
755 -> 644
2025-08-04Merge ref '07b7dc90ee4d' from rust-lang/rustThe Miri Cronjob Bot-5053/+5832
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 07b7dc90ee4df5815dbb91ef8e98cb93571230f5 Filtered ref: 3785af8cd0fe0eeb48a0f920ca3fae973cf842d7 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-04Prepare for merging from rust-lang/rustThe Miri Cronjob Bot-1/+1
This updates the rust-version file to 07b7dc90ee4df5815dbb91ef8e98cb93571230f5.
2025-08-04Rollup merge of #144694 - compiler-errors:with-self-ty, r=SparrowLiiStuart Cook-1/+1
Distinguish prepending and replacing self ty in predicates There are two kinds of functions called `with_self_ty`: 1. Prepends the `Self` type onto an `ExistentialPredicate` which lacks it in its internal representation. 2. Replaces the `Self` type of an existing predicate, either for diagnostics purposes or in the new trait solver when normalizing that self type. This PR distinguishes these two because I often want to only grep for one of them. Namely, let's call it `with_replaced_self_ty` when all we're doing is replacing the self type.
2025-08-04Rollup merge of #144853 - Kivooeo:rust_-cleanup, r=Mark-SimulacrumStuart Cook-11/+11
Remove unnecessary `rust_` prefixes part of https://github.com/rust-lang/rust/issues/116005 Honestly, not sure if this can affect linking somehow, also I didn't touched things like `__rust_panic_cleanup` and `__rust_start_panic` which very likely will break something, so just small cleanup here also didn't changed `rust_panic_without_hook` because it was renamed here https://github.com/rust-lang/rust/pull/144852 r? libs
2025-08-04Rollup merge of #144848 - Zalathar:ui-fulldeps, r=clubby789Stuart Cook-10/+32
For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info Testing ui-fulldeps in "stage 1" actually uses the stage 0 compiler, so that test programs can link against stage 1 rustc crates. Unfortunately, using the stage 0 compiler causes problems when compiletest tries to obtain target information from the compiler, but the output format has changed since the last bootstrap beta bump. We can work around this by also providing compiletest with a stage 1 compiler, and having it use that compiler to query for target information. --- This fixes the stage 1 ui-fulldeps failure seen at https://github.com/rust-lang/rust/pull/144443#issuecomment-3146992771.
2025-08-04Rollup merge of #144706 - zachs18:fix-144661, r=RalfJungStuart Cook-25/+0
Do not give function allocations alignment in consteval and Miri. We do not yet have a (clear and T-lang approved) design for how `#[align(N)]` on functions should affect function pointers' addresses on various platforms, so for now do not give function pointers alignment in consteval and Miri. ---- Old summary: Not a full solution to <https://github.com/rust-lang/rust/issues/144661>, but fixes the immediate issue by making function allocations all have alignment 1 in consteval, ignoring `#[rustc_align(N)]`, so the compiler doesn't know if any offset other than 0 is non-null. A more "principlied" solution would probably be to make function pointers to `#[instruction_set(arm::t32)]` functions be at offset 1 of an align-`max(2, align attribute)` allocation instead of at offset 0 of their allocation during consteval, and on wasm to either disallow `#[align(N)]` where N > 1, or to pad the function table such that the function pointer of a `#[align(N)]` function is a multiple of `N` at runtime.
2025-08-04Rollup merge of #144322 - Urgau:dangling-ptr-from-locals, r=oli-obkStuart Cook-0/+3
Add lint against dangling pointers from local variables ## `dangling_pointers_from_locals` *warn-by-default* The `dangling_pointers_from_locals` lint detects getting a pointer to data of a local that will be dropped at the end of the function. ### Example ```rust fn f() -> *const u8 { let x = 0; &x // returns a dangling ptr to `x` } ``` ```text warning: a dangling pointer will be produced because the local variable `x` will be dropped --> $DIR/dangling-pointers-from-locals.rs:10:5 | LL | fn simple() -> *const u8 { | --------- return type of the function is `*const u8` LL | let x = 0; | - `x` is defined inside the function and will be drop at the end of the function LL | &x | ^^ | = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned = note: `#[warn(dangling_pointers_from_locals)]` on by default ``` ### Explanation Returning a pointer from a local value will not prolong its lifetime, which means that the value can be dropped and the allocation freed while the pointer still exists, making the pointer dangling. If you need stronger guarantees, consider using references instead, as they are statically verified by the borrow-checker to never dangle. ------ This is related to GitHub codeql [CWE-825](https://github.com/github/codeql/blob/main/rust/ql/src/queries/security/CWE-825/AccessAfterLifetimeBad.rs) which shows examples of such simple miss-use. It should be noted that C compilers warns against such patterns even without `-Wall`, https://godbolt.org/z/P7z98arrc. ------ `@rustbot` labels +I-lang-nominated +T-lang cc `@traviscross` r? compiler
2025-08-04Remove strict_overflow_ops lintNurzhan Sakén-14/+0