1
Fork 0
Commit graph

277127 commits

Author SHA1 Message Date
Philipp Krones
609cd310be
Rustup (#13881)
r? @ghost

changelog: none
2024-12-26 13:52:31 +00:00
Philipp Krones
416f7e84c0
Bump nightly version -> 2024-12-26 2024-12-26 14:47:30 +01:00
Philipp Krones
14af404672
Merge remote-tracking branch 'upstream/master' into rustup 2024-12-26 14:46:57 +01:00
bors
e2848a05a9 Auto merge of #134784 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-12-26 13:02:16 +00:00
Philipp Krones
dff0294ab3
fix examples using Ty.kind() in the book (#13875)
`Ty.kind()` is a method.

changelog: none
2024-12-26 12:31:32 +00:00
bors
78af7da26d Auto merge of #132431 - shahn:from_iterator_more_tuples, r=Amanieu
From iterator for more tuples
2024-12-26 09:11:06 +00:00
Ralf Jung
60e3bf4374
Merge pull request #4109 from RalfJung/flags
Error on some invalid flag combinations
2024-12-26 08:12:36 +00:00
Sebastian Hahn
10b23518c1 Impl FromIterator for tuples with arity 1-12 2024-12-26 08:47:49 +01:00
Sebastian Hahn
87e641a2a5 Fix formatting 2024-12-26 08:47:49 +01:00
Zalathar
1511de3c9e Add more begin_panic normalizations to panic backtrace tests 2024-12-26 18:15:30 +11:00
wtlin1228
d0c1975e4b docs: update code example for Iterator#rposition 2024-12-26 13:56:45 +08:00
jyn
801c1d8b90 fix default-backtrace-ice test
when running `tests/ui/panics/default-backtrace-ice.rs locally it gave this error:
```
failures:

---- [ui] tests/ui/panics/default-backtrace-ice.rs stdout ----
Saved the actual stderr to "/home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/test/ui/panics/default-backtrace-ice/default-backtrace-ice.stderr"
diff of stderr:

7
8	aborting due to `-Z treat-err-as-bug=1`
9	stack backtrace:
-	(end_short_backtrace)
-	(begin_short_backtrace)
-	(end_short_backtrace)
-	(begin_short_backtrace)
+	      [... omitted 22 frames ...]
+
```

this is a regression from setting RUST_BACKTRACE=1 by default. we need to turn off the new behavior when running UI tests so that they reflect our dist compiler. normally that's done by checking `sess.unstable_opts.ui_testing`, but this happens extremely early in the compiler before we've expanded arg files. do an extremely simple hack that doesn't work in all cases - we don't need it to work in all cases, only when running UI tests.
2024-12-25 19:47:28 -05:00
bors
a25032cf44 Auto merge of #134768 - RalfJung:const_alloc_layout, r=jhpratt
stabilize const_alloc_layout

libs-api FCP passed in https://github.com/rust-lang/rust/issues/67521

Fixes #67521
2024-12-26 00:13:13 +00:00
Esteban Küber
01307cf03f Implement default_overrides_default_fields lint
Detect when a manual `Default` implementation isn't using the existing default field values and suggest using `..` instead:

```
error: `Default` impl doesn't use the declared default field values
  --> $DIR/manual-default-impl-could-be-derived.rs:14:1
   |
LL | / impl Default for A {
LL | |     fn default() -> Self {
LL | |         A {
LL | |             y: 0,
   | |                - this field has a default value
...  |
LL | | }
   | |_^
   |
   = help: use the default values in the `impl` with `Struct { mandatory_field, .. }` to avoid them diverging over time
note: the lint level is defined here
  --> $DIR/manual-default-impl-could-be-derived.rs:5:9
   |
LL | #![deny(default_overrides_default_fields)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
2024-12-25 23:25:45 +00:00
Guillaume Gomez
bdc8df4cb5 Improve rustdoc code 2024-12-25 22:22:23 +01:00
Ralf Jung
88b88f336b stabilize const_alloc_layout 2024-12-25 19:28:52 +01:00
bors
7c002ff9a7 Auto merge of #134703 - poliorcetics:ab/push-ovsylkzsoxku, r=GuillaumeGomez
nits: Cleanup of `librustdoc::clean::Cfg::simplify_with`

r? `@GuillaumeGomez`
2024-12-25 16:56:32 +00:00
Noratrieb
e5bf8b0f35 Make x86_64-unknown-linux-gno panic=abort and mark as no_std
Without a standard library, we cannot unwind, so it should be
panic=abort by default.

Additionally, it does not have std because while it is
Linux, it cannot use libc, which std uses today for Linux.
2024-12-25 16:53:14 +01:00
Ralf Jung
335f7f59c1 swap_typed_nonoverlapping: properly detect overlap even when swapping scalar values 2024-12-25 16:01:26 +01:00
bors
97a56fb4a6 Auto merge of #134736 - jyn514:msvc-backtraces, r=jieyouxu
Run `tests/ui/backtrace/std-backtrace.rs` on MSVC.

The original PR which disabled these, https://github.com/rust-lang/rust/pull/62897, only mentions them being broken on i686. ~~let's still make sure the rest of windows is supported.~~ Let's see if we can enable this for msvc now (32-bit and 64-bit).

r? `@jieyouxu`

try-job: x86_64-msvc
try-job: i686-msvc
try-job: i686-mingw
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
try-job: dist-x86_64-msvc
try-job: dist-i686-msvc
2024-12-25 14:14:47 +00:00
jyn
c880e8bbcb Run tests/ui/backtrace/std-backtrace.rs on MSVC.
The original PR which disabled these only mentions them being broken on
i686 msvc. Let's try to see if we can reenable this test for msvc (both
32-bit and 64-bit).
2024-12-25 20:44:20 +08:00
bors
f432d5dcb5 Auto merge of #134756 - jieyouxu:rollup-suec48x, r=jieyouxu
Rollup of 3 pull requests

Successful merges:

 - #134743 (Default to short backtraces for dev builds of rustc itself)
 - #134750 (Update `#[coverage(..)]` attribute error messages to match the current implementation)
 - #134751 (Enable LSX feature for LoongArch OpenHarmony target)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-25 11:25:55 +00:00
Ralf Jung
7291b1eaf7 rename typed_swap → typed_swap_nonoverlapping 2024-12-25 10:53:03 +01:00
Ralf Jung
35f10b1e03 we generally make later flags overwrite earlier flags, so remove some logic guarding just against that 2024-12-25 10:50:48 +01:00
Ralf Jung
b109091cfd remove some flags that have been hard errors for a while 2024-12-25 10:50:48 +01:00
Ralf Jung
2de456151a show an error on some invalid flag combinations: TB + permissive provenance; strict provenance + native calls 2024-12-25 10:50:48 +01:00
Ralf Jung
00dfa3ba2d miri: add test for overlapping typed_swap 2024-12-25 10:45:48 +01:00
Ralf Jung
6de3a2e3a9 stabilize const_swap 2024-12-25 10:36:32 +01:00
许杰友 Jieyou Xu (Joe)
d04f8bd00c
Rollup merge of #134751 - heiher:loong-ohos-lsx, r=jieyouxu
Enable LSX feature for LoongArch OpenHarmony target
2024-12-25 17:25:59 +08:00
许杰友 Jieyou Xu (Joe)
db3404a896
Rollup merge of #134750 - Zalathar:coverage-attr-errors, r=jieyouxu
Update `#[coverage(..)]` attribute error messages to match the current implementation

The allowed positions for `#[coverage(..)]` attributes were expanded by #126721, but the corresponding error messages were never updated to reflect the new behaviour.

Part of #134749.
2024-12-25 17:25:58 +08:00
许杰友 Jieyou Xu (Joe)
aef9d6b0a8
Rollup merge of #134743 - jyn514:rustc-dev-short-backtraces, r=jieyouxu
Default to short backtraces for dev builds of rustc itself

A dev build almost certainly means that whoever's built the compiler has the opportunity to rerun it to collect a more complete trace. So we don't need to default to a complete trace; we should hide irrelevant details by default.
2024-12-25 17:25:58 +08:00
bors
a0a5c42346 Auto merge of #134738 - clubby789:forbid-output-ui, r=jieyouxu
compiletest: Support `forbid-output` in UI tests

The `forbid-output` directive is currently only run in incremental tests (although no incremental tests use it). There are some UI tests 'using' it, but it's doing nothing 😄 Let's fix this

Will also PR the dev guide to note this.

dev-guide PR: https://github.com/rust-lang/rustc-dev-guide/pull/2171
2024-12-25 08:46:20 +00:00
Zalathar
e48fc62ce0 Un-redact one occurrence of "coverage attribute not allowed here" 2024-12-25 19:23:48 +11:00
Zalathar
db02b1d3e9 Rewrite the error-code docs for coverage attributes [E0788] 2024-12-25 19:23:48 +11:00
WANG Rui
652e48b38d Enable LSX feature for LoongArch OpenHarmony target 2024-12-25 14:08:22 +08:00
bors
68b9e4f5f5 Auto merge of #134748 - DianQK:rollup-3y5fzcx, r=DianQK
Rollup of 3 pull requests

Successful merges:

 - #134525 (Arbitrary self types v2: unstable doc updates.)
 - #134735 (Consider arm to diverge if guard diverges)
 - #134741 (Actually print all the relevant parts of a coroutine in verbose mode)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-25 06:07:04 +00:00
Zalathar
3996209398 Overhaul error messages for disallowed coverage attributes 2024-12-25 16:17:09 +11:00
Zalathar
9124662da3 Expand the main test for where the coverage attribute is allowed
Some of these cases are also implicitly checked by other tests, but it's
helpful to also explicitly list them in the main test.
2024-12-25 16:01:26 +11:00
Zalathar
5e98118901 Fully redact the [E0788] error message in tests, to make changes easier 2024-12-25 16:00:47 +11:00
lapla-cogito
b28bfbceeb
fix examples using Ty.kind() 2024-12-25 13:59:48 +09:00
DianQK
1d10117445
Rollup merge of #134741 - compiler-errors:coroutine-verbose, r=lqd
Actually print all the relevant parts of a coroutine in verbose mode

I need to actually see these components, idk why we weren't printing them :)
2024-12-25 12:23:07 +08:00
DianQK
a247d7bd8d
Rollup merge of #134735 - compiler-errors:arm-diverges, r=WaffleLapkin
Consider arm to diverge if guard diverges

This is not a fix for #134734, but I discovered it when I was gauging how difficult it would be to fix that. It does fix a really old test though :>

r? `@WaffleLapkin` or reassign
2024-12-25 12:23:07 +08:00
DianQK
3eba722d49
Rollup merge of #134525 - adetaylor:unstable-book-changes, r=wesleywiser
Arbitrary self types v2: unstable doc updates.

Document these two feature flags.

Part of #44874 .
2024-12-25 12:23:06 +08:00
bors
41f2f5c0b7 Auto merge of #134747 - weihanglo:update-cargo, r=weihanglo
Update cargo

6 commits in 652623b779c88fe44afede28bf7f1c9c07812511..c86f4b3a1b153218e6e50861214b0b4b4e695f23
2024-12-20 15:44:42 +0000 to 2024-12-24 17:49:48 +0000
- fix(package): check dirtiness of path fields in manifest (rust-lang/cargo#14966)
- test: make path arguments more generic and flexible (rust-lang/cargo#14979)
- Moved manifest metadata tracking from fingerprint to dep info (rust-lang/cargo#14973)
- fix: assure possibly blocking non-files (like FIFOs) won't be picked up for publishing. (rust-lang/cargo#14977)
- simplify SourceID Hash (rust-lang/cargo#14800)
- upgrade `gix` to the latest release 0.69. (rust-lang/cargo#14975)
2024-12-25 03:29:11 +00:00
Weihang Lo
57e413c47d
Update cargo 2024-12-24 22:16:30 -05:00
jyn
c7a28d579b Default to short backtraces for dev builds of rustc itself
A dev build almost certainly means that whoever's built the compiler
has the opportunity to rerun it to collect a more complete trace. So
we don't need to default to a complete trace; we should hide irrelevant
details by default.
2024-12-24 20:41:26 -05:00
Michael Goulet
9bcd1dee95 Actually print all the relevant parts of a coroutine in verbose mode 2024-12-25 01:08:59 +00:00
Zalathar
d4005b6811 Rename tests/ui/coverage-attr/no-coverage.rs to allowed-positions.rs 2024-12-25 11:40:39 +11:00
bors
e33c428c8c Auto merge of #134729 - oliveredget:typo, r=jieyouxu
chore: fix typos

Fix some typos, thank you very much.
2024-12-25 00:40:23 +00:00
clubby789
5a8ecc9518 compiletest: Support forbid-output in UI tests 2024-12-25 00:06:07 +00:00