Commit Graph

239022 Commits

Author SHA1 Message Date
Jason Newcomb
16d58a2982 Lift expr_diverges to clippy_utils as is_never_expr 2023-11-09 17:45:59 -05:00
bors
0f44eb32f1 Auto merge of #117727 - saethlin:inline-derived-fmt, r=nnethercote
Emit #[inline] on derive(Debug)

While working on https://github.com/rust-lang/rust/pull/116583 I noticed that the `cross_crate_inlinable` query identifies a lot of derived `Debug` impls as a MIR body that's little more than a call, which suggests they may be a good candidate for `#[inline]`. So here I've implemented that change specifically.

It seems to provide a nice improvement to build times.
2023-11-09 21:34:14 +00:00
onur-ozkan
fdb72795d1 enable unstable feature on x clean [PATH]
Since https://github.com/rust-lang/rust/pull/111076 enables
unstable cargo feature (`public-dependency`), we need to ensure
that unstable features are enabled before reading libstd Cargo.toml.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09 23:04:51 +03:00
bors
eae4135939 Auto merge of #117708 - onur-ozkan:x-setup, r=clubby789
check config file before prompts on `x setup`

First 2 commit moves the check of configuration existence to the first step of `x setup`. And then followed by a prompt that allows devs to decide whether to continue with the configuration override or exit bootstrap.

Closes #110471

I can revert the last commit if needed. Maybe it's just me, but I feel it's better to have those tags capitalized. If you think otherwise, please let me know so that I can revert.
2023-11-09 19:16:59 +00:00
bors
76633199f4 Auto merge of #15860 - HKalbasi:fix-capture-raw-pointer, r=HKalbasi
Truncate closure capture place for raw pointer

fix https://github.com/rust-lang/rust-analyzer/issues/15670#issuecomment-1804070623
2023-11-09 17:53:52 +00:00
bors
ebb9ed90d1 Auto merge of #15853 - Kangaxx-0:gaxx/update-parser-event-comment, r=lnicola
Try to update parser/event doc

`TokenSource` and `TreeSink` has been refactored as part of #10765, they no longer exist in code repo. This pr tries to remove them from event module level comment to prevent confusion.
2023-11-09 17:39:58 +00:00
hkalbasi
3bcdb7d886 Truncate closure capture place for raw pointer 2023-11-09 20:59:17 +03:30
bors
4c8862b263 Auto merge of #117122 - ferrocene:pa-configure-git-diff, r=albertlarsan68
Allow configuring the parent GitHub repository

The git integration in build_helper hardcoded `rust-lang/rust` as the parent GitHub repository, and `master` as the branch name. This works great for `rust-lang/rust`, but causes problems in downstream forks like Ferrocene whenever those functions are invoked (like `./x fmt`).

In `src/stage0.json` there was already a configuration key for the name of the nightly branch, but it wasn't used by build_helper. This PR adds the `github_repository` key to the file, and requires both values to be passed to build_helper whenever a git function is called. This will allow downstream forks to tweak the values.
2023-11-09 16:49:28 +00:00
Ben Kimock
d32d9238cf Emit #[inline] on derive(Debug) 2023-11-09 10:40:55 -05:00
bors
b7583d38b7 Auto merge of #117712 - lcnr:expand-coroutine, r=jackh726
generator layout: ignore fake borrows

fixes #117059

We emit fake shallow borrows in case the scrutinee place uses a `Deref` and there is a match guard. This is necessary to prevent the match guard from mutating the scrutinee: fab1054e17/compiler/rustc_mir_build/src/build/matches/mod.rs (L1250-L1265)

These fake borrows end up impacting the generator witness computation in `mir_generator_witnesses`, which causes the issue in #117059. This PR now completely ignores fake borrows during this computation. This is sound as thse are always removed after analysis and the actual computation of the generator layout happens afterwards.

Only the second commit impacts behavior, and could be backported by itself.

r? types
2023-11-09 14:23:45 +00:00
Pietro Albini
488dd9bc73
fmt 2023-11-09 14:44:54 +01:00
bors
e7998aa21f Auto merge of #117734 - nnethercote:rm-Zstrip, r=davidtwco
Remove `-Z strip`.

It was stabilized as `-C strip` in November 2021. The unstable option was kept around as a temporary measure to ease the transition. Two years is more than enough!

r? `@tmandry`
2023-11-09 12:26:28 +00:00
Alona Enraght-Moony
22e1576a12 rustdoc-json: Fix test so it actuall checks things
After #111427, no item has a `kind` field, so these assertions could never
fail. Instead, assert that those two items arn't present.
2023-11-09 12:13:16 +00:00
klensy
7142c8d83c bump few ICU4X leftover deps
implements https://github.com/rust-lang/rust/pull/117632#issuecomment-1795027801 suggestion
2023-11-09 14:53:21 +03:00
lcnr
fce71adf31 remove stability assert in evaluate_goal 2023-11-09 11:32:51 +01:00
lcnr
442e112d17 update overflow handling for norm, add test 2023-11-09 11:32:51 +01:00
lcnr
28e5c9505c update tests 2023-11-09 11:32:51 +01:00
lcnr
e3850f404d rework alias-relate to norm(lhs) == norm(rhs) 2023-11-09 11:32:50 +01:00
lcnr
1c54494888 only instantiate opaques with rigid types 2023-11-09 11:32:12 +01:00
lcnr
1f12f1cc83 try_normalize_ty end with rigid alias on failure 2023-11-09 11:31:22 +01:00
bors
287ae4db75 Auto merge of #117632 - Nilstrieb:icup, r=davidtwco
Update ICU4X

This updates all ICU4X crates and regenerates rustc_baked_icu_data.

Since the new unicode license under which they are licensed does not have an SPDX identifier yet, we define some exceptions. The license has to be reviewed to make sure it is still fine to use here, but I assume that is the case.

I also added an exception for rustc_icu_data to the unexplained ignore doctest tidy lint. This is a bit hacky but the whole style.rs in tidy is a mess so I didn't want to touch it more than this small hack.

part of #112865

r? `@davidtwco` `@wesleywiser` `@Manishearth`
2023-11-09 09:00:57 +00:00
sjwang05
5693a34db2
Suggest fix for ; within let-chains 2023-11-09 00:31:42 -08:00
Ikko Eltociear Ashimine
b8648216a5
Fix typo in internal.rs
covert -> convert
2023-11-09 16:10:37 +09:00
bors
492e57c6ad Auto merge of #117736 - TaKO8Ki:rollup-fjrtmlb, r=TaKO8Ki
Rollup of 6 pull requests

Successful merges:

 - #116762 (Fixup `Atomic*::from_ptr` safety docs)
 - #117645 (Extend builtin/auto trait args with error when they have >1 argument)
 - #117694 (Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`)
 - #117705 (triagebot.toml: use inclusive language)
 - #117723 (speed up `x clean`)
 - #117724 (Restore rustc shim error message)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-09 07:02:20 +00:00
onur-ozkan
d1e26401bc chore(bootstrap): capitalize {error, warning, info, note} tags
This should enhance the readability.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09 09:22:43 +03:00
onur-ozkan
42fbf3ebf5 allow users to override the existing configuration during x setup
Instead of immediately terminating bootstrap, users are now given
the option to decide whether they want to override the file or leave
it unchanged.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09 09:21:38 +03:00
onur-ozkan
3d6417fc7a check config file before prompts on x setup
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09 09:21:35 +03:00
Takayuki Maeda
f5195c52bb
Rollup merge of #117724 - Kobzol:shim-error-message, r=onur-ozkan
Restore rustc shim error message

Fixes: https://github.com/rust-lang/rust/pull/117595#discussion_r1382482249

The error message was originally introduced in https://github.com/rust-lang/rust/pull/111323, and subsequently broken by my change in https://github.com/rust-lang/rust/pull/116448.

r? ``@onur-ozkan``
2023-11-09 11:36:54 +09:00
Takayuki Maeda
e603f4491c
Rollup merge of #117723 - onur-ozkan:keep-bootstrap-on-x-clean, r=albertlarsan68
speed up `x clean`

Since `x clean` runs with bootstrap, we can speed up this process by avoiding the cleaning of bootstrap artifacts, as they are not necessarily needed to be cleaned.

ref #https://github.com/rust-lang/rust/issues/117653#issuecomment-1802482768
2023-11-09 11:36:53 +09:00
Takayuki Maeda
6533c62ce7
Rollup merge of #117705 - tshepang:patch-2, r=Nilstrieb
triagebot.toml: use inclusive language
2023-11-09 11:36:53 +09:00
Takayuki Maeda
b4fa5b7004
Rollup merge of #117694 - jmillikin:core-io-borrowed-buf, r=m-ou-se
Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`

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

ACP: https://github.com/rust-lang/libs-team/issues/290
2023-11-09 11:36:52 +09:00
Takayuki Maeda
4cc549811f
Rollup merge of #117645 - compiler-errors:auto-trait-subst, r=petrochenkov
Extend builtin/auto trait args with error when they have >1 argument

Reuse `extend_with_error` to add error args to any auto trait (or built-in trait like `Copy` that is defined incorrectly) that has additional non-`Self` args.

Fixes #117628
2023-11-09 11:36:52 +09:00
Takayuki Maeda
a1a8d6fe9c
Rollup merge of #116762 - WaffleLapkin:fixup_fromptr_docs, r=RalfJung
Fixup `Atomic*::from_ptr` safety docs

See https://github.com/rust-lang/rust/pull/115719#issuecomment-1762725010
cc ``@RalfJung``
2023-11-09 11:36:51 +09:00
Ali Bektas
b0101da116 Ignore doc(hidden) attr if no body is present 2023-11-09 02:12:53 +01:00
bors
d8dbf7ca0e Auto merge of #117557 - Zoxc:panic-prio, r=petrochenkov
Make `FatalErrorMarker` lower priority than other panics

This makes `FatalErrorMarker` lower priority than other panics in a parallel sections. If any other panics occur, they will be unwound instead of `FatalErrorMarker`. This ensures `rustc` will exit with the correct error code on ICEs.

This fixes https://github.com/rust-lang/rust/issues/116659.
2023-11-09 00:39:02 +00:00
Nicholas Nethercote
ecc936b155 Remove -Z strip.
It was stabilized as `-C strip` in November 2021. The unstable option
was kept around as a temporary measure to ease the transition. Two years
is more than enough!
2023-11-09 11:36:02 +11:00
Gaxx
fa7a91844a Try to update parser doc 2023-11-08 16:29:21 -08:00
bors
57fb1e643a Auto merge of #117454 - shepmaster:github-actions-m1-tests, r=GuillaumeGomez,onur-ozkan
Run tests in CI for aarch64-apple-darwin

r? `@ghost`
2023-11-08 22:40:10 +00:00
bors
34b7d1559f Auto merge of #11779 - partiallytyped:11775, r=blyxyas
[`mod_module_files`] Don't emit lint for mod.rs in tests

fixes: #11775

current state: indiscriminately emits the lint for mod files in tests.

The following

```
tests/
  common/
    mod.rs
  test.rs
```

is a common pattern for code shared across the tests and is suggested in the rust book. The change adds an additional check to verify that the mod file is not in tests.

changelog: Fix [`mod_module_files`]: false positive for mod files in tests folder
2023-11-08 22:27:13 +00:00
John Millikin
341c85648c Move BorrowedBuf and BorrowedCursor from std:io to core::io
Assigned new feature name `core_io_borrowed_buf` to distinguish from the
`Read::read_buf` functionality in `std::io`.
2023-11-09 07:10:11 +09:00
lcnr
92267c9794 update mir-opt tests 2023-11-08 22:55:29 +01:00
lcnr
992d93f687 rename BorrowKind::Shallow to Fake
also adds some comments
2023-11-08 22:55:28 +01:00
lcnr
a42eca42df generator layout: ignore fake borrows 2023-11-08 22:55:28 +01:00
Jacherr
7cdaa3b574 replace incorrect bool 2023-11-08 21:47:58 +00:00
PartiallyTyped
7e716ff955 [mod_module_files] Don't emit lint for modules in tests
fixes: #11775

current state: indiscriminately emits the lint for mod files in tests.

The following

tests/
  common/
    mod.rs
  test.rs

is a common pattern for code shared across the tests and is suggested in
the rust book. The change adds an additional check to verify that the
mod file is not in tests.

changelog: Fix [`mod_module_files`]: false positive for mod files in
tests folder
2023-11-08 22:42:12 +01:00
Jakub Beránek
622be2d138
Restore rustc shim error message 2023-11-08 22:38:31 +01:00
Jacherr
483b109e6e cargo dev fmt 2023-11-08 21:17:40 +00:00
Jacherr
b6d56c47f9 add no-rustfix since suggestions are invalid 2023-11-08 21:15:11 +00:00
Jacherr
67bb503f26 add support for std::alloc::Global, add more tests 2023-11-08 21:10:27 +00:00
onur-ozkan
de0458af97 speed up x clean
Since `x clean` runs with bootstrap, we can speed up
this process by avoiding the cleaning of bootstrap artifacts,
as they are not necessarily needed to be cleaned.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08 23:45:31 +03:00