summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-11-25Revert "Prepare for omittiong parts of completion data that need to be resolved"Kirill Bulatov-99/+16
This reverts commit 008d5130b7dce96693cd9c39cd5e71d9dc73bd5b.
2024-11-25Revert "Omit completion fields to be resolved later"Kirill Bulatov-99/+62
This reverts commit cc2686c1a9cf9a9e089f669d9d179812618008a7.
2024-11-25Revert "Resolve completion items"Kirill Bulatov-42/+11
This reverts commit ecae5a8b33abfa7b084aa0bd29d47f5b98ea2527.
2024-11-25Revert "Less clones"Kirill Bulatov-5/+5
This reverts commit b82c5ceba8cfb595f3556593fb3eb9cd03b1fb5c.
2024-11-25Revert "Fix the test"Kirill Bulatov-1/+1
This reverts commit b24723a5c74ab4881539bb97c7608c147f07c25e.
2024-11-25Revert "Small fixes"Kirill Bulatov-6/+6
This reverts commit 536ac471c47f06fd53daa651424ea5a78189491c.
2024-11-25Revert "Use completion item indices instead of property matching when ↵Kirill Bulatov-33/+15
searching for the completion item to resolve" This reverts commit fa46a9e2b605de60b11a29f5951e650c3c0f5089.
2024-11-25Revert "Update the file hash"Kirill Bulatov-1/+1
This reverts commit f0db79f31ada049bf490c8f27be7443f45460f09.
2024-11-25Revert "force "HEAD" for non-CI and `git_upstream_merge_base` for CI ↵Pietro Albini-13/+3
environment" This reverts commit 33ac202904e7820268b71b3280a7d2590378e3b9.
2024-11-21Auto merge of #13600 - samueltardieu:push-tzuvnutssmrs, r=xFrednetbors-2/+14
borrow_deref_ref: do not trigger on `&raw` references changelog: [`borrow_deref_ref`]: do not trigger on `&raw` references Fix #13584
2024-11-21Auto merge of #13553 - SpriteOvO:manual_is_power_of_two-change-category, ↵bors-2/+4
r=llogiq Change the category of `manual_is_power_of_two` to `pedantic` Fixes #13547. The value being checked might be a bit flag, suggesting `is_power_of_two` for it would make the code unreadable. changelog: [`manual_is_power_of_two`]: Change the category to `pedantic`
2024-11-13Update the file hashKirill Bulatov-1/+1
2024-11-13Use completion item indices instead of property matching when searching for ↵Kirill Bulatov-15/+33
the completion item to resolve
2024-10-29Update cargoWeihang Lo-0/+0
2024-10-17Move `too_long_first_doc_paragraph` to `nursery`Philipp Krones-1/+1
(cherry picked from commit a365aebdf03872722b8c78bdeb62c43851f0c72f)
2024-10-13Rollup merge of #131642 - jieyouxu:build-fail-check-fail, r=KobzolMatthias Krüger-7/+26
Special case error message for a `build-fail` test that failed check build A `build-fail` test requires that a check build (roughly `--emit=metadata`, no codegen) succeeds but fails later. Previously, if its check build failed, the user will see the error message ``` error: test compilation failed although it shouldn't! ``` which is confusing. Because the test is `build-fail`, we want the test compilation to fail! This error message doesn't account for the difference between a check build and a complete build, so let's special case the error message for a `build-fail` test whose check build failed to instead say ``` error: `build-fail` test is required to pass check build, but check build failed ``` Fixes #130894.
2024-10-13Rollup merge of #131641 - RalfJung:unicode-bitset-static, r=dtolnayMatthias Krüger-4/+4
switch unicode-data bitsets back to 'static' Back in https://github.com/rust-lang/rust/pull/101401, these were changed to `const` to make some functions `const fn`. However, `@dtolnay` was [not happy](https://github.com/rust-lang/rust/issues/101400#issuecomment-1742500968) about this. Meanwhile, `const fn` can access immutable statics like these, so we can change this back. Part of https://github.com/rust-lang/rust/issues/101400.
2024-10-13Rollup merge of #131638 - Zalathar:debuggers, r=jieyouxuMatthias Krüger-274/+290
compiletest: Move debugger setup code out of `lib.rs` These functions contain a few hundred lines of code for dealing with debuggers (for `debuginfo` tests), and don't really belong in the crate root. Moving them out to their own module makes `lib.rs` easier to follow.
2024-10-13Rollup merge of #131614 - jieyouxu:rmake-no-rev, r=KobzolMatthias Krüger-5/+14
Error on trying to use revisions in `run-make` tests Currently, `run-make` tests do not support revisions.
2024-10-13Rollup merge of #131585 - Zalathar:original-line, r=jieyouxuMatthias Krüger-29/+10
compiletest: Remove the one thing that was checking a directive's `original_line` This special handling of `ignore-tidy*` was introduced during the migration to `//`@`` directives (#120881), and has become unnecessary after the subsequent removal of the legacy directive check (#131392).
2024-10-13switch unicode-data back to 'static'Ralf Jung-4/+4
2024-10-13Special case error message for a `build-fail` test that failed check build许杰友 Jieyou Xu (Joe)-7/+26
2024-10-13Move debugger setup code out of `lib.rs`Zalathar-274/+290
2024-10-12Rollup merge of #131358 - onur-ozkan:129528, r=Mark-SimulacrumTrevor Gross-3/+13
force "HEAD" for non-CI and `git_upstream_merge_base` for CI environment When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use `git_upstream_merge_base` to correctly track modified files as bors commits may be in `HEAD` but not yet on the upstream remote. This is also an alternative fix for https://github.com/rust-lang/rust/issues/129528 since https://github.com/rust-lang/rust/pull/131331 reverts the previous fix attempts.
2024-10-12Rollup merge of #131120 - tgross35:stabilize-const_option, r=RalfJungTrevor Gross-3/+2
Stabilize `const_option` This makes the following API stable in const contexts: ```rust impl<T> Option<T> { pub const fn as_mut(&mut self) -> Option<&mut T>; pub const fn expect(self, msg: &str) -> T; pub const fn unwrap(self) -> T; pub const unsafe fn unwrap_unchecked(self) -> T; pub const fn take(&mut self) -> Option<T>; pub const fn replace(&mut self, value: T) -> Option<T>; } impl<T> Option<&T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T> Option<&mut T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T, E> Option<Result<T, E>> { pub const fn transpose(self) -> Result<Option<T>, E> } impl<T> Option<Option<T>> { pub const fn flatten(self) -> Option<T>; } ``` The following functions make use of the unstable `const_precise_live_drops` feature: - `expect` - `unwrap` - `unwrap_unchecked` - `transpose` - `flatten` Fixes: <https://github.com/rust-lang/rust/issues/67441>
2024-10-13Error on trying to use revisions in `run-make` tests许杰友 Jieyou Xu (Joe)-5/+14
Currently `run-make` tests do not support revisions.
2024-10-13Remove the one thing that was checking a directive's `original_line`Zalathar-28/+4
2024-10-13Rename `HeaderLine` to `DirectiveLine`Zalathar-8/+13
2024-10-12Stabilize `const_option`Trevor Gross-3/+2
This makes the following API stable in const contexts: impl<T> Option<T> { pub const fn as_mut(&mut self) -> Option<&mut T>; pub const fn expect(self, msg: &str) -> T; pub const fn unwrap(self) -> T; pub const unsafe fn unwrap_unchecked(self) -> T; pub const fn take(&mut self) -> Option<T>; pub const fn replace(&mut self, value: T) -> Option<T>; } impl<T> Option<&T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T> Option<&mut T> { pub const fn copied(self) -> Option<T> where T: Copy; } impl<T, E> Option<Result<T, E>> { pub const fn transpose(self) -> Result<Option<T>, E> } impl<T> Option<Option<T>> { pub const fn flatten(self) -> Option<T>; } The following functions make use of the unstable `const_precise_live_drops` feature: - `expect` - `unwrap` - `unwrap_unchecked` - `transpose` - `flatten` Fixes: <https://github.com/rust-lang/rust/issues/67441>
2024-10-12Rollup merge of #131277 - ↵Matthias Krüger-34/+32
ismailarilik:handle-potential-query-instability-lint-for-clippy, r=xFrednet Handle `clippy` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`src/tools/clippy/clippy_lints/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/src/tools/clippy/clippy_lints/src/lib.rs#L30) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-12force "HEAD" for non-CI and `git_upstream_merge_base` for CI environmentonur-ozkan-3/+13
When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use `git_upstream_merge_base` to correctly track modified files as bors commits may be in `HEAD` but not yet on the upstream remote. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-11Rollup merge of #131576 - Zalathar:tests-tests, r=jieyouxuTrevor Gross-36/+30
Flatten redundant test module `run_make_support::diff::tests::tests` This module is already named `tests`, and is already gated by `#[cfg(test)]`, so there's no need for it to also contain `mod tests`. r? jieyouxu
2024-10-11Rollup merge of #124874 - jedbrown:float-mul-add-fast, r=saethlinTrevor Gross-0/+93
intrinsics fmuladdf{32,64}: expose llvm.fmuladd.* semantics Add intrinsics `fmuladd{f32,f64}`. This computes `(a * b) + c`, to be fused if the code generator determines that (i) the target instruction set has support for a fused operation, and (ii) that the fused operation is more efficient than the equivalent, separate pair of `mul` and `add` instructions. https://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic The codegen_cranelift uses the `fma` function from libc, which is a correct implementation, but without the desired performance semantic. I think this requires an update to cranelift to expose a suitable instruction in its IR. I have not tested with codegen_gcc, but it should behave the same way (using `fma` from libc). --- This topic has been discussed a few times on Zulip and was suggested, for example, by `@workingjubilee` in [Effect of fma disabled](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Effect.20of.20fma.20disabled/near/274179331).
2024-10-12Avoid cross-file glob importZalathar-1/+1
2024-10-12Flatten redundant test module `run_make_support::diff::tests::tests`Zalathar-36/+30
2024-10-11Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, ↵Trevor Gross-22/+18
r=aDotInTheVoid rustdoc-json: change item ID's repr from a string to an int Following [this discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Optimizing.20the.20.60Id.60.20type.20in.20.60rustdoc-types.60), I've changed the repr of `rustdoc_json_types::Id` from a String to a u32, by adding a `clean::ItemId` interner to `JsonRenderer` r? ``@aDotInTheVoid``
2024-10-11intrinsics.fmuladdf{16,32,64,128}: expose llvm.fmuladd.* semanticsJed Brown-0/+93
Add intrinsics `fmuladd{f16,f32,f64,f128}`. This computes `(a * b) + c`, to be fused if the code generator determines that (i) the target instruction set has support for a fused operation, and (ii) that the fused operation is more efficient than the equivalent, separate pair of `mul` and `add` instructions. https://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic MIRI support is included for f32 and f64. The codegen_cranelift uses the `fma` function from libc, which is a correct implementation, but without the desired performance semantic. I think this requires an update to cranelift to expose a suitable instruction in its IR. I have not tested with codegen_gcc, but it should behave the same way (using `fma` from libc).
2024-10-11Auto merge of #131547 - matthiaskrgr:rollup-ui4p744, r=matthiaskrgrbors-68/+87
Rollup of 6 pull requests Successful merges: - #129079 (Create `_imp__` symbols also when doing ThinLTO) - #131208 (ABI: Pass aggregates by value on AIX) - #131394 (fix(rustdoc): add space between struct fields and their descriptions) - #131519 (Use Default visibility for rustc-generated C symbol declarations) - #131541 (compiletest: Extract auxiliary-crate properties to their own module/struct) - #131542 (next-solver: remove outdated FIXMEs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-11Rollup merge of #131541 - Zalathar:aux-props, r=jieyouxuMatthias Krüger-68/+87
compiletest: Extract auxiliary-crate properties to their own module/struct This moves the values of the 4 different `aux-*` directives into their own sub-struct. That struct, along with its directive-parsing code, can then be shared by both `TestProps` and `EarlyProps`. The final patch also fixes an oversight in up-to-date checking, by including *all* auxiliary crates in the timestamp, not just ordinary `aux-build` ones.
2024-10-11Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiserbors-43/+0
Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in #115131 and #115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes #117942 Fixes #121161 Fixes #121263 Fixes #121299 Fixes #121722 Fixes #121799 Fixes #126969 Fixes #131041 Tracking: * https://github.com/rust-lang/rust/issues/49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: https://github.com/rust-lang/rust/issues/49804#issuecomment-1972619108
2024-10-11Include all kinds of auxiliary crates in the up-to-date timestampZalathar-1/+17
This was previously only including ordinary `aux-build` crates, and not files associated with the other three kinds of auxiliary crate.
2024-10-11Use the same `AuxProps` parser for `EarlyProps`Zalathar-28/+9
2024-10-11Extract auxiliary-crate properties to their own module/structZalathar-40/+62
2024-10-11Rollup merge of #131476 - Zalathar:highest-counter, r=jieyouxuMatthias Krüger-0/+42
coverage: Include the highest counter ID seen in `.cov-map` dumps When making changes that have a large impact on coverage counter creation, this makes it easier to see whether the number of physical counters has changed. (The highest counter ID seen in coverage maps is not necessarily the same as the number of physical counters actually used by the instrumented code, but it's the best approximation we can get from looking only at the coverage maps, and it should be reasonably accurate in most cases.) Extracted from #131398, since I'm still considering whether to make those changes as-is, whereas this PR is useful and good on its own.
2024-10-11Rollup merge of #131464 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-1/+1
Update wasm-component-ld to 0.5.10 This pulls in a bug fix relative to the 0.5.9 release which was updated-to recently.
2024-10-11coverage: Include the highest counter ID seen in `.cov-map` dumpsZalathar-0/+42
When making changes that have a large impact on coverage counter creation, this makes it easier to see whether the number of physical counters has changed. (The highest counter ID seen in coverage maps is not necessarily the same as the number of physical counters actually used by the instrumented code, but it's the best approximation we can get from looking only at the coverage maps, and it should be reasonably accurate in most cases.)
2024-10-11Rollup merge of #131525 - Zalathar:emit-asm, r=jieyouxuStuart Cook-17/+8
compiletest: Simplify the choice of `--emit` mode for assembly tests Tiny little cleanup that I noticed while working on #131524. No functional change. Historically, the original code structure (#58791) predates the `Emit` enum (#103298), so it was manually adding `--emit` flags to the compiler invocation. But now the match can just evaluate to the appropriate `Emit` value directly.
2024-10-11Simplify the choice of `--emit` mode for assembly testsZalathar-17/+8
2024-10-11compiletest: Remove the magic hacks for finding output with `lto=thin`Zalathar-50/+6
This hack was intended to handle the case where `-Clto=thin` causes the compiler to emit multiple output files (when producing LLVM-IR or assembly). The hack only affects 4 tests, of which 3 are just meta-tests for the hack itself. The one remaining test that motivated the hack currently doesn't even need it! (`tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs`)
2024-10-10Auto merge of #131511 - matthiaskrgr:rollup-56qr0e5, r=matthiaskrgrbors-4/+7
Rollup of 9 pull requests Successful merges: - #130308 (codegen_ssa: consolidate tied target checks) - #130538 (Stabilize const `{slice,array}::from_mut`) - #130741 (rustc_target: Add sme-b16b16 as an explicit aarch64 target feature) - #131033 (Precise capturing in traits) - #131442 (Match std `RUSTFLAGS` for host and target for `mir-opt` test suite to fix double std build/rebuilds) - #131470 (add test infra to explicitely test rustc with autodiff/enzyme disabled) - #131475 (Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" ) - #131493 (Avoid redundant sysroot additions to `PATH` when linking) - #131509 (Update .mailmap) r? `@ghost` `@rustbot` modify labels: rollup