Commit Graph

238155 Commits

Author SHA1 Message Date
bors
2ef639d4fb Auto merge of #3145 - RalfJung:data-race-error, r=RalfJung
give some more help for the unusual data races

Fixes https://github.com/rust-lang/miri/issues/3142
2023-11-04 13:59:54 +00:00
bjorn3
52933e0bd2 Don't disable inline asm usage in compiler-builtins when the cranelift backend is enabled
This was a leftover from when inline asm wasn't universally supported by
the cranelift backend yet. It would cause the optimized inline asm
intrinsics to be avoided for the standard library distributed with
rustup now that we build the cranelift backend by default on nightly for
several tier 1 targets.
2023-11-04 16:49:39 +03:00
Nadrieril
f0e8330879 Suggest to set lint level on whole match 2023-11-04 14:44:00 +01:00
Nadrieril
61d0fc7cf5 Warn when lint level is set on a match arm 2023-11-04 14:44:00 +01:00
Nadrieril
7b19fb88be Add tests 2023-11-04 14:44:00 +01:00
onur-ozkan
55b49455e7 ensure doc directory is not empty
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04 15:46:02 +03:00
Rémy Rakic
451778b551 handle dry runs in dist::CodegenBackend
self.number_of_times_dry_runs_have_caused_issues += 1;
2023-11-04 15:12:00 +03:00
bjorn3
a9913ebed0 Ensure the rustc-codegen-cranelift-preview component is never empty
Either generate it with the actual codegen backend dylib or omit it
entirely when the cranelift backend is disabled for this build.
2023-11-04 15:11:55 +03:00
Rémy Rakic
d82fdb6616 pass CODEGEN_BACKENDS to docker 2023-11-04 15:11:51 +03:00
onur-ozkan
fda009c858 add sanity check for compiler crate docs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04 15:11:43 +03:00
onur-ozkan
5e2de479fa Ensure compiler crate paths are generated before linking
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04 15:11:19 +03:00
Ralf Jung
0550ba5f77 avoid acronyms when we don't really need them 2023-11-04 12:24:09 +01:00
bors
1b2e4a9c94 Auto merge of #3154 - rust-lang:rustup-2023-11-04, r=RalfJung
Automatic Rustup
2023-11-04 08:10:57 +00:00
bors
2db26d3d55 Auto merge of #117566 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in b4d18d4bd3db6d872892f6c87c51a02999b80802..65e297d1ec0dee1a74800efe600b8dc163bcf5db
2023-10-31 18:19:10 +0000 to 2023-11-03 20:56:31 +0000
- fix(cli): Clarify --test is for targets, not test functions (rust-lang/cargo#12915)
- Updating "features" documentation to add a note about the new limit on number of features (rust-lang/cargo#12913)
- fix: merge `trim-paths` from different profiles (rust-lang/cargo#12908)
- Add regression test for issue 6915: features and transitive dev deps (rust-lang/cargo#12907)
- chore(deps): update rust crate gix to 0.55.2 (rust-lang/cargo#12906)
- chore(deps): update compatible (rust-lang/cargo#12905)
- docs(ref): Fix open-semver-range issue link (rust-lang/cargo#12904)
- docs(ref): Highlight commands to answer dep resolution questions (rust-lang/cargo#12903)

r? ghost
2023-11-04 06:22:05 +00:00
The Miri Conjob Bot
5b187039e4 fmt 2023-11-04 05:10:30 +00:00
The Miri Conjob Bot
fad85369c0 Merge from rustc 2023-11-04 05:08:02 +00:00
The Miri Conjob Bot
99417f2146 Preparing for merge from rustc 2023-11-04 04:59:51 +00:00
bors
a9b03ffe9b Auto merge of #117564 - TaKO8Ki:rollup-lkqhpqc, r=TaKO8Ki
Rollup of 3 pull requests

Successful merges:

 - #117343 (Cleanup `rustc_mir_build/../check_match.rs`)
 - #117550 (Use `filter_map` in `try_par_for_each_in`)
 - #117554 (consts: remove dead code around `i1` constant values)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-04 04:25:36 +00:00
Weihang Lo
f3587204c8
Update cargo
Remove license exception of `byteyarn` as it is no longer used
2023-11-04 00:02:24 -04:00
Takayuki Maeda
c55bf0e72f
Rollup merge of #117554 - durin42:llvm-delete-dead-zext-code, r=nikic
consts: remove dead code around `i1` constant values

`LLVMConstZext` recently got deleted, and it turns out (thanks to `@nikic` for knowing!) that this is dead code. Tests all pass for me without this logic, and per nikic:

> We always generate constants in "relocatable bag of bytes"
> representation, so you're never going to get a plain bool.

So this should be a safe thing to do.

r? `@nikic`
`@rustbot` label: +llvm-main
2023-11-04 12:44:45 +09:00
Takayuki Maeda
c9c851387e
Rollup merge of #117550 - cuviper:try_par_for_each_in, r=est31
Use `filter_map` in `try_par_for_each_in`

This simplifies the expression, especially for the rayon part, and also
lets us drop the `E: Copy` constraint.
2023-11-04 12:44:44 +09:00
Takayuki Maeda
9b9ea77641
Rollup merge of #117343 - Nadrieril:cleanup_check_match, r=davidtwco
Cleanup `rustc_mir_build/../check_match.rs`

The file had become pretty unwieldy, with a fair amount of duplication. As a bonus, I discovered that we weren't running some pattern checks in if-let chains.

I recommend looking commit-by-commit. The last commit is a whim, I think it makes more sense that way but I don't hold this opinion strongly.
2023-11-04 12:44:44 +09:00
Peter Jaszkowiak
a745f92497 triagebot no-merges: exclude different case
"Subtree update" as well
2023-11-03 20:40:21 -06:00
bors
3aaa0f57b7 Auto merge of #115274 - bjorn3:tidy_improvements, r=davidtwco
Run tidy license checker on more workspaces

The license checker didn't run on several workspaces before this PR. The same applied to the "external package sources" check. There were also two missing lockfiles which I have added now.
2023-11-04 02:28:17 +00:00
bors
f1b104f523 Auto merge of #117540 - matthiaskrgr:baby_dont_clone_me_dont_clone_me_no_more, r=est31
clone less
2023-11-04 00:29:52 +00:00
bors
5020f7c3b8 Auto merge of #116412 - nnethercote:rm-plugin-support, r=bjorn3
Remove support for compiler plugins.

They've been deprecated for four years.

This commit includes the following changes.
- It eliminates the `rustc_plugin_impl` crate.
- It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`.
- E0457 and E0498 are no longer used.
- E0463 is narrowed, now only relating to unfound crates, not plugins.
- The `plugin` feature was moved from "active" to "removed".
- It removes the entire plugins chapter from the unstable book.
- It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`.

Closes #29597.

r? `@ghost`
2023-11-03 22:32:56 +00:00
Nicholas Nethercote
5c462a32bd Remove support for compiler plugins.
They've been deprecated for four years.

This commit includes the following changes.
- It eliminates the `rustc_plugin_impl` crate.
- It changes the language used for lints in
  `compiler/rustc_driver_impl/src/lib.rs` and
  `compiler/rustc_lint/src/context.rs`. External lints are now called
  "loaded" lints, rather than "plugins" to avoid confusion with the old
  plugins. This only has a tiny effect on the output of `-W help`.
- E0457 and E0498 are no longer used.
- E0463 is narrowed, now only relating to unfound crates, not plugins.
- The `plugin` feature was moved from "active" to "removed".
- It removes the entire plugins chapter from the unstable book.
- It removes quite a few tests, mostly all of those in
  `tests/ui-fulldeps/plugin/`.

Closes #29597.
2023-11-04 08:50:46 +11:00
Nicholas Nethercote
ab161d1f5d Update rust-lang/book.
To 5b6c1ceaa62ecbd6caef08df39b33b3938e99deb, for this commit:

- Prepare for removal of compiler plugin support. (rust-lang/book#3764)
2023-11-04 08:50:25 +11:00
bors
1bb6553b96 Auto merge of #115333 - joshlf:patch-5, r=RalfJung
Guarantee representation of None in NPO

This allows users to soundly transmute zeroes into `Option` types subject to the null pointer optimization (NPO). It unblocks https://github.com/google/zerocopy/issues/293.
2023-11-03 20:29:13 +00:00
Augie Fackler
f8daa7d4f6 consts: remove dead code around i1 constant values
`LLVMConstZext` recently got deleted, and it turns out (thanks to @nikic
for knowing!) that this is dead code. Tests all pass for me without this
logic, and per nikic:

> We always generate constants in "relocatable bag of bytes"
> representation, so you're never going to get a plain bool.

So this should be a safe thing to do.

r? @nikic
@rustbot label: +llvm-main
2023-11-03 15:40:17 -04:00
Nadrieril
746197c08a Tweak spans for "adt defined here" note 2023-11-03 18:26:16 +01:00
Nadrieril
335156ca73 Accumulate let chains alongside the visit 2023-11-03 18:26:16 +01:00
George Bateman
ee3a729cc4
enable feature gate in E0795.md 2023-11-03 17:08:32 +00:00
Josh Stone
3984914aff Use filter_map in try_par_for_each_in
This simplifies the expression, especially for the rayon part, and also
lets us drop the `E: Copy` constraint.
2023-11-03 09:17:16 -07:00
George Bateman
a723b01ae2
cfg_attr offset_of_enum feature in doctest 2023-11-03 14:58:02 +00:00
bors
9c20ddd956 Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb
`rustc_span` cleanups

Just some things I found while looking over this crate.

r? `@oli-obk`
2023-11-03 14:57:40 +00:00
George Bateman
7c09b99ebb
Feature gate enums in offset_of 2023-11-03 13:16:47 +00:00
bors
a026bd49e1 Auto merge of #117538 - matthiaskrgr:rollup-63u77xb, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #117434 (delegate `<Box<E> as Error>::provide` to `<E as Error>::provide`)
 - #117505 (Fix incorrect trait bound restriction suggestion)
 - #117520 (Clippy subtree update)
 - #117523 (oli-obk is on vacation)
 - #117533 (Revert "bootstrap: do not purge docs on CI environment")

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-03 12:45:01 +00:00
Matthias Krüger
1ba97cb1cc clone less 2023-11-03 13:23:26 +01:00
Matthias Krüger
c0fa97c3d6
Rollup merge of #117533 - onur-ozkan:revert-117471, r=onur-ozkan
Revert "bootstrap: do not purge docs on CI environment"

This reverts commit 6198e881d3.

ref https://github.com/rust-lang/rust/issues/117430#issuecomment-1791609163, https://github.com/rust-lang/rust/pull/117471#issuecomment-1791937529
2023-11-03 12:44:53 +01:00
Matthias Krüger
7a0df44799
Rollup merge of #117523 - compiler-errors:oli-vacation, r=compiler-errors
oli-obk is on vacation

`@oli-obk` is away and asked me to put him in the vacation list 😸
2023-11-03 12:44:52 +01:00
Matthias Krüger
9028ce3580
Rollup merge of #117520 - flip1995:clippyup, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2023-11-03 12:44:50 +01:00
Matthias Krüger
6cb627b681
Rollup merge of #117505 - estebank:issue-117501, r=TaKO8Ki
Fix incorrect trait bound restriction suggestion

Suggest

```
error[E0308]: mismatched types
  --> $DIR/restrict-assoc-type-of-generic-bound.rs:9:12
   |
LL | pub fn foo<A: MyTrait, B>(a: A) -> B {
   |                        -           - expected `B` because of return type
   |                        |
   |                        expected this type parameter
LL |     return a.bar();
   |            ^^^^^^^ expected type parameter `B`, found associated type
   |
   = note: expected type parameter `B`
             found associated type `<A as MyTrait>::T`
help: consider further restricting this bound
   |
LL | pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
   |                      +++++++
```

instead of

```
error[E0308]: mismatched types
  --> $DIR/restrict-assoc-type-of-generic-bound.rs:9:12
   |
LL | pub fn foo<A: MyTrait, B>(a: A) -> B {
   |                        -           - expected `B` because of return type
   |                        |
   |                        expected this type parameter
LL |     return a.bar();
   |            ^^^^^^^ expected type parameter `B`, found associated type
   |
   = note: expected type parameter `B`
             found associated type `<A as MyTrait>::T`
help: consider further restricting this bound
   |
LL | pub fn foo<A: MyTrait + <T = B>, B>(a: A) -> B {
   |                      +++++++++
```

Fix #117501.
2023-11-03 12:44:50 +01:00
Matthias Krüger
958a6af147
Rollup merge of #117434 - BugenZhao:box-error-provide, r=cuviper
delegate `<Box<E> as Error>::provide` to `<E as Error>::provide`

Fix #117432.
2023-11-03 12:44:49 +01:00
bors
adda05fe3e Auto merge of #117535 - RalfJung:revert-cranelift, r=onur-ozkan
Revert "Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum"

This reverts commit 1dfb6b162b, reversing changes made to bcb5798dd8.

That commit broke generating nightly rustc docs. Revert it until we can figure out how to have both, cranelift and docs.

Fixes https://github.com/rust-lang/rust/issues/117430
2023-11-03 10:41:36 +00:00
bors
49112241e9 Auto merge of #117510 - elichai:patch-3, r=cuviper
Add track_caller to transmute_copy

Currently if `size_of::<Src>() < size_of::<Dst>()` you will see the following error:
```rust
thread 'test' panicked at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/mem/mod.rs:1056:5:
cannot transmute_copy if Dst is larger than Src
```
This fixes it so it will show the invocation location
2023-11-03 08:41:59 +00:00
Ralf Jung
f38849841b Revert "Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum"
This reverts commit 1dfb6b162b, reversing
changes made to bcb5798dd8.

That commit broke generating nightly rustc docs. Revert it until we can figure out how to have both, cranelift and docs.
2023-11-03 08:03:28 +01:00
Ralf Jung
57f570bb33 clarify that the str invariant is a safety, not validity, invariant 2023-11-03 07:23:24 +01:00
onur-ozkan
fedfca71ed Revert "bootstrap: do not purge docs on CI environment"
This reverts commit 6198e881d3.
2023-11-03 09:15:26 +03:00
bors
1d6f05fd37 Auto merge of #116439 - compiler-errors:on-unimplemented, r=davidtwco
Pretty print `Fn` traits in `rustc_on_unimplemented`

I don't think that users really ever should need to think about `Fn*` traits' tupled args for a simple trait error.

r? diagnostics
2023-11-03 06:08:03 +00:00