Commit Graph

248186 Commits

Author SHA1 Message Date
Augie Fackler
ef626d772f PassWrapper: update for llvm/llvm-project@a331937197
@rustbot label: +llvm-main
2024-03-07 10:24:48 -05:00
bors
8c9a75b323 Auto merge of #121154 - oli-obk:track_errors11, r=estebank
Merge `check_mod_impl_wf` and `check_mod_type_wf`

This still causes some funny diagnostics, but I'm not sure they can be fixed without a larger change, which I'd like to avoid here.

Reducing the number of times we iterate over the same items at this high level helps avoid parallel-compiler bottlenecks.
2024-03-07 10:18:00 +00:00
bors
51f483944d Auto merge of #121866 - Kobzol:opt-dist-find-llvm, r=Mark-Simulacrum
Modify opt-dist logic for finding LLVM artifacts

This is the `rustc` side of fixing https://github.com/rust-lang/rust/pull/121395#issuecomment-1973572885.
2024-03-07 07:31:34 +00:00
Oli Scherer
8206cffc48 Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
bors
1508a031fb Auto merge of #122054 - weihanglo:update-cargo, r=weihanglo
Update cargo

14 commits in f772ec0224d3755ce52ac5128a80319fb2eb45d0..a4c63fe5388beaa09e5f91196c86addab0a03580
2024-03-01 22:57:35 +0000 to 2024-03-06 22:15:17 +0000
- fix(cli): Skip tracing-chrome for platforms without 64bit atomics (rust-lang/cargo#13551)
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#13550)
- fix(cli): Add traces to clarify where time is going (rust-lang/cargo#13545)
- fix(rustdoc-map): dedup `--extern-html-too-url` for same unit (rust-lang/cargo#13544)
- test: Add test for packaging a public dependency (rust-lang/cargo#13536)
- doc: Edits for git/path dependency sections (rust-lang/cargo#13341)
- feat(cli): Allow logging to chrome traces (rust-lang/cargo#13399)
- fix(log): Trace parameters to align with profile (rust-lang/cargo#13538)
- fix(toml): Don't warn on unset Edition if only 2015 is compatible (rust-lang/cargo#13533)
- fix(cli): Trace core cargo operations (rust-lang/cargo#13532)
- chore: update pulldown-cmark to 0.10.0 (rust-lang/cargo#13517)
- feat(add): Fallback to `rustc -v` when no MSRV is set (rust-lang/cargo#13516)
- chore(ci): Ensure lockfile is respected during MSRV testing (rust-lang/cargo#13523)
- feat: Use consistent colors when testing (rust-lang/cargo#13520)
2024-03-07 05:04:49 +00:00
bors
aa029ce4d8 Auto merge of #122113 - matthiaskrgr:rollup-5d1jnwi, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #121958 (Fix redundant import errors for preload extern crate)
 - #121976 (Add an option to have an external download/bootstrap cache)
 - #122022 (loongarch: add frecipe and relax target feature)
 - #122026 (Do not try to format removed files)
 - #122027 (Uplift some feeding out of `associated_type_for_impl_trait_in_impl` and into queries)
 - #122063 (Make the lowering of `thir::ExprKind::If` easier to follow)
 - #122074 (Add missing PartialOrd trait implementation doc for array)
 - #122082 (remove outdated fixme comment)
 - #122091 (Note why we're using a new thread in `test_get_os_named_thread`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-07 02:30:40 +00:00
bors
d03b986db1 Auto merge of #122117 - matthiaskrgr:rollup-3yrv3j6, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #122015 (Add better explanation for `rustc_index::IndexVec`)
 - #122061 (Clarify FatalErrorHandler)
 - #122062 (Explicitly assign constructed C++ classes)
 - #122072 (Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slices)
 - #122088 (Remove unnecessary fixme on new thread stack size)
 - #122094 (Remove outdated footnote "missing-stack-probe" in platform-support)
 - #122107 (Temporarily make allow-by-default the `non_local_definitions` lint)
 - #122109 (compiletest: Add a `//@ needs-threads` directive)

Failed merges:

 - #122104 (Rust is a proper name: rust → Rust)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-07 00:04:02 +00:00
Matthias Krüger
5642b04186
Rollup merge of #122109 - alexcrichton:compiletests-needs-threads, r=workingjubilee
compiletest: Add a `//@ needs-threads` directive

This commit is extracted from #122036 and adds a new directive to the `compiletest` test runner, `//@ needs-threads`. This is intended to capture the need that a target must implement threading to execute a specific test, typically one that uses `std::thread`. This is primarily done for WebAssembly targets which currently do not have threads by default. This enables transitioning a lot of `//@ ignore-wasm*`-style ignores into a more self-documenting `//@ needs-threads` directive. Additionally the `wasm32-wasi-preview1-threads` target, for example, does actually have threads, but isn't tested in CI at this time. This change enables running these tests for that target, but not other wasm targets.
2024-03-07 00:57:43 +01:00
Matthias Krüger
1d4360a621
Rollup merge of #122107 - Urgau:non_local_def-allow, r=WaffleLapkin
Temporarily make allow-by-default the `non_local_definitions` lint

T-lang [decided in their triage meeting](https://hackmd.io/U-CKiZx_RKiaANAPXtWf7g#non_local_definitions-common-issues-impl-for-ampLocal-FromltLocalgt-for-Global-%E2%80%A6-rust121621) to try to use a [better logic](https://github.com/rust-lang/rust/issues/121621#issuecomment-1976826895) for detecting non-local `impl` definitions given the [numerous reports](https://github.com/rust-lang/rust/issues/121621) we got.

Until that is done and also because the beta cut is next week, switch the lint to allow-by-default until it's implemented.

r? `@WaffleLapkin`
2024-03-07 00:57:42 +01:00
Matthias Krüger
814077e073
Rollup merge of #122094 - slanterns:arm-stack-probe-footnote, r=workingjubilee
Remove outdated footnote "missing-stack-probe" in platform-support

... after https://github.com/rust-lang/rust/pull/120055 and https://github.com/rust-lang/rust/pull/118491.

cc https://github.com/rust-lang/rust/issues/77071#issuecomment-1981172733.
2024-03-07 00:57:42 +01:00
Matthias Krüger
7220e52f94
Rollup merge of #122088 - ChrisDenton:fixme, r=workingjubilee
Remove unnecessary fixme on new thread stack size

As the FIXME itself notes, there's nothing to fix here.

And as the documentation for [`CreateThread`] says of `dwStackSize`, the value is rounded up to the nearest page. A 4kb stack is very small but perfectly usable if you're careful. Of course it will be very limited but there's no reason to add artificial limits. We don't know what the user is doing.

[`CreateThread`]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread
2024-03-07 00:57:41 +01:00
Matthias Krüger
f1354ed772
Rollup merge of #122072 - KonradHoeffner:patch-1, r=cuviper
Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slices

The trait implementation comments of Ord and PartialOrd for slice incorrectly mention "vectors" instead of "slices".
This PR fixes those two comments as requested in #122071.
2024-03-07 00:57:41 +01:00
Matthias Krüger
869529a130
Rollup merge of #122062 - workingjubilee:initialize-my-fist, r=cuviper
Explicitly assign constructed C++ classes

C++ style guides I am aware of recommend specifically preferring = syntax for any classes with fairly obvious constructors[^0] that do not perform any complicated logic in their constructor. I contend that all constructors that the `rustc_llvm` code uses qualify. This has only become more common since C++ 17 guaranteed many cases of copy initialization elision.

The other detail is that I tried to ask another contributor with infinitely more C++ experience than me (i.e. any) what this constructor syntax was, and they thought it was a macro. I know of no other language that has adopted this same syntax. As the rustc codebase features many contributors experienced in many other languages, using a less... unique... style has many other benefits in making this code more lucid and maintainable, which is something it direly needs.

[^0]: e.g. https://abseil.io/tips/88
2024-03-07 00:57:40 +01:00
Matthias Krüger
8dc49e1b8e
Rollup merge of #122061 - workingjubilee:prefix-llvm-error, r=cuviper
Clarify FatalErrorHandler

- Identify rustc's LLVM ERRORs by prefixing them
- Comment heavily on its interior, while we are here
2024-03-07 00:57:40 +01:00
Matthias Krüger
d451faaab2
Rollup merge of #122015 - dev-ardi:master, r=nnethercote
Add better explanation for `rustc_index::IndexVec`

I feel like I didn't do a great job explaining what this does in https://github.com/rust-lang/rust/pull/119800, so this PR tries to give an example of why and how you would use it.

Addresses #93792.
2024-03-07 00:57:39 +01:00
Weihang Lo
b48d29aeb9
Update cargo 2024-03-06 18:39:01 -05:00
Matthias Krüger
3827584370
Rollup merge of #122091 - ChrisDenton:comment, r=RalfJung
Note why we're using a new thread in `test_get_os_named_thread`

``@RalfJung`` expressed some "surprise and confusion" about why we're spawning a new thread in this test. Hopefully this comment will help future readers.
2024-03-06 22:41:57 +01:00
Matthias Krüger
75ebe83eed
Rollup merge of #122082 - fee1-dead-contrib:rm-outdated-note, r=compiler-errors
remove outdated fixme comment

The `TraitPredicate` no longer has constness as we have desugared it to work with the type system through const generics instead.
2024-03-06 22:41:56 +01:00
Matthias Krüger
6279ef2b4e
Rollup merge of #122074 - KonradHoeffner:patch-2, r=jhpratt
Add missing PartialOrd trait implementation doc for array

Analogously to vectors and slices, this PR documents the lexicographic sorting of PartialOrd as rustdoc comment on the trait implementation of PartialOrd for arrays.
Associated issue: #122073.
2024-03-06 22:41:56 +01:00
Matthias Krüger
37782da784
Rollup merge of #122063 - Zalathar:lower-if, r=oli-obk
Make the lowering of `thir::ExprKind::If` easier to follow

This targets a few code patterns that I found very confusing when I first tried to understand what this code is doing.

No functional changes. I recommend looking at the changes individually, with whitespace hidden.
2024-03-06 22:41:55 +01:00
Matthias Krüger
34cffae24c
Rollup merge of #122027 - compiler-errors:rpitit-cycle, r=spastorino
Uplift some feeding out of `associated_type_for_impl_trait_in_impl` and into queries

This PR moves the `type_of` and `generics_of` query feeding out of `associated_type_for_impl_trait_in_impl`, since eagerly feeding results in query cycles due to a subtle interaction with `resolve_bound_vars`.

Fixes #122019

r? spastorino
2024-03-06 22:41:55 +01:00
Matthias Krüger
03ec79bff7
Rollup merge of #122026 - clubby789:fmt-removed, r=onur-ozkan
Do not try to format removed files

If you removed a file, `x fmt` would confusingly print
```
formatting modified file path/to/file.rs
```
and pass it to the formatting logic. Filter out files with `D` (removed) status
2024-03-06 22:41:54 +01:00
Matthias Krüger
daf89d0677
Rollup merge of #122022 - heiher:loongarch-features, r=petrochenkov
loongarch: add frecipe and relax target feature

This PR adds `frecipe` and `relax` target features to LoongArch:

* frecipe - Support frecipe.{s/d} and frsqrte.{s/d} instructions..
* relax - Enable Linker relaxation.
2024-03-06 22:41:54 +01:00
Matthias Krüger
24a2169a23
Rollup merge of #121976 - lu-zero:bootstrap-cache, r=onur-ozkan
Add an option to have an external download/bootstrap cache

Follow up from #116697 to address https://github.com/rust-lang/rust/pull/116697#pullrequestreview-1677176395
2024-03-06 22:41:53 +01:00
Matthias Krüger
550b8a2cf9
Rollup merge of #121958 - chenyukang:yukang-fix-121915-import, r=petrochenkov
Fix redundant import errors for preload extern crate

Fixes #121915
2024-03-06 22:41:53 +01:00
bors
7d3702e472 Auto merge of #122111 - matthiaskrgr:rollup-qq4v6gs, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #113518 (bootstrap/libtest: print test name eagerly on failure even with `verbose-tests=false` / `--quiet`)
 - #117199 (Change the documented implicit value of `-C instrument-coverage` to `=yes`)
 - #121190 (avoid overlapping privacy suggestion for single nested imports)
 - #121382 (Rework `untranslatable_diagnostic` lint)
 - #121959 (Removing absolute path in proc-macro)
 - #122038 (Fix linting paths with qself in `unused_qualifications`)
 - #122051 (cleanup: remove zero-offset GEP)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-06 21:39:53 +00:00
Urgau
6fc45b84ac Temporarily make allow-by-default the non_local_definitions lint 2024-03-06 22:24:25 +01:00
Matthias Krüger
1a85eb0187
Rollup merge of #122051 - erikdesjardins:cleanup, r=nikic
cleanup: remove zero-offset GEP

This GEP would've been used to change the pointer type in the past, but after opaque pointers it's a no-op. I missed removing this in #105545.

Split out from #121577.
2024-03-06 22:02:48 +01:00
Matthias Krüger
e93a3d1d93
Rollup merge of #122038 - Alexendoo:unused-qualifications, r=petrochenkov
Fix linting paths with qself in `unused_qualifications`

Fixes #121999

`resolve_qpath` ends up being called again with `qself` set to `None` to check trait items from fully qualified paths. To avoid this the lint is moved to a place that accounts for this already

96561a8fd1/compiler/rustc_resolve/src/late.rs (L4074-L4088)

r? `````@petrochenkov`````
2024-03-06 22:02:47 +01:00
Matthias Krüger
16d37fa804
Rollup merge of #121959 - sundeep-kokkonda:patch-2, r=davidtwco
Removing absolute path in proc-macro

With rust 1.75 the absolute build path name is embedding into proc-macro (.rustc section) and which causes reproducibility issues.
Detailed issue description is here - https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219

With this change the 'absolute path' changed back to '/rust/$hash' format as in earlier revisions.
2024-03-06 22:02:47 +01:00
Matthias Krüger
efe9deace8
Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco
Rework `untranslatable_diagnostic` lint

Currently it only checks calls to functions marked with `#[rustc_lint_diagnostics]`. This PR changes it to check calls to any function with an `impl Into<{D,Subd}iagnosticMessage>` parameter. This greatly improves its coverage and doesn't rely on people remembering to add `#[rustc_lint_diagnostics]`. It also lets us add `#[rustc_lint_diagnostics]` to a number of functions that don't have an `impl Into<{D,Subd}iagnosticMessage>`, such as `Diag::span`.

r? ``@davidtwco``
2024-03-06 22:02:46 +01:00
Matthias Krüger
c7fca03240
Rollup merge of #121190 - bvanjoi:fix-114884, r=petrochenkov
avoid overlapping privacy suggestion for single nested imports

Fixes #114884

This PR aims to avoid confusion inside braces for import suggestions.

r? ``@petrochenkov``
2024-03-06 22:02:46 +01:00
Matthias Krüger
4d9cdd6696
Rollup merge of #117199 - Zalathar:instrument-coverage-on, r=oli-obk,Nadrieril
Change the documented implicit value of `-C instrument-coverage` to `=yes`

The option-value parser for `-Cinstrument-coverage=` currently accepts the following stable values:

- `all` (implicit value of plain `-Cinstrument-coverage`)
- `yes`, `y`, `on`, `true` (undocumented aliases for `all`)
- `off` (default; same as not specifying `-Cinstrument-coverage`)
- `no`, `n`, `false`, `0` (undocumented aliases for `off`)

I'd like to rearrange and re-document the stable values as follows:

- `no` (default; same as not specifying `-Cinstrument-coverage`)
- `n`, `off`, `false` (documented aliases for `no`)
- `0` (undocumented alias for `no`)
- `yes` (implicit value of plain `-Cinstrument-coverage`)
- `y`, `on`, `true` (documented aliases for `yes`)
- `all` (documented as *currently* an alias for `yes` that may change; discouraged but not deprecated)

The main changes being:

- Documented default value changes from `off` to `no`
- Documented implicit value changes from `all` to `yes`
- Other boolean aliases (`n`, `off`, `false`, `y`, `on`, `true`) are explicitly documented
- `all` remains currently an alias for `yes`, but is explicitly documented as being able to change in the future
- `0` remains an undocumented but stable alias for `no`
- The actual behaviour of coverage instrumentation does not change

# Why?

The choice of `all` as the implicit value only really makes sense in the context of the unstable `except-unused-functions` and `except-unused-generics` values. That arrangement was fine for an unstable flag, but it's confusing for a stable flag whose only other stable value is `off`, and will only become more confusing if we eventually want to stabilize other fine-grained coverage option values.

(Currently I'm not aware of any plans to stabilize other coverage option values, but that's why I think now is a fine time to make this change, well before anyone actually has to care about it.)

For example, if we ever add support for opt-in instrumentation of things that are *not* instrumented by `-Cinstrument-coverage` by default, it will be very strange for the `all` value to not actually instrument all things that we know how to instrument.

# Compatibility impact

Because this is not a functional change, there is no immediate compatibility impact. However, changing the documented semantics of `all` opens up the possibility of future changes that could be considered retroactively breaking.

I don't think this is going to be a big deal in practice, for a few reasons:

- The exact behaviour of coverage instrumentation is allowed to change, so changing the behaviour of `all` is not a *stability-breaking* change, as long as it still exists and does something reasonable.
- `-Cinstrument-coverage` is mainly used by tools or scripts that can be easily updated if necessary. It's unusual for users to pass the flag directly, because processing the profiler output is complicated enough that tools/scripts tend to be necessary anyway.
- Most people who are using coverage are probably relying on `-Cinstrument-coverage` rather than explicitly passing `-Cinstrument-coverage=all`, so the number of users actually affected by this change is likely to be low, and plausibly zero.
2024-03-06 22:02:45 +01:00
Matthias Krüger
1b157a0987
Rollup merge of #113518 - jyn514:streaming-failures, r=cuviper
bootstrap/libtest: print test name eagerly on failure even with `verbose-tests=false` / `--quiet`

Previously, libtest would wait until all tests finished running to print the progress, which made it
annoying to run many tests at once (since you don't know which have failed). Change it to print the
names as soon as they fail.

This makes it much easier to know which test failed without having to wait for compiletest to completely finish running. Before:
```
Testing stage0 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu)

running 15274 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii    88/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   176/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   264/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   352/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   440/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   528/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiFFiiiiiii
...
```

After:
```
Testing stage0 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu)

running 15274 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii    88/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   176/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   264/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   352/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   440/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii   528/15274
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
[ui] tests/ui/associated-type-bounds/implied-in-supertrait.rs ... F

[ui] tests/ui/associated-type-bounds/return-type-notation/basic.rs#next_with ... F
iiiiiiiiiiiii
...
```

This serves a similar use case to the existing RUSTC_TEST_FAIL_FAST, but is on by default and as a result much more discoverable. We should consider unifying RUSTC_TEST_FAIL_FAST with the `--no-fail-fast` flag in the future for consistency and discoverability.
2024-03-06 22:02:45 +01:00
Alex Crichton
75fa9f6dec compiletest: Add a //@ needs-threads directive
This commit is extracted from #122036 and adds a new directive to the
`compiletest` test runner, `//@ needs-threads`. This is intended to
capture the need that a target must implement threading to execute a
specific test, typically one that uses `std::thread`. This is primarily
done for WebAssembly targets which currently do not have threads by
default. This enables transitioning a lot of `//@ ignore-wasm*`-style
ignores into a more self-documenting `//@ needs-threads` directive.
Additionally the `wasm32-wasi-preview1-threads` target, for example,
does actually have threads, but isn't tested in CI at this time. This
change enables running these tests for that target, but not other wasm
targets.
2024-03-06 12:35:07 -08:00
Chris Denton
8718317725
Document and test minimal stack size on Windows 2024-03-06 19:54:09 +00:00
Luca Barbato
0a80f9a488
Update src/bootstrap/src/utils/change_tracker.rs
Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>
2024-03-06 18:12:35 +01:00
Slanterns
6dc356bbc4
Remove outdated footnote "missing-stack-probe" 2024-03-07 00:59:49 +08:00
orion GONZALEZ (contractor)
6600c972e6 doc: Add better explanation 2024-03-06 16:54:42 +01:00
Chris Denton
99577368cf
Note why we're using a new thread in a test 2024-03-06 15:42:48 +00:00
Chris Denton
8cd7aaa105
Remove unnecessary fixme
As the FIXME itself notes, there's nothing to fix here.
2024-03-06 15:34:33 +00:00
bors
bfe762e0ed Auto merge of #121967 - nikic:libllvm-linker-script, r=Mark-Simulacrum
Replace libLLVM symlink with linker script

It turns out that the libLLVM-N.so -> libLLVM.so.N.1 symlink is also needed when projects like miri link against librustc_driver.so. As such, we have to distribute it in real rustup components like rustc-dev, rather than only for download-ci-llvm.

To avoid actually distributing symlinks (which are not supported or not fully supported by the rustup infrastructure) replace it with a linker script that does the same thing instead.

Fixes https://github.com/rust-lang/rust/issues/121889.

r? `@cuviper`
2024-03-06 14:51:49 +00:00
yukang
5a4ff2779e Fix redundant import errors for preload extern crate 2024-03-06 21:29:33 +08:00
bohan
7303014381 avoid overlapping privacy suggestion for single nested imports 2024-03-06 21:17:12 +08:00
Deadbeef
1061c8d5e5 remove outdated fixme comment
The `TraitPredicate` no longer has constness as we have desugared it to work with the type system through const generics instead.
2024-03-06 20:39:10 +08:00
bors
3314d5ce4c Auto merge of #121956 - ChrisDenton:srwlock, r=joboet
Windows: Implement condvar, mutex and rwlock using futex

Well, the Windows equivalent: [`WaitOnAddress`,](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress) [`WakeByAddressSingle`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddresssingle) and [`WakeByAddressAll`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddressall).

Note that Windows flavoured futexes can be different sizes (1, 2, 4 or 8 bytes). I took advantage of that in the `Mutex` implementation.

I also edited the Mutex implementation a bit more than necessary. I was having trouble keeping in my head what 0, 1 and 2 meant so I replaced them with consts.

I *think* we're maybe spinning a bit much. `WaitOnAddress` seems to be looping quite a bit too. But for now I've keep the implementations the same. I do wonder if it'd be worth reducing or removing our spinning on Windows.

This also adds a new shim to miri, because of course it does.

Fixes #121949
2024-03-06 12:19:40 +00:00
bors
09bc67b915 Auto merge of #121679 - lcnr:opaque-wf-check-2, r=oli-obk
stricter hidden type wf-check [based on #115008]

Original work by `@aliemjay` in #115008. A huge thanks to them for originally figuring out this approach ❤️

Fixes https://github.com/rust-lang/rust/issues/114728
Fixes https://github.com/rust-lang/rust/issues/114572

Instead of adding the `WellFormed` obligations when relating opaque types, we now always emit such an obligation when defining the hidden type.

This causes nested opaque types which aren't wf to error, see the comment below for the described impact. I believe this change to be desirable as it significantly reduces complexity by removing special-cases.

It also caused an issue with RPITIT: in defaulted trait methods, we add a `Projection(synthetic_assoc, rpit_of_trait_method)` clause to the `param_env`. This clause is not added to the `ParamEnv` of the nested coroutines. This caused a normalization failure in `fn check_coroutine_obligations` with the new solver. I fixed that by using the env of the typeck root instead.

r? `@oli-obk`
2024-03-06 10:04:26 +00:00
Konrad Höffner
533add895c
add missing PartialOrd impl doc for array 2024-03-06 10:28:56 +01:00
WANG Rui
e81df3f322 loongarch: add frecipe and relax target feature 2024-03-06 17:24:32 +08:00
Konrad Höffner
6223e4c734
Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slice 2024-03-06 10:13:05 +01:00