about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-01-27Make a previously unreachable UI test reachableLeón Orell Valerian Liehr-1/+0
2025-01-27Remove all dead files inside tests/ui/León Orell Valerian Liehr-1/+1
2025-01-26Support RFC 2396Chayim Refael Friedman-24/+132
AKA. target_feature 1.1, or non unsafe target_feature.
2025-01-26Merge pull request #4154 from RalfJung/linux-futexRalf Jung-3/+2
make linux-futex test less flaky
2025-01-26make linux-futex test less flakyRalf Jung-3/+2
2025-01-26Pre-intern name when searching module childrenMark Rousskov-1/+2
This avoids a good deal of work, since each module child can now just be compared via u32 comparison, rather than fetching the raw &str (requiring locking and indexing into the interner) and then comparing the two strings (also relatively expensive).
2025-01-26In completion's expand, consider recursion stop condition (when we're not ↵Chayim Refael Friedman-8/+83
inside a macro call anymore) *after* the recursive call instead of before it This is because our detection is imperfect, and miss some cases such as an impersonating `test` macro, so we hope we'll expand successfully in this case.
2025-01-26many-seeds: do not use more than 8 threadsRalf Jung-4/+3
2025-01-26many-seeds: in keep-going mode, print how many tests failedRalf Jung-2/+8
2025-01-26prevent weird macOS linker errors from breaking the buildRalf Jung-1/+3
2025-01-26remove `clippy::double_neg`Kalle Wachsmuth-146/+93
2025-01-26Add GenericDefId::StaticIdLukas Wirth-24/+46
2025-01-26Split out `ExpressionStore` from `Body`Lukas Wirth-445/+531
2025-01-26Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obkbors-10/+6
Get rid of `mir::Const::from_ty_const` This function is strange, because it turns valtrees into `mir::Const::Value`, but the rest of the const variants stay as type system consts. All of the callsites except for one in `instsimplify` (array length simplification of `ptr_metadata` call) just go through the valtree arm of the function, so it's easier to just create a `mir::Const` directly for those. For the instsimplify case, if we have a type system const we should *keep* having a type system const, rather than turning it into a `mir::Const::Value`; it doesn't really matter in practice, though, bc `usize` has no padding, but it feels more principled.
2025-01-26Merge pull request #19035 from rust-lang/Veykril-patch-1Lukas Wirth-12/+6
Update outdated permissions section in the README.md
2025-01-26Update outdated permissions section in the README.mdLukas Wirth-12/+6
2025-01-26Merge pull request #19034 from ChayimFriedman2/complete-hidden-variantLukas Wirth-55/+102
fix: Don't complete doc(hidden) enum variants and use trees
2025-01-26tidy: add `build-metrics`-gated feature status serialization许杰友 Jieyou Xu (Joe)-0/+7
Co-authored-by: Jane Losare-Lusby <jlusby42@gmail.com>
2025-01-26features-status-dump: add new build-metrics tool许杰友 Jieyou Xu (Joe)-0/+65
Co-authored-by: Jane Losare-Lusby <jlusby42@gmail.com>
2025-01-26Merge pull request #19033 from ChayimFriedman2/span-1Chayim Refael Friedman-4/+4
fix: Make proc_macro span's line & column 1-indexed, as documented
2025-01-26Make proc_macro span's line & column 1-indexed, as documentedChayim Refael Friedman-4/+4
That is, make the fake number that we return 1 and not 0.
2025-01-26Merge from rustcThe Miri Cronjob Bot-5/+15
2025-01-26Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-01-26Don't complete doc(hidden) enum variants and use treesChayim Refael Friedman-55/+102
Also refactor the check a bit.
2025-01-25Shorten linker output even more when `--verbose` is not presentjyn-1/+10
- Don't show environment variables. Seeing PATH is almost never useful, and it can be extremely long. - For .rlibs in the sysroot, replace crate hashes with a `"-*"` string. This will expand to the full crate name when pasted into the shell. - Move `.rlib` to outside the glob. - Abbreviate the sysroot path to `<sysroot>` wherever it appears in the arguments. This also adds an example of the linker output as a run-make test. Currently it only runs on x86_64-unknown-linux-gnu, because each platform has its own linker arguments. So that it's stable across machines, pass BUILD_ROOT as an argument through compiletest through to run-make tests. - Only use linker-flavor=gnu-cc if we're actually going to compare the output. It doesn't exist on MacOS.
2025-01-25Merge pull request #19020 from ShoyuVanilla/issues-19007Lukas Wirth-35/+129
fix: Prevent infinite recursion of bounds formatting
2025-01-26fix: Prevent infinite recursion of bounds formattingShoyu Vanilla-72/+129
2025-01-25Cleanup body ast ptr defsLukas Wirth-75/+74
2025-01-25BodyCollectorLukas Wirth-77/+91
2025-01-25Combine `pat_hyigene` and `expr_hygiene`Lukas Wirth-15/+13
2025-01-25Merge pull request #19030 from Veykril/push-wuzvopyooznmLukas Wirth-1/+5
fix: Fix markdown horizontal ruler sometimes being treated as a heading
2025-01-25fix: Fix markdown horizontal ruler sometimes being treated as a headingLukas Wirth-1/+5
2025-01-25Use `strict_provenance`Lukas Wirth-39/+8
2025-01-25Skip redundant path search in `resolve_completion_edits`Lukas Wirth-50/+27
2025-01-25Auto merge of #133154 - estebank:issue-133137, r=wesleywiserbors-3/+5
Reword resolve errors caused by likely missing crate in dep tree Reword label and add `help`: ``` error[E0432]: unresolved import `some_novel_crate` --> f704.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` | = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml` ``` Fix #133137.
2025-01-25Merge pull request #19028 from Veykril/push-vuytpkvqzwzsLukas Wirth-20/+89
fix: Fix flyimport not filtering via stability of import path
2025-01-25Fix flyimport not filtering via stability of import pathLukas Wirth-20/+89
2025-01-25Merge pull request #19026 from Veykril/push-wrxrutptywzxLukas Wirth-48/+72
Only collect implicit visibile use symbols if they have renames
2025-01-25Only collect implicit visibile use symbols if they have renamesLukas Wirth-48/+72
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-25Merge pull request #18973 from ThouCheese/feat/nice-nichesLukas Wirth-2/+85
Make niches into nices
2025-01-25Merge pull request #19023 from Wilfred/sequence_type_namesLukas Wirth-10/+93
minor: Suggest better names when a type is a sequence
2025-01-25Rollup merge of #135985 - Zalathar:whats-upvar, r=lqdMatthias Krüger-1/+0
Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes Extracted from #135756. I had to figure out what this test was trying to test, so I might as well write it down for future reference.
2025-01-25Merge from rustcThe Miri Cronjob Bot-232/+257
2025-01-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-01-25Auto merge of #136023 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4 2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000 - Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097) - Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096) - Print globs when workspace members can't be found (rust-lang/cargo#15093) - Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013) - fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
2025-01-24Rollup merge of #135976 - WaffleLapkin:tailcall-nodrop, r=oli-obkMatthias Krüger-2/+2
Don't drop types with no drop glue when building drops for tailcalls this is required as otherwise drops of `&mut` refs count as a usage of a 'two-phase temporary' causing an ICE. fixes #128097 The underlying issue is that the current code generates drops for `&mut` which are later counted as a second use of a two-phase temporary: `bat t.rs -p` ```rust #![expect(incomplete_features)] #![feature(explicit_tail_calls)] fn f(x: &mut ()) { let _y = String::new(); become f(x); } fn main() {} ``` `rustc t.rs -Zdump_mir=f` ```text error: internal compiler error: compiler/rustc_borrowck/src/borrow_set.rs:298:17: found two uses for 2-phase borrow temporary _4: bb2[1] and bb3[0] --> t.rs:6:5 | 6 | become f(x); | ^^^^^^^^^^^ thread 'rustc' panicked at compiler/rustc_borrowck/src/borrow_set.rs:298:17: Box<dyn Any> stack backtrace: [REDACTED] error: aborting due to 1 previous error ``` `bat ./mir_dump/t.f.-------.renumber.0.mir -p -lrust` ```rust // MIR for `f` 0 renumber fn f(_1: &mut ()) -> () { debug x => _1; let mut _0: (); let mut _2: !; let _3: std::string::String; let mut _4: &mut (); scope 1 { debug _y => _3; } bb0: { StorageLive(_3); _3 = String::new() -> [return: bb1, unwind: bb4]; } bb1: { FakeRead(ForLet(None), _3); StorageLive(_4); _4 = &mut (*_1); drop(_3) -> [return: bb2, unwind: bb3]; } bb2: { StorageDead(_3); tailcall f(Spanned { node: move _4, span: t.rs:6:14: 6:15 (#0) }); } bb3 (cleanup): { drop(_4) -> [return: bb4, unwind terminate(cleanup)]; } bb4 (cleanup): { resume; } } ``` Note how `_4 is moved into the tail call in `bb2` and dropped in `bb3`. This PR adds a check that the locals we drop need dropping. r? `@oli-obk` (feel free to reassign, I'm not sure who would be a good reviewer, but thought you might have an idea) cc `@beepster4096,` since you wrote the original drop implementation.
2025-01-24manual: Convert to mdbookWilfred Hughes-2686/+2836
Split manual.adoc into markdown files, one for each chapter. For the parts of the manual that are generated from source code doc comments, update the comments to use markdown syntax and update the code generators to write to `generated.md` files. For the weekly release, stop copying the .adoc files to the `rust-analyzer/rust-analyzer.github.io` at release time. Instead, we'll sync the manual hourly from this repository. See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226 for the sync. This PR should be merged first, and that PR needs to be merged before the next weekly release. This change is based on #15795, but rebased and updated. I've also manually checked each page for markdown syntax issues and fixed any I encountered. Co-authored-by: Lukas Wirth <lukastw97@gmail.com> Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-24Update cargoWeihang Lo-0/+0
2025-01-24minor: Suggest better names when a type is a sequenceWilfred Hughes-10/+93
Previously, we'd suggest a type of `vec` for a value of type `Vec<T>`, which is rarely what the user wants. We also had no suggestions for values of type `&[T]`. Instead, try to pluralise the inner type name, and fall back to `items`.
2025-01-24bless miri testWaffle Lapkin-2/+2
I'm not sure why the span improved but that's nice!