Commit Graph

259311 Commits

Author SHA1 Message Date
Jakub Beránek
8a890cb6cb
Migrate a few command usages to BootstrapCommand 2024-06-28 12:43:12 +02:00
Jakub Beránek
f7d9543338
Migrate cargo_clippy_cmd and cargo_miri_cmd to BootstrapCommand 2024-06-28 12:42:52 +02:00
Jakub Beránek
86b2191460
Migrate some usage of Command to BootstrapCmd 2024-06-28 12:42:52 +02:00
Jakub Beránek
2a9d5ab849
Make it easier to migrate Command to BootstrapCmd
By allowing `run` to receive all of `BootstrapCmd`, `&mut BootstrapCmd`, `Command` and `&mut Command`.
2024-06-28 12:42:52 +02:00
Jakub Beránek
3722fb5d9f
Store Command directly inside BootstrapCommand
This will make it easier to migrate existing commands to bootstrap command.
2024-06-28 12:42:52 +02:00
Jakub Beránek
31911e5ccf
Improve documentation of BootstrapCommand 2024-06-28 12:42:52 +02:00
Jakub Beránek
cf5bbb3a08
Remove run and rename run_tracked to run 2024-06-28 12:42:52 +02:00
Jakub Beránek
903d6a9d89
Remove run_cmd 2024-06-28 12:42:52 +02:00
bors
1a7fce07f8 Auto merge of #3717 - rust-lang:rustup-2024-06-28, r=oli-obk
Automatic Rustup
2024-06-28 08:57:54 +00:00
Oli Scherer
afec0abd59 Bless clippy 2024-06-28 08:56:30 +00:00
joboet
65aea99daf
std: add safety comments 2024-06-28 10:44:26 +02:00
onur-ozkan
56c7eb6135 disable lld if external llvm is used
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-28 11:33:50 +03:00
onur-ozkan
ff9b8c1362 ignore beta/stable channels on rust-lld-by-default test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-28 11:33:42 +03:00
onur-ozkan
ee76d70db0 add change-tracker entry
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-28 11:33:38 +03:00
onur-ozkan
98854f7d3b add lld = true to default dist profile
Make sure lld is enabled for dist profile unless it is explicitly disabled.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-28 11:33:35 +03:00
John Paul Adrian Glaubitz
ab1b48ef2a 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-28 10:26:45 +02:00
bors
340b98a480 Auto merge of #3715 - cgettys-microsoft:dev/cgettys/process_id_fixup-01, r=RalfJung
Fix miri.bat to not exit unconditionally

#3703 has a small typo causing it to regress ./miri.bat to not working at all.

This PR fixes it. Tested on Windows 11, with stable toolchain missing as well as installed.
```test
./miri toolchain
error: toolchain 'stable-x86_64-pc-windows-msvc' is not installed
Failed to build miri-script. Is the 'stable' toolchain installed?
```

Closes #3714
2024-06-28 07:55:12 +00:00
bors
9c21872a40 Auto merge of #3716 - cgettys-microsoft:dev/cgettys/process_id_fixup-03, r=RalfJung
Remove GetCurrentProcessId's frame_in_std check

Most of the support required to close #1727 was actually added a while back, in #2215.

However, for some reason, even though the Unix/Linux syscall equivalent has no `frame_in_std()` check, the Windows `GetCurrentProcessId` check did. While the vast majority of use cases use `std::process::id`, there's no particular reason to penalize any Windows code that is no_std or for whatever other reason choses to call the function directly (e.g. via the generated [windows-sys](https://docs.rs/windows-sys/latest/windows_sys/Win32/System/Threading/fn.GetCurrentProcessId.html) method). The emulation should still work fine. Given there's no reason not to, we might as well simplify the code a tiny bit and save that branch / frame check during runtime too.

This PR removes the `frame_in_std` restriction for `GetCurrentProcessId`, and also moves it into the environment related shim section per discussion in https://github.com/rust-lang/miri/issues/1727#issuecomment-2184679952.

Still passes existing tests/pass/getpid.rs test.

Closes #1727 unless we wish to give a dummy value when isolated, which we don't seem to want to do at this time.
2024-06-28 07:31:21 +00:00
bors
99f77a2eda Auto merge of #127076 - matthiaskrgr:rollup-l01gm36, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #124741 (patchable-function-entry: Add unstable compiler flag and attribute)
 - #126470 (make cargo submodule optional)
 - #126956 (core: avoid `extern type`s in formatting infrastructure)
 - #126970 (Simplify `str::clone_into`)
 - #127022 (Support fetching `Attribute` of items.)
 - #127058 (Tighten `fn_decl_span` for async blocks)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-28 07:25:28 +00:00
Matthias Krüger
89a0cfe72a
Rollup merge of #127058 - compiler-errors:tighten-async-spans, r=oli-obk
Tighten `fn_decl_span` for async blocks

Tightens the span of `async {}` blocks in diagnostics, and subsequently async closures and async fns, by actually setting the `fn_decl_span` correctly. This is kinda a follow-up on #125078, but it fixes the problem in a more general way.

I think the diagnostics are significantly improved, since we no longer have a bunch of overlapping spans. I'll point out one caveat where I think the diagnostic may get a bit more confusing, but where I don't think it matters.

r? ````@estebank```` or ````@oli-obk```` or someone else on wg-diag or compiler i dont really care lol
2024-06-28 08:34:10 +02:00
Matthias Krüger
d730f27fc8
Rollup merge of #127022 - adwinwhite:attrs, r=celinval
Support fetching `Attribute` of items.

Fixes [https://github.com/rust-lang/project-stable-mir/issues/83](https://github.com/rust-lang/project-stable-mir/issues/83)

`rustc_ast::ast::Attribute` doesn't impl `Hash` and `Eq`. Thus it cannot be directly used as key of `IndexMap` in `rustc_smir::rustc_smir::Tables` and we cannot define stable `Attribute` as index to `rustc_ast::ast::Attribute` like `Span` and many other stable definitions.

Since an string (or tokens) and its span contain all info about an attribute, I defined a simple `Attribute` struct on stable side.

I choose to fetch attributes via `tcx::get_attrs_by_path()` due to `get_attrs()` is marked as deprecated and `get_attrs_by_name()` cannot handle name of multiple segments like `rustfmt::skip`.

r? `@celinval`
2024-06-28 08:34:09 +02:00
Matthias Krüger
2c228260dc
Rollup merge of #126970 - DaniPopes:simplify-str-clone_into, r=cuviper
Simplify `str::clone_into`

Removes an `unsafe` in favor of just using `String` methods.
2024-06-28 08:34:09 +02:00
Matthias Krüger
c4d0c08925
Rollup merge of #126956 - joboet:fmt_no_extern_ty, r=RalfJung
core: avoid `extern type`s in formatting infrastructure

```@RalfJung``` [said](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Use.20of.20.60extern.20type.60.20in.20formatting.20machinery/near/446552837):

>How attached are y'all to using `extern type` in the formatting machinery?
Seems like this was introduced a [long time ago](34ef8f5441). However, it's also [not really compatible with Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/issues/256), and only works currently because we effectively treat references-to-extern-type almost like raw pointers in Stacked Borrows -- which of course is unsound, it's not how LLVM works. I was planning to make Miri emit a warning when this happens to avoid cases like [this](https://github.com/rust-lang/rust/issues/126814#issuecomment-2183816373) where people use extern type specifically to silence Miri without realizing what happens. but with the formatting machinery using  extern type, this warning would just show up everywhere...
>
> The "proper" way to do this in Stacked Borrows is to use raw pointers (or `NonNull`).

This PR does just that.

r? ```@RalfJung```
2024-06-28 08:34:08 +02:00
Matthias Krüger
d5ab931749
Rollup merge of #126470 - onur-ozkan:optional-cargo-submodule, r=Kobzol
make cargo submodule optional

Right now, we fetch the cargo submodule no matter what, even if the command we are running doesn't need it (e.g., `x build compiler library`). This PR changes that to only fetch the cargo submodule when it's necessary.

For more context, see the zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Why.20is.20cargo.20always.20checked.20out.3F
2024-06-28 08:34:07 +02:00
Matthias Krüger
02629325f6
Rollup merge of #124741 - nebulark:patchable-function-entries-pr, r=estebank,workingjubilee
patchable-function-entry: Add unstable compiler flag and attribute

Tracking issue: #123115

Add the -Z patchable-function-entry compiler flag and the #[patchable_function_entry(prefix_nops = m, entry_nops = n)] attribute.
Rebased and adjusted the canditate implementation to match changes in the RFC.
2024-06-28 08:34:07 +02:00
Adwin White
9387b0bad9 Add method to get all attributes on a definition 2024-06-28 13:24:41 +08:00
Adwin White
84071e2662 Support fetching Attribute of items. 2024-06-28 13:24:41 +08:00
The Miri Cronjob Bot
92b837b89b Merge from rustc 2024-06-28 05:20:33 +00:00
The Miri Cronjob Bot
b687053ee7 Preparing for merge from rustc 2024-06-28 05:13:00 +00:00
Sky
df7331fcd2
Remove unnecessary SeqCst in impl fmt::Pointer for AtomicPtr 2024-06-28 00:20:35 -04:00
bors
42add88d22 Auto merge of #127010 - GuillaumeGomez:update-puppeteer, r=notriddle
Update browser-ui-test version to `0.18.0`

Should help with #126436.

r? `@notriddle`
2024-06-28 04:15:16 +00:00
Sky
9bbf3d9805
docs: say "includes" instead of "does include" 2024-06-28 00:01:32 -04:00
Sky
264e8093aa
Remove (deprecated & unstable) {to,from}_bits pointer methods 2024-06-27 23:32:20 -04:00
Sky
8bcd1dede6
add () to the marker_impls macro for ConstParamTy
seems to have escaped bootstrap
2024-06-27 22:37:29 -04:00
bohan
91d3ac7450 add test for #126986 2024-06-28 08:01:07 +08:00
bohan
8d27980325 docs: check if the disambiguator matches its suffix 2024-06-28 07:55:40 +08:00
Charlie Gettys
e7e35d7d78 Switch to the explicit parens version 2024-06-27 16:30:33 -07:00
Florian Schmiderer
8d246b0102 Updated diagnostic messages 2024-06-27 22:24:36 +02:00
Charlie Gettys
9d69154f56 Relocate GetCurrentProcessId to Environment Related shims, remove unnecessary std frame restriction 2024-06-27 13:23:34 -07:00
Charlie Gettys
5ae2b372b4 Fix miri.bat 2024-06-27 13:00:37 -07:00
Michael Goulet
789ee88bd0 Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
bors
9c3bc805dd Auto merge of #127049 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-06-27 18:49:32 +00:00
Jake Goulding
448dd30ed4 Mark Hasher::finish as #[must_use] 2024-06-27 14:16:27 -04:00
WANG Xuerui
64be3a3ea7
Update the LoongArch target documentation
The docs for the LoongArch targets are a bit dated since their
introduction, and the prose has some room for improvement as well.
Streamline a bit, referring to the neighboring targets' docs, and
provide up-to-date information as much as I can come up with.
2024-06-28 02:05:25 +08:00
Philipp Krones
3ce7f9eb0c
Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
bors
68a799aea9 Auto merge of #12999 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2024-06-27 16:51:27 +00:00
Philipp Krones
585170ee60
Bump nightly version -> 2024-06-27 2024-06-27 18:50:02 +02:00
Philipp Krones
e9e7a815a7
Merge remote-tracking branch 'upstream/master' into rustup 2024-06-27 18:49:59 +02:00
Michael Goulet
1160eecba5 supertrait_def_ids was already implemented in middle 2024-06-27 12:29:34 -04:00
bors
4ddc8a2e4e Auto merge of #12992 - klensy:lintcheck-bump, r=Alexendoo
bump strip-ansi-escapes

This bumps `strip-ansi-escapes` to remove arrayvec from it's deps (https://github.com/luser/strip-ansi-escapes/pull/8)

Should Cargo.lock be commited too to track it's working state?

changelog: none
2024-06-27 16:19:59 +00:00