Commit Graph

253185 Commits

Author SHA1 Message Date
bors
d261b53081 Auto merge of #3481 - RalfJung:rustup, r=RalfJung
Rustup
2024-04-17 19:21:44 +00:00
Ralf Jung
7c3c2716ff fmt 2024-04-17 21:20:25 +02:00
Elisha Hollander
e06f90fc51
format style.rs 2024-04-17 22:16:59 +03:00
Elisha Hollander
8d0870899c
separate regex generation 2024-04-17 21:58:52 +03:00
Ralf Jung
3d3550ffa0 Merge from rustc 2024-04-17 20:38:23 +02:00
Ralf Jung
6a108a7477 Preparing for merge from rustc 2024-04-17 20:38:15 +02:00
bors
38104f3a88 Auto merge of #123936 - Mark-Simulacrum:zst-no-alloc, r=oli-obk
Codegen ZSTs without an allocation

This makes sure that &[] is equivalent to unsafe code (from_raw_parts(dangling, 0)). No new stable guarantee is intended about whether or not we do this, this is just an optimization.

This regressed in #67000 (no comments I can see about that regression in the PR, though it did change the test modified here). We had previously performed this optimization since #63635.
2024-04-17 18:31:10 +00:00
Elisha Hollander
da35c19311
use a function to generate the regex
mainly for testing
2024-04-17 20:40:48 +03:00
bors
46702ffc1a Auto merge of #17087 - davidbarsky:david/fix-some-tracing-spans, r=Veykril
chore: fix a few spans without `.entered()`
2024-04-17 16:59:33 +00:00
bors
b256807c3e Auto merge of #17092 - Veykril:per-queries, r=Veykril
minor: Update `per_query_memory_usage` query listing
2024-04-17 16:46:21 +00:00
Lukas Wirth
011c2127c8 Update per_query_memory_usage query listing 2024-04-17 18:44:50 +02:00
David Barsky
5ba37f3f8e chore: fix a few spans without .entered() 2024-04-17 12:44:49 -04:00
许杰友 Jieyou Xu (Joe)
ca945e9ed8 tests: update cross-lang-lto-riscv-abi to use command wrappers 2024-04-17 16:28:49 +00:00
许杰友 Jieyou Xu (Joe)
255bee1777 run-make-support: add clang and llvm-readobj command wrappers 2024-04-17 16:28:49 +00:00
bors
c45dee5efd Auto merge of #124084 - matthiaskrgr:rollup-h42psbx, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #116957 (meta: notify #t-rustdoc Zulip stream on backport nominations)
 - #122201 (Document overrides of `clone_from()` in core/std)
 - #122723 (Use same file permissions for ar_archive_writer as the LLVM archive writer)
 - #124030 (interpret: pass MemoryKind to adjust_alloc_base_pointer)
 - #124037 (Don't ascend into parent bodies when collecting stmts for possible return suggestion)
 - #124049 (Stabilize `const_io_structs`)
 - #124062 (Add another expression to weird-exprs.rs)
 - #124066 (Don't error on subtyping of equal types)
 - #124073 (Remove libc from rust_get_test_int uses)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-17 16:27:58 +00:00
Matthias Krüger
abbe0d0e47
Rollup merge of #124073 - saethlin:rust-get-test-int, r=wesleywiser
Remove libc from rust_get_test_int uses

`rust_test_helpers.c` has a few unfortunate signatures which have made some of our UI tests _technically_ need the `libc` crate. This is my attempt to evict the need of `libc` for `rust_get_test_int`.

I've deleted `tests/ui/abi/foreign/foreign-no-abi.rs` because the test was originally written to check that `native mod` will compile without an ABI specifier. `native mod` was removed years before 1.0 and the test hasn't checked for anything for a long time.
2024-04-17 18:01:41 +02:00
Matthias Krüger
116c0f7288
Rollup merge of #124066 - oli-obk:define_opaque_types7, r=compiler-errors
Don't error on subtyping of equal types

fixes https://github.com/rust-lang/rust/issues/124054 🤦
fixes #124075
fixes https://github.com/rust-lang/rust/issues/124079

r? `@compiler-errors`
2024-04-17 18:01:40 +02:00
Matthias Krüger
abac22f485
Rollup merge of #124062 - allgoewer:fish-fight, r=oli-obk
Add another expression to weird-exprs.rs

I'm almost feeling bad for this but I decided I don't.
Feel free to close if you don't approve.
2024-04-17 18:01:40 +02:00
Matthias Krüger
8f3fd9394f
Rollup merge of #124049 - slanterns:const_io_structs_stabilize, r=jhpratt
Stabilize `const_io_structs`

This PR stabilizes `const_io_structs`.

Tracking issue: https://github.com/rust-lang/rust/issues/78812.
Implementation PR: https://github.com/rust-lang/rust/pull/78811.

FCPs already completed in the tracking issue.

Closes https://github.com/rust-lang/rust/issues/78812.

```@rustbot``` label: +T-libs-api

r? libs-api
2024-04-17 18:01:39 +02:00
Matthias Krüger
72ff1a3312
Rollup merge of #124037 - compiler-errors:dont-parent-body, r=michaelwoerister
Don't ascend into parent bodies when collecting stmts for possible return suggestion

Fixes #124022
2024-04-17 18:01:39 +02:00
Matthias Krüger
6388167811
Rollup merge of #124030 - RalfJung:adjust_alloc_base_pointer, r=oli-obk
interpret: pass MemoryKind to adjust_alloc_base_pointer

Another puzzle piece for https://github.com/rust-lang/miri/pull/3475.

The 2nd commit renames base_pointer -> root_pointer; that's how Tree Borrows already calls them and I think the term is more clear than "base pointer". In particular, this distinguishes it from "base address", since a root pointer can point anywhere into an allocation, not just its base address.

https://github.com/rust-lang/rust/pull/124018 has been rolled up already so I couldn't add it there any more.

r? ```@oli-obk```
2024-04-17 18:01:38 +02:00
Matthias Krüger
d5258af4c1
Rollup merge of #122723 - bjorn3:archive_writer_fixes, r=nnethercote
Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (https://github.com/rust-lang/rust/issues/107407) to fix all known regressions.

Fixes https://github.com/rust-lang/rust/issues/107495
2024-04-17 18:01:38 +02:00
Matthias Krüger
21deaed4a1
Rollup merge of #122201 - coolreader18:doc-clone_from, r=dtolnay
Document overrides of `clone_from()` in core/std

As mentioned in https://github.com/rust-lang/rust/pull/96979#discussion_r1379502413

Specifically, when an override doesn't just forward to an inner type, document the behavior and that it's preferred over simply assigning a clone of source. Also, change instances where the second parameter is "other" to "source".

I reused some of the wording over and over for similar impls, but I'm not sure that the wording is actually *good*. Would appreciate feedback about that.

Also, now some of these seem to provide pretty specific guarantees about behavior (e.g. will reuse the exact same allocation iff the len is the same), but I was basing it off of the docs for [`Box::clone_from`](https://doc.rust-lang.org/1.75.0/std/boxed/struct.Box.html#method.clone_from-1) - I'm not sure if providing those strong guarantees is actually good or not.
2024-04-17 18:01:37 +02:00
Matthias Krüger
d7d10707e0
Rollup merge of #116957 - fmease:meta-notify-rustdoc-zulip-on-backport-nominations, r=GuillaumeGomez
meta: notify #t-rustdoc Zulip stream on backport nominations

In July '23, it was decided to handle rustdoc-specific backport nominations in t-rustdoc meetings going forward ([Zulip announcement](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/T-rustdoc.20backports/near/374828518)). However, t-rustdoc meetings are far too infrequent for them to address nominations on time (contrary to the weekly t-compiler meetings).

Hence GuillaumeGomez and I came to the conclusion that {beta,stable}-nominated rustdoc PRs should be dealt with on a case by case basis, e.g. on Zulip.

This PR attempts to partially automate this process. ~~Sadly, `triagebot` is not quite as flexible has I've hoped. Blocked on `triagebot` improvements (see the `FIXME`s in this PR).~~ (Fixed in rust-lang/triagebot#1791).

r? GuillaumeGomez
2024-04-17 18:01:37 +02:00
Guillaume Gomez
1ebc9efa78 Add GUI test for copy path button 2024-04-17 16:56:14 +02:00
Guillaume Gomez
ec754cf201 Fix copy-path button 2024-04-17 16:49:11 +02:00
bors
00ed4edb44 Auto merge of #123674 - oli-obk:bogus_note, r=estebank
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls

fixes #123292

Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
2024-04-17 14:25:10 +00:00
Jules Bertholet
ce0e27dfa7
Improve BindingMode doc comment 2024-04-17 09:34:40 -04:00
Jules Bertholet
2a4624ddd1
Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
Jules Bertholet
d19e48d79a
Store ByRef instead of BindingAnnotation in PatInfo 2024-04-17 09:30:21 -04:00
Ben Kimock
6298d8f8fa Remove libc from rust_get_test_int uses 2024-04-17 09:18:14 -04:00
bjorn3
297fceb9ac Use the default file permissions when writing
static libraries with ar_archive_writer

Fixes #107495
2024-04-17 12:51:20 +00:00
bjorn3
66a73f0c20 Add regression test for #107495 2024-04-17 12:50:03 +00:00
klensy
1d929cf8b7 allow to set line-directives-only too 2024-04-17 15:43:52 +03:00
Ben Kimock
1567d4d850 Remove libc from more tests 2024-04-17 08:36:49 -04:00
Kjetil Kjeka
4734163006 Add llvm-bitcode-linker to build manifest 2024-04-17 14:35:08 +02:00
klensy
3ea7cf5383 bootstrap: actually allow set debuginfo-level to "lines-tables-only" 2024-04-17 15:30:51 +03:00
onur-ozkan
214bf5a017 enable clippy for bootstrap on CI PRs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-17 14:04:07 +03:00
bors
91b8441b3a Auto merge of #17055 - wyatt-herkamp:fix_panic_at_unused_variable, r=Veykril
fix: Replace Just the variable name in Unused Variable Diagnostic Fix

Changes Unused Variable diagnostic to just look at the variable name, not the entire syntax range.

Also added a test for an unused variable in an array destructure.

Closes #17053
2024-04-17 10:11:03 +00:00
Oli Scherer
182698fef2 Don't error on subtyping of equal types 2024-04-17 10:09:38 +00:00
Lukas Wirth
0eb7b6c7b5 Don't show unused_variables fixes if the name comes from a macro definition 2024-04-17 12:05:35 +02:00
Zalathar
d3c3051995 Move confusing comment about otherwise blocks in lower_match_tree
This comment was historically inside a block guarded by
`if let Some(otherwise_block) = otherwise`.

When #120978 made the otherwise block non-optional, it also flattened that
region of code. Doing so left this comment awkwardly stranded above an
unrelated line of code, without its original context.

We can restore that context by moving it above the declaration of `otherwise`.
2024-04-17 19:59:39 +10:00
Oli Scherer
126dcc618d Use less fragile error handling 2024-04-17 09:50:44 +00:00
Oli Scherer
77fe9f0a72 Validate before reporting interning errors.
validation produces much higher quality errors and already handles most of the cases
2024-04-17 09:50:44 +00:00
Oli Scherer
8b2a4f8b43 Simplify alloc id mutability check 2024-04-17 09:50:44 +00:00
Oli Scherer
140c9e10bb Deduplicate logic for checking the mutability of allocations 2024-04-17 09:50:44 +00:00
Oli Scherer
d87e9636d5 Run the "is this static mutable" logic the same way as in in_mutable_memory 2024-04-17 09:50:44 +00:00
Oli Scherer
8c9cba2be7 Validate nested static items 2024-04-17 09:50:15 +00:00
bors
9776f647e6 Auto merge of #3480 - RalfJung:alloc_error_handler, r=RalfJung
directly call handle_alloc_error

Also test more codepaths. There's like 5 different things that can happen on allocation failure! Between `-Zoom`, `#[alloc_error_handler]`, and `set_alloc_error_hook`, we have 3 layers of behavior overrides. It's all a bit messy.

https://github.com/rust-lang/rust/pull/112331 seems intended to clean this up, but has not yet reached consensus.
2024-04-17 09:41:06 +00:00
bors
14701efcaf Auto merge of #3479 - rust-lang:rustup-2024-04-17, r=RalfJung
Automatic Rustup
2024-04-17 09:08:55 +00:00