Commit Graph

268150 Commits

Author SHA1 Message Date
Ralf Jung
89623439f7 mark InterpResult as must_use 2024-10-12 13:13:50 +02:00
bors
fb20e4d3b9 Auto merge of #131573 - tgross35:rollup-r7l182a, r=tgross35
Rollup of 7 pull requests

Successful merges:

 - #130078 (rustdoc-json: change item ID's repr from a string to an int)
 - #131065 (Port sort-research-rs test suite to Rust stdlib tests)
 - #131109 (Stabilize `debug_more_non_exhaustive`)
 - #131287 (stabilize const_result)
 - #131463 (Stabilise `const_char_encode_utf8`.)
 - #131543 (coverage: Remove code related to LLVM 17)
 - #131552 (RustWrapper: adapt for rename of Intrinsic::getDeclaration)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-11 23:57:42 +00:00
Trevor Gross
6f76d6e1a3
Rollup merge of #131552 - durin42:llvm-20-getOrInsertDeclaration, r=cuviper
RustWrapper: adapt for rename of Intrinsic::getDeclaration

llvm/llvm-project@fa789dffb1 renamed getDeclaration to getOrInsertDeclaration.

`@rustbot` label: +llvm-main
2024-10-11 16:53:50 -05:00
Trevor Gross
2c385ba329
Rollup merge of #131543 - Zalathar:goodbye-llvm-17, r=petrochenkov
coverage: Remove code related to LLVM 17

In-tree LLVM is 19, and the minimum external LLVM was increased to 18 in #130487.
2024-10-11 16:53:49 -05:00
Trevor Gross
8ea41b903f
Rollup merge of #131463 - bjoernager:const-char-encode-utf8, r=RalfJung
Stabilise `const_char_encode_utf8`.

Closes: #130512

This PR stabilises the `const_char_encode_utf8` feature gate (i.e. support for `char::encode_utf8` in const scenarios).

Note that the linked tracking issue is currently awaiting FCP.
2024-10-11 16:53:49 -05:00
Trevor Gross
622fc5e0f3
Rollup merge of #131287 - RalfJung:const_result, r=tgross35
stabilize const_result

Waiting for FCP to complete in https://github.com/rust-lang/rust/issues/82814

Fixes #82814
2024-10-11 16:53:48 -05:00
Trevor Gross
8797cfed68
Rollup merge of #131109 - tgross35:stabilize-debug_more_non_exhaustive, r=joboet
Stabilize `debug_more_non_exhaustive`

Fixes: https://github.com/rust-lang/rust/issues/127942
2024-10-11 16:53:47 -05:00
Trevor Gross
f241d0a230
Rollup merge of #131065 - Voultapher:port-sort-test-suite, r=thomcc
Port sort-research-rs test suite to Rust stdlib tests

This PR is a followup to https://github.com/rust-lang/rust/pull/124032. It replaces the tests that test the various sort functions in the standard library with a test-suite developed as part of https://github.com/Voultapher/sort-research-rs. The current tests suffer a couple of problems:

- They don't cover important real world patterns that the implementations take advantage of and execute special code for.
- The input lengths tested miss out on code paths. For example, important safety property tests never reach the quicksort part of the implementation.
- The miri side is often limited to `len <= 20` which means it very thoroughly tests the insertion sort, which accounts for 19 out of 1.5k LoC.
- They are split into to core and alloc, causing code duplication and uneven coverage.
- ~~The randomness is tied to a caller location, wasting the space exploration capabilities of randomized testing.~~ The randomness is not repeatable, as it relies on `std:#️⃣:RandomState::new().build_hasher()`.

Most of these issues existed before https://github.com/rust-lang/rust/pull/124032, but they are intensified by it. One thing that is new and requires additional testing, is that the new sort implementations specialize based on type properties. For example `Freeze` and non `Freeze` execute different code paths.

Effectively there are three dimensions that matter:

- Input type
- Input length
- Input pattern

The ported test-suite tests various properties along all three dimensions, greatly improving test coverage. It side-steps the miri issue by preferring sampled approaches. For example the test that checks if after a panic the set of elements is still the original one, doesn't do so for every single possible panic opportunity but rather it picks one at random, and performs this test across a range of input length, which varies the panic point across them. This allows regular execution to easily test inputs of length 10k, and miri execution up to 100 which covers significantly more code. The randomness used is tied to a fixed - but random per process execution - seed. This allows for fully repeatable tests and fuzzer like exploration across multiple runs.

Structure wise, the tests are previously found in the core integration tests for `sort_unstable` and alloc unit tests for `sort`. The new test-suite was developed to be a purely black-box approach, which makes integration testing the better place, because it can't accidentally rely on internal access. Because unwinding support is required the tests can't be in core, even if the implementation is, so they are now part of the alloc integration tests. Are there architectures that can only build and test core and not alloc? If so, do such platforms require sort testing? For what it's worth the current implementation state passes miri `--target mips64-unknown-linux-gnuabi64` which is big endian.

The test-suite also contains tests for properties that were and are given by the current and previous implementations, and likely relied upon by users but weren't tested. For example `self_cmp` tests that the two parameters `a` and `b` passed into the comparison function are never references to the same object, which if the user is sorting for example a `&mut [Mutex<i32>]` could lead to a deadlock.

Instead of using the hashed caller location as rand seed, it uses seconds since unix epoch / 10, which given timestamps in the CI should be reasonably easy to reproduce, but also allows fuzzer like space exploration.

---

Test run-time changes:

Setup:

```
Linux 6.10
rustc 1.83.0-nightly (f79a912d9 2024-09-18)
AMD Ryzen 9 5900X 12-Core Processor (Zen 3 micro-architecture)
CPU boost enabled.
```

master: e9df22f

Before core integration tests:

```
$ LD_LIBRARY_PATH=build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/ hyperfine build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/coretests-219cbd0308a49e2f
  Time (mean ± σ):     869.6 ms ±  21.1 ms    [User: 1327.6 ms, System: 95.1 ms]
  Range (min … max):   845.4 ms … 917.0 ms    10 runs

# MIRIFLAGS="-Zmiri-disable-isolation" to get real time
$ MIRIFLAGS="-Zmiri-disable-isolation" ./x.py miri library/core
  finished in 738.44s
```

After core integration tests:

```
$ LD_LIBRARY_PATH=build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/ hyperfine build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/coretests-219cbd0308a49e2f
  Time (mean ± σ):     865.1 ms ±  14.7 ms    [User: 1283.5 ms, System: 88.4 ms]
  Range (min … max):   836.2 ms … 885.7 ms    10 runs

$ MIRIFLAGS="-Zmiri-disable-isolation" ./x.py miri library/core
  finished in 752.35s
```

Before alloc unit tests:

```
LD_LIBRARY_PATH=build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/ hyperfine build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/alloc-19c15e6e8565aa54
  Time (mean ± σ):     295.0 ms ±   9.9 ms    [User: 719.6 ms, System: 35.3 ms]
  Range (min … max):   284.9 ms … 319.3 ms    10 runs

$ MIRIFLAGS="-Zmiri-disable-isolation" ./x.py miri library/alloc
  finished in 322.75s
```

After alloc unit tests:

```
LD_LIBRARY_PATH=build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/ hyperfine build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/alloc-19c15e6e8565aa54
  Time (mean ± σ):      97.4 ms ±   4.1 ms    [User: 297.7 ms, System: 28.6 ms]
  Range (min … max):    92.3 ms … 109.2 ms    27 runs

$ MIRIFLAGS="-Zmiri-disable-isolation" ./x.py miri library/alloc
  finished in 309.18s
```

Before alloc integration tests:

```
$ LD_LIBRARY_PATH=build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/ hyperfine build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/alloctests-439e7300c61a8046
  Time (mean ± σ):     103.2 ms ±   1.7 ms    [User: 135.7 ms, System: 39.4 ms]
  Range (min … max):    99.7 ms … 107.3 ms    28 runs

$ MIRIFLAGS="-Zmiri-disable-isolation" ./x.py miri library/alloc
  finished in 231.35s
```

After alloc integration tests:

```
$ LD_LIBRARY_PATH=build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/ hyperfine build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/alloctests-439e7300c61a8046
  Time (mean ± σ):     379.8 ms ±   4.7 ms    [User: 4620.5 ms, System: 1157.2 ms]
  Range (min … max):   373.6 ms … 386.9 ms    10 runs

$ MIRIFLAGS="-Zmiri-disable-isolation" ./x.py miri library/alloc
  finished in 449.24s
```

In my opinion the results don't change iterative library development or CI execution in meaningful ways. For example currently the library doc-tests take ~66s and incremental compilation takes 10+ seconds. However I only have limited knowledge of the various local development workflows that exist, and might be missing one that is significantly impacted by this change.
2024-10-11 16:53:47 -05:00
Trevor Gross
05c0591321
Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, 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-11 16:53:46 -05:00
bors
1bc403daad Auto merge of #131531 - onur-ozkan:move-dummy-commit, r=Kobzol
move dummy commit logic into x86_64-gnu-llvm-18

Doing the dummy commit logic in a runner that uses CI-LLVM breaks in merge CI. This should be properly fixed by https://github.com/rust-lang/rust/pull/131358 (see the [actual problem](https://github.com/rust-lang/rust/pull/131448#issuecomment-2406516261)). Since we can also fix it by moving the dummy commit into the runner where we use in-tree LLVM, so why not do that as well?
2024-10-11 21:29:26 +00:00
Ralf Jung
92f65684a8 stabilize const_result 2024-10-11 18:34:28 +02:00
Augie Fackler
19345d5c6e RustWrapper: adapt for rename of Intrinsic::getDeclaration
llvm/llvm-project@fa789dffb1 renamed
getDeclaration to getOrInsertDeclaration.

@rustbot label: +llvm-main
2024-10-11 12:29:49 -04:00
bors
01e2fff90c Auto merge of #131547 - matthiaskrgr:rollup-ui4p744, r=matthiaskrgr
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-11 16:27:23 +00:00
Matthias Krüger
b18e1aa612
Rollup merge of #131542 - lcnr:new-solver-fixmes, r=compiler-errors
next-solver: remove outdated FIXMEs

r? `@compiler-errors`
2024-10-11 15:36:53 +02:00
Matthias Krüger
7f79c1e640
Rollup merge of #131541 - Zalathar:aux-props, r=jieyouxu
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-11 15:36:53 +02:00
Matthias Krüger
33b1264540
Rollup merge of #131519 - davidlattimore:intrinsics-default-vis, r=Urgau
Use Default visibility for rustc-generated C symbol declarations

Non-default visibilities should only be used for definitions, not declarations, otherwise linking can fail.

This is based on https://github.com/rust-lang/rust/pull/123994.

Issue https://github.com/rust-lang/rust/issues/123427

When I changed `default-hidden-visibility` to `default-visibility` in https://github.com/rust-lang/rust/pull/130005, I updated all places in the code that used `default-hidden-visibility`, replicating the hidden-visibility bug to also happen for protected visibility.

Without this change, trying to build rustc with `-Z default-visibility=protected` fails with a link error.
2024-10-11 15:36:52 +02:00
Matthias Krüger
103c71686a
Rollup merge of #131394 - ismailarilik:fix/rustdoc/add-space-between-struct-fields-and-their-descriptions, r=GuillaumeGomez
fix(rustdoc): add space between struct fields and their descriptions

Stolen from #128541.
Fixes #128260.

<table>
  <thead>
    <tr>
      <th scope="col">Before</th>
      <th scope="col">After</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td scope="row">
        <img
          src="https://github.com/user-attachments/assets/b1d3cb47-77c9-4897-a5d2-2192b11cb8a3"
        />
      </td>
      <td>
        <img
          src="https://github.com/user-attachments/assets/0b104672-d2be-49f4-ac9b-3506526fe2f1"
        />
      </td>
    </tr>
  </tbody>
</table>

<table>
  <thead>
    <tr>
      <th scope="col">Before</th>
      <th scope="col">After</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td scope="row">
        <img
          src="https://github.com/user-attachments/assets/650c3e74-a067-492a-9ba3-557f9214f875"
        />
      </td>
      <td>
        <img
          src="https://github.com/user-attachments/assets/413ef9b0-8fca-4e16-978a-7b88d05299dc"
        />
      </td>
    </tr>
  </tbody>
</table>

Unlike original PR, I didn't add space between field headers; I put it between headers and descriptions. So if there are only headers, the space is not changed. Otherwise, I put a space like the space between paragraphs (.75em) which makes sense for me but feel free to adjust it or ask me to do so.

r? `@GuillaumeGomez`
2024-10-11 15:36:52 +02:00
Matthias Krüger
fc81a7c1d5
Rollup merge of #131208 - mustartt:aix-call-abi, r=davidtwco
ABI: Pass aggregates by value on AIX

On AIX we pass aggregates byval. Adds new ABI for AIX for powerpc64.

313ad85dfa/clang/lib/CodeGen/Targets/PPC.cpp (L216)

Fixes the following 2 testcases on AIX:
```
tests/ui/abi/extern/extern-pass-TwoU16s.rs
tests/ui/abi/extern/extern-pass-TwoU8s.rs
```
2024-10-11 15:36:51 +02:00
Matthias Krüger
7c79621462
Rollup merge of #129079 - Zoxc:thinlto_imp_symbols, r=wesleywiser
Create `_imp__` symbols also when doing ThinLTO

When generating a rlib crate on Windows we create `dllimport` / `_imp__` symbols for each global. This effectively makes the rlib contain an import library for itself and allows them to both be dynamically and statically linked. However when doing ThinLTO we do not generate these and thus we end up with missing symbols. Microsoft's `link` can fix these up (and emits warnings), but `lld` seems to currently be unable to.

This PR also does this generation for ThinLTO avoiding those issues with `lld` and also avoids the warnings on `link`.

This is an workaround for https://github.com/rust-lang/rust/issues/81408.

cc `@lqd`
2024-10-11 15:36:51 +02:00
bors
f4966590d8 Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiser
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-11 13:11:13 +00:00
onur-ozkan
b72dbd56ca move dummy commit logic into x86_64-gnu-llvm-18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-11 15:30:51 +03:00
Zalathar
9357277de7 coverage: Remove code related to LLVM 17 2024-10-11 21:44:36 +11:00
lcnr
5fd7be97e9 remove outdated FIXMEs 2024-10-11 10:41:10 +00:00
bors
484c8e78cb Auto merge of #131540 - matthiaskrgr:rollup-elbgu1w, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #131464 (Update wasm-component-ld to 0.5.10)
 - #131476 (coverage: Include the highest counter ID seen in `.cov-map` dumps)
 - #131497 (Add myself to bootstrap review rotation)
 - #131498 (Consider outermost const-anon in `non_local_def` lint)
 - #131512 (Fixing rustDoc for LayoutError.)
 - #131529 (rustdoc-json-types: fix typo in comment)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-11 10:28:07 +00:00
Zalathar
ec662b9c09 Include all kinds of auxiliary crates in the up-to-date timestamp
This was previously only including ordinary `aux-build` crates, and not files
associated with the other three kinds of auxiliary crate.
2024-10-11 21:27:31 +11:00
Zalathar
188f7ce91b Use the same AuxProps parser for EarlyProps 2024-10-11 21:27:30 +11:00
Zalathar
78fd3b5319 Extract auxiliary-crate properties to their own module/struct 2024-10-11 21:24:54 +11:00
Matthias Krüger
d590d21ba7
Rollup merge of #131529 - suaviloquence:1-fix-typo, r=aDotInTheVoid
rustdoc-json-types: fix typo in comment
2024-10-11 12:21:08 +02:00
Matthias Krüger
cac36288b5
Rollup merge of #131512 - j7nw4r:master, r=jhpratt
Fixing rustDoc for LayoutError.

I started reading the the std lib from start to finish and noticed that this rustdoc comment wasn't correct.
2024-10-11 12:21:08 +02:00
Matthias Krüger
e00f49db17
Rollup merge of #131498 - Urgau:transparent-const-anons, r=lcnr
Consider outermost const-anon in `non_local_def` lint

This PR change the logic for finding the parent of the `impl` definition in the `non_local_definitions` lint to consider multiple level of const-anon items, instead of only one currently.

I also took the opportunity to cleanup the related code.

cc ``@traviscross``
Fixes https://github.com/rust-lang/rust/issues/131474
2024-10-11 12:21:07 +02:00
Matthias Krüger
0969882628
Rollup merge of #131497 - jieyouxu:spin, r=onur-ozkan
Add myself to bootstrap review rotation

r? `@onur-ozkan`
2024-10-11 12:21:06 +02:00
Matthias Krüger
c319be2c70
Rollup merge of #131476 - Zalathar:highest-counter, r=jieyouxu
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-11 12:21:06 +02:00
Matthias Krüger
007d635ff6
Rollup merge of #131464 - alexcrichton:update-wasm-component-ld, r=jieyouxu
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-11 12:21:05 +02:00
Zalathar
599f95ecc2 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.)
2024-10-11 21:04:37 +11:00
Urgau
7e05da8d42 Consider outermost const-anon in non_local_def lint 2024-10-11 09:39:53 +02:00
bors
ce697f919d Auto merge of #131532 - Zalathar:rollup-688kw5t, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - #131305 (make `llvm::is_ci_llvm_modified` logic more precise)
 - #131524 (compiletest: Remove the magic hacks for finding output with `lto=thin`)
 - #131525 (compiletest: Simplify the choice of `--emit` mode for assembly tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-11 07:13:49 +00:00
Stuart Cook
3bb522202f
Rollup merge of #131525 - Zalathar:emit-asm, r=jieyouxu
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-11 17:46:12 +11:00
Stuart Cook
f6bdf711cf
Rollup merge of #131524 - Zalathar:less-thinlto-magic, r=jieyouxu
compiletest: Remove the magic hacks for finding output with `lto=thin`

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-11 17:46:12 +11:00
Stuart Cook
c4e7425782
Rollup merge of #131305 - onur-ozkan:131303, r=Kobzol
make `llvm::is_ci_llvm_modified` logic more precise

Fixes #131303.
2024-10-11 17:46:11 +11:00
m
1b5c05433a
fix typo in rustdoc-json-types comment 2024-10-10 23:18:06 -07:00
bors
0321e73d1c Auto merge of #131517 - aDotInTheVoid:rdj-safe-extern-test, r=GuillaumeGomez
rustdoc-json: Add tests for unsafe/safe extern blocks (RFC 3484)

Closes https://github.com/rust-lang/rust/issues/126786, turns out this all Just Works (TM)

Tracking issue: #123743

r? `@GuillaumeGomez`
2024-10-11 03:23:45 +00:00
Zalathar
4637630ed7 Simplify the choice of --emit mode for assembly tests 2024-10-11 12:09:08 +11:00
Zalathar
96224d80ce compiletest: Remove the magic hacks for finding output with lto=thin
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-11 11:28:42 +11:00
bors
249df9e791 Auto merge of #131444 - onur-ozkan:hotfix-ci, r=Kobzol
stabilize `ci_rustc_if_unchanged_logic` test

Makes `ci_rustc_if_unchanged_logic` test more stable and re-enables it. Previously, it was expecting CI-rustc to be used all the time when there were no changes, which wasn’t always the case. Purpose of this test is making sure we don't use CI-rustc while there are changes in compiler and/or library, but we don't really need to cover cases where CI-rustc is not enabled.

Second commit was pushed for making a change in the compiler tree, so `ci_rustc_if_unchanged_logic` can be tested properly in merge CI.
2024-10-10 23:51:17 +00:00
David Lattimore
42c0494499 Use Default visibility for rustc-generated C symbol declarations
Non-default visibilities should only be used for definitions, not
declarations, otherwise linking can fail.

Co-authored-by: Collin Baker <collinbaker@chromium.org>
2024-10-11 08:43:27 +11:00
Alona Enraght-Moony
8a9b67028c rustdoc-json: Add tests for unsafe/safe extern blocks (RFC 3484) 2024-10-10 20:53:57 +00:00
bors
52fd998399 Auto merge of #131511 - matthiaskrgr:rollup-56qr0e5, r=matthiaskrgr
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
2024-10-10 20:25:54 +00:00
Johnathan W
8b754fbb4f Fixing rustDoc for LayoutError. 2024-10-10 16:18:56 -04:00
Matthias Krüger
8ddd3279c1
Rollup merge of #131509 - P1n3appl3:patch-1, r=aDotInTheVoid
Update .mailmap

r? `@aDotInTheVoid`
2024-10-10 22:00:51 +02:00
Matthias Krüger
e88cc517e8
Rollup merge of #131493 - madsmtm:avoid-redundant-linker-path, r=jieyouxu
Avoid redundant sysroot additions to `PATH` when linking

Currently, `rustc` prepends `$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin` to the `PATH` three times before invoking the linker, which is unnecessary, once should be enough.

Spotted this while trying to get `-Clinker-flavor=gcc` and `-Clinker-flavor=ld` closer together, not really important.

`````@rustbot````` A-linkage
2024-10-10 22:00:50 +02:00