Commit Graph

259469 Commits

Author SHA1 Message Date
Jerry Wang
189232bc42 Migrate wasm-override-linker to rmake 2024-06-29 08:14:02 -04:00
Jerry Wang
56fe015d4a Migrate weird-output-filenames to rmake 2024-06-29 08:14:02 -04:00
Jerry Wang
614e04226d Migrate volatile-intrinsics to rmake 2024-06-29 08:14:00 -04:00
Guillaume Gomez
69f355a74b
Rollup merge of #127116 - GuillaumeGomez:run-make-return-non-c-like-enum, r=Kobzol,jieyouxu
Migrate `run-make/return-non-c-like-enum` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? `@Kobzol`
2024-06-29 14:07:23 +02:00
Guillaume Gomez
38983df5c7
Rollup merge of #127112 - ChrisDenton:lldb, r=Kobzol
Bootstrap: Don't get output if `lldb --version` errors

fixes #126892

`Command` can error in two ways: the OS can fail to run the binary at all or else the binary can return an error exit code. Unfortunately the distinction between the two is not clear cut. The OS may succeed in starting the binary but it may still error before `main` (e.g. if a necessary library fails to load) and this will be reported via the exit code.

Fortunately this case is simpler. We can assume that `lldb --version` will only ever error if there's a startup issue of some kind. so both kinds of errors are caused by the OS. Thus it's safe for us to treat them equally for the sake of this specific check.
2024-06-29 14:07:22 +02:00
Guillaume Gomez
0886faaeea
Rollup merge of #127073 - Sky9x:unnecessary-seqcst, r=Nilstrieb
Remove unnecessary SeqCst in `impl fmt::Pointer for AtomicPtr`

Unnecessarily strict ordering.
2024-06-29 14:07:22 +02:00
Guillaume Gomez
e9594b504d
Rollup merge of #127072 - Sky9x:docs-includes-vs-does-include, r=scottmcm
docs: say "includes" instead of "does include"

Provides more visual difference between the negative ("does not include") and the positive ("includes"). Both phrases have the same meaning.
2024-06-29 14:07:22 +02:00
Guillaume Gomez
c1fb4e5947
Rollup merge of #127041 - GuillaumeGomez:run-make-override-aliased-flags, r=Kobzol
Migrate `run-make/override-aliased-flags` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

I voluntarily didn't use the helper methods to make it obvious what's tested.

r? `@jieyouxu`
2024-06-29 14:07:21 +02:00
Guillaume Gomez
c70a2e30dd
Rollup merge of #126995 - Oneirical:test-friends-forever, r=Kobzol
Migrate `pretty-print-with-dep-file`, `pretty-print-to-file` and `libtest-padding` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
2024-06-29 14:07:20 +02:00
Guillaume Gomez
06aeb679f6
Rollup merge of #126805 - Oneirical:weaves-of-testiny, r=Kobzol
Migrate `pdb-alt-path`, `mismatching-target-triples` and `mingw-export-call-convention` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Needs MSVC try jobs.

try-job: x86_64-mingw
try-job: x86_64-msvc
2024-06-29 14:07:20 +02:00
Lin Yihai
8dc36c1647 fix: prefer (*p).clone to p.clone if the p is a raw pointer 2024-06-29 19:58:18 +08:00
Jakub Beránek
64b3492c30 Rename Rust for Linux CI job to make its name clearer 2024-06-29 13:51:50 +02:00
bors
f8453359bb Auto merge of #127119 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-06-29 11:44:01 +00:00
surechen
9c0ce05d24 Show used attribute's kind for user when find it isn't applied to a static variable.
fixes #126789
2024-06-29 19:39:09 +08:00
Ralf Jung
cf6f6ca441 unreferenced-used-static: run test everywhere 2024-06-29 13:02:59 +02:00
Camille GILLOT
c81481fdb9 Move crash test. 2024-06-29 10:42:31 +00:00
Camille GILLOT
dec4e98522 Move entry point to a method. 2024-06-29 10:42:31 +00:00
Camille GILLOT
a175817ea6 Avoid cloning state when possible. 2024-06-29 10:42:31 +00:00
Camille GILLOT
61ede075bf Stop ICEing on impossible predicates. 2024-06-29 10:42:31 +00:00
Guillaume Gomez
8cbeedac8d Migrate run-make/return-non-c-like-enum to rmake.rs 2024-06-29 12:29:37 +02:00
bors
9d920ed333 Auto merge of #3723 - RalfJung:win-tls-callback, r=RalfJung
iter_exported_symbols: also walk used statics in local crate

Since https://github.com/rust-lang/rust/pull/126938 got reverted, we need a different approach.

Fixes https://github.com/rust-lang/miri/issues/3722
2024-06-29 10:20:13 +00:00
Ralf Jung
66a885b25d iter_exported_symbols: also walk used statics in local crate 2024-06-29 12:17:10 +02:00
Guillaume Gomez
c8bbeef12f Don't call switch-theme function 2024-06-29 11:56:06 +02:00
Guillaume Gomez
b1d1e66389 Add back help-page.goml rustdoc GUI test 2024-06-29 11:56:06 +02:00
Guillaume Gomez
4ee077aa63 Migrate run-make/override-aliased-flags to rmake.rs 2024-06-29 11:55:30 +02:00
bors
be99243afc Auto merge of #127111 - matthiaskrgr:rollup-ybzkuuv, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #126822 (Bootstrap command refactoring: port more `Command` usages to `BootstrapCmd` (step 2))
 - #126835 (Simplifications in match lowering)
 - #126953 (std: separate TLS key creation from TLS access)
 - #127045 (Rename `super_predicates_of` and similar queries to `explicit_*` to note that they're not elaborated)
 - #127075 (rustc_data_structures: Explicitly check for 64-bit atomics support)
 - #127101 (remove redundant match statement from dataflow const prop)
 - #127102 (Rename fuchsia builder and bump Fuchsia)
 - #127103 (Move binder and polarity parsing into `parse_generic_ty_bound`)
 - #127108 (unify `dylib` and `bin_helpers` and create `shared_helpers::parse_value_from_args`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-29 09:29:41 +00:00
Jakub Beránek
4442fd7a09 Add a run-make test that LLD is not being used by default on the x64 beta/stable channel 2024-06-29 10:10:59 +02:00
Chris Denton
a6ef91e414
Update test.rs 2024-06-29 07:57:58 +00:00
Matthias Krüger
c59e7fd95b crashes: add more tests 2024-06-29 09:33:28 +02:00
bors
abb5826e3d Auto merge of #3721 - rust-lang:rustup-2024-06-29, r=RalfJung
Automatic Rustup
2024-06-29 07:33:09 +00:00
Chris Denton
fa12064d6d
Don't get output if lldb --version errors 2024-06-29 07:27:25 +00:00
Matthias Krüger
8fe770165f
Rollup merge of #127108 - onur-ozkan:bin-helper, r=Kobzol
unify `dylib` and `bin_helpers` and create `shared_helpers::parse_value_from_args`

`dylib` and `bin_helpers` were already used in similar logic. This PR unifies them under a `shared_helpers` module that is utilized by both the bootstrap library and shims. Additionally, created `parse_value_from_args` with a unit test.  This helps avoid code duplication in shims and can also be used in the bootstrap library if needed (which is the case in one of `@Kobzol's` tasks).

r? `@Kobzol`
2024-06-29 09:14:59 +02:00
Matthias Krüger
a4e92bfef0
Rollup merge of #127103 - compiler-errors:tighten-trait-bound-parsing, r=fmease
Move binder and polarity parsing into `parse_generic_ty_bound`

Let's pull out the parts of #127054 which just:
1. Make the parsing code less confusing
2. Fix `?use<>` (to correctly be denied)
3. Improve `T: for<'a> 'a` diagnostics

This should have no user-facing effects on stable parsing.

r? fmease
2024-06-29 09:14:59 +02:00
Matthias Krüger
367a80ce9e
Rollup merge of #127102 - tmandry:rename-fuchsia-builder, r=Kobzol
Rename fuchsia builder and bump Fuchsia

This PR renames the fuchsia builder as requested in https://github.com/rust-lang/rustc-dev-guide/pull/1989#pullrequestreview-2148682346 and bumps Fuchsia.

This includes the quality-of-life improvements for developers in https://fxrev.dev/1061894. It also removes the wasm target, which should speed up the build a little.

The new name of the builder is `x86_64-fuchsia` because I think `x86_64-gnu-fuchsia` would be confusing and put too much emphasis on the host target. (In terms of triples, we are targeting `x86_64-unknown-fuchsia` from `x86_64-unknown-linux-gnu`.) Someone on the infra team should weigh in here.

After this lands, we should update the docs in the rustc-dev-guide again.

cc `@lqd`
r? t-infra

try-job: x86_64-fuchsia
2024-06-29 09:14:58 +02:00
Matthias Krüger
c1d7ff55b5
Rollup merge of #127101 - matthiaskrgr:thonk, r=compiler-errors
remove redundant match statement from dataflow const prop
2024-06-29 09:14:58 +02:00
Matthias Krüger
3369e8364b
Rollup merge of #127075 - glaubitz:copy-and-paste-fix, r=SparrowLii
rustc_data_structures: Explicitly check for 64-bit atomics support

Instead of keeping a list of architectures which have native support
for 64-bit atomics, just use #[cfg(target_has_atomic = "64")] and its
inverted counterpart to determine whether we need to use portable
AtomicU64 on the target architecture.
2024-06-29 09:14:57 +02:00
Matthias Krüger
e9d5a2f45f
Rollup merge of #127045 - compiler-errors:explicit, r=oli-obk
Rename `super_predicates_of` and similar queries to `explicit_*` to note that they're not elaborated

Rename:
* `super_predicates_of` -> `explicit_super_predicates_of`
* `implied_predicates_of` -> `explicit_implied_predicates_of`
* `supertraits_containing_assoc_item` -> `explicit_supertraits_containing_assoc_item`

This makes it clearer that, unlike (for example) [`TyCtxt::super_traits_of`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.super_traits_of), we don't automatically elaborate this set of predicates.

r? ``@lcnr`` or ``@oli-obk`` or someone from t-types idc
2024-06-29 09:14:57 +02:00
Matthias Krüger
1e39eb7d53
Rollup merge of #126953 - joboet:lazy_key, r=jhpratt
std: separate TLS key creation from TLS access

Currently, `std` performs an atomic load to get the OS key on every access to `StaticKey` even when the key is already known. This PR thus replaces `StaticKey` with the platform-specific `get` and `set` function and a new `LazyKey` type that acts as a `LazyLock<Key>`, allowing the reuse of the retreived key for multiple accesses.

Related to #110897.
2024-06-29 09:14:56 +02:00
Matthias Krüger
806c5c1971
Rollup merge of #126835 - Nadrieril:reify-decision-tree, r=matthewjasper
Simplifications in match lowering

A series of small simplifications and deduplications in the MIR lowering of patterns.

r? ````@matthewjasper````
2024-06-29 09:14:56 +02:00
Matthias Krüger
dfa68f1d62
Rollup merge of #126822 - Kobzol:bootstrap-cmd-refactor-2, r=onur-ozkan
Bootstrap command refactoring: port more `Command` usages to `BootstrapCmd` (step 2)

This PR moves more of bootstrap to use `BooststrapCmd`, and also refactors the struct to allow it to serve as a proper command wrapper.

Tracking issue: https://github.com/rust-lang/rust/issues/126819

Best reviewed commit-by-commit, I have been adding some helper impls along the way to ease the migration, and then later I remove some of them since they were no longer needed.

r? `@onur-ozkan`
2024-06-29 09:14:55 +02:00
bors
38d0f87a49 Auto merge of #126698 - Oneirical:tessteract, r=Kobzol
Migrate `unknown-mod-stdin`, `issue-68794-textrel-on-minimal-lib`, `raw-dylib-cross-compilation` and `used-cdylib-macos` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Seriously needs OSX/Windows try-jobs. If it fails, restore `only-linux` in `textrel-on-minimal-lib` and try again.

try-job: x86_64-mingw
try-job: x86_64-msvc
2024-06-29 07:12:17 +00:00
onur-ozkan
9098474dad create shared_helpers::parse_value_from_args
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-29 09:43:58 +03:00
surechen
50edb32939 Fix a error suggestion for E0121 when using placeholder _ as return types on function signature.
Recommit after refactoring based on comment:
https://github.com/rust-lang/rust/pull/126017#issuecomment-2189149361

But when changing return type's lifetime to `ReError` will affect the subsequent borrow check process and cause test11 in typeck_type_placeholder_item.rs to lost E0515 message.
```rust
fn test11(x: &usize) -> &_ {
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
    &x //~ ERROR cannot return reference to function parameter(this E0515 msg will disappear)
}

```
2024-06-29 14:23:33 +08:00
The Miri Cronjob Bot
ec7bcc0357 Merge from rustc 2024-06-29 05:20:59 +00:00
onur-ozkan
0afc774e9d unify bin_helpers and dylib utility modules
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-29 08:17:44 +03:00
The Miri Cronjob Bot
64c8366ca2 Preparing for merge from rustc 2024-06-29 05:13:25 +00:00
bors
d38cd229b7 Auto merge of #127096 - matthiaskrgr:rollup-kh7e0rh, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #123714 (Add test for fn pointer duplication.)
 - #124091 (Update AST validation module docs)
 - #127015 (Switch back `non_local_definitions` lint to allow-by-default)
 - #127016 (docs: check if the disambiguator matches its suffix)
 - #127029 (Fix Markdown tables in platform-support.md)
 - #127032 (Enable const casting for `f16` and `f128`)
 - #127055 (Mark Hasher::finish as #[must_use])
 - #127068 (Stall computing instance for drop shim until it has no unsubstituted const params)
 - #127070 (add () to the marker_impls macro for ConstParamTy)
 - #127071 (Remove (deprecated & unstable) {to,from}_bits pointer methods)
 - #127078 (Enable full tools and profiler for LoongArch Linux targets)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-29 05:00:11 +00:00
Santiago Pastorino
a62cbda57e
Add feature diagnostic for unsafe_extern_blocks 2024-06-28 23:13:33 -03:00
Scott McMurray
c9f36f8cd7 Only update Eq operands in GVN if you can update both sides
Otherwise the types might not match

Fixes 127089
2024-06-28 19:05:01 -07:00
bors
9ed2ab3790 Auto merge of #127099 - lqd:revert-126938, r=compiler-errors
Revert "miri: make sure we can find link_section statics even for the local crate"

This PR reverts #126938 as [requested by its author](https://github.com/rust-lang/rust/issues/127052#issuecomment-2196793473), to fix the #127052 regression.

Fixes #127052

We should probably improve the [`used` rmake test(s)](57931e5040/tests/run-make/used/rmake.rs (L7)) in the future, but this should do for now.
2024-06-28 23:43:57 +00:00