Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #133658

Merged
merged 24 commits into from
Nov 30, 2024
Merged

Rollup of 10 pull requests #133658

merged 24 commits into from
Nov 30, 2024

Conversation

jieyouxu
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

daltenty and others added 24 commits November 7, 2024 16:52
AIX should follow a similar path here to other libunwind platforms, with regards to system vs in-tree libunwind and the native lib search directories
`parse_expr_bottom` stores `this.token.span` in `lo`, but then fails to
use it in many places where it could. This commit fixes that, and
likewise (to a smaller extent) in `parse_ty_common`.
This fixes the yet to be published advisory for uninit/out-of-bounds
memory reads and potential exposure.

See rustsec/advisory-db#2147
When we encounter an error caused by traits/types of different versions of the same crate, filter out the current crate when collecting spans to add to the context so we don't call `extern_crate` on the `DefId` of the current crate, which is meaningless and ICEs.

Produced output with this filter:

```
error[E0277]: the trait bound `foo::Struct: Trait` is not satisfied
  --> y.rs:13:19
   |
13 |     check_trait::<foo::Struct>();
   |                   ^^^^^^^^^^^ the trait `Trait` is not implemented for `foo::Struct`
   |
note: there are multiple different versions of crate `foo` in the dependency graph
  --> y.rs:7:1
   |
4  | extern crate foo;
   | ----------------- one version of crate `foo` is used here, as a direct dependency of the current crate
5  |
6  | pub struct Struct;
   | ----------------- this type implements the required trait
7  | pub trait Trait {}
   | ^^^^^^^^^^^^^^^ this is the required trait
   |
  ::: x.rs:4:1
   |
4  | pub struct Struct;
   | ----------------- this type doesn't implement the required trait
5  | pub trait Trait {}
   | --------------- this is the found trait
   = note: two types coming from two different versions of the same crate are different types even if they look the same
   = help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `check_trait`
  --> y.rs:10:19
   |
10 | fn check_trait<T: Trait>() {}
   |                   ^^^^^ required by this bound in `check_trait`
```

Fix rust-lang#133563.
and add a test for the constant case
Stabilize `extended_varargs_abi_support`

I think that is everything? If there is any documentation regarding `extern` and/or varargs to correct, let me know, some quick greps suggest that there might be none.

Tracking issue: rust-lang#100189
[AIX] handle libunwind native_libs

AIX should follow a similar path here to other libunwind platforms, with regards to system vs in-tree libunwind and the native lib search directories.

Having the right native lib search directories here is also required to get the correct default library search paths, due to some quirks of the AIX linker.
tests: Add regression test for self referential structs with cow as last field

Making compilation pass for this code was retroactively stabilized via FCP in 1.79. The code does not compile in 1.78.

See rust-lang#129541 for details.

Closes rust-lang#107481
…k-Simulacrum

Bump `ruzstd` to 0.7.3

This upgrades `ruzstd` to a version not affected by [RUSTSEC-2024-0400](https://rustsec.org/advisories/RUSTSEC-2024-0400.html)
Do not call `extern_crate` on current trait on crate mismatch errors

When we encounter an error caused by traits/types of different versions of the same crate, filter out the current crate when collecting spans to add to the context so we don't call `extern_crate` on the `DefId` of the current crate, which is meaningless and ICEs.

Produced output with this filter:

```
error[E0277]: the trait bound `foo::Struct: Trait` is not satisfied
  --> y.rs:13:19
   |
13 |     check_trait::<foo::Struct>();
   |                   ^^^^^^^^^^^ the trait `Trait` is not implemented for `foo::Struct`
   |
note: there are multiple different versions of crate `foo` in the dependency graph
  --> y.rs:7:1
   |
4  | extern crate foo;
   | ----------------- one version of crate `foo` is used here, as a direct dependency of the current crate
5  |
6  | pub struct Struct;
   | ----------------- this type implements the required trait
7  | pub trait Trait {}
   | ^^^^^^^^^^^^^^^ this is the required trait
   |
  ::: x.rs:4:1
   |
4  | pub struct Struct;
   | ----------------- this type doesn't implement the required trait
5  | pub trait Trait {}
   | --------------- this is the found trait
   = note: two types coming from two different versions of the same crate are different types even if they look the same
   = help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `check_trait`
  --> y.rs:10:19
   |
10 | fn check_trait<T: Trait>() {}
   |                   ^^^^^ required by this bound in `check_trait`
```

Fix rust-lang#133563.
Fix target_feature handling in freg of LoongArch inline assembly

In LoongArch inline assembly, freg currently always accepts f32/f64 as input/output.

https://github.com/rust-lang/rust/blob/9b4d7c6a40b328d212095c28670c629facf1557d/compiler/rustc_target/src/asm/loongarch.rs#L41

However, these types actually require f/d target features as in RISC-V.
Otherwise, an (ugly) compile error will occur: https://godbolt.org/z/K61Gq1E9E

f32/f64 without f:

```
error: couldn't allocate output register for constraint '{$f1}'
  --> <source>:12:11
   |
12 |     asm!("", in("$f1") x, lateout("$f1") y);
   |           ^
```

f64 with f but without d:

```
error: scalar-to-vector conversion failed, possible invalid constraint for vector type
  --> <source>:19:11
   |
19 |     asm!("", in("$f1") x, lateout("$f1") y);
   |           ^
```

cc ``@heiher``

r? ``@Amanieu``

``@rustbot`` label +O-LoongArch +A-inline-assembly
…cs, r=Amanieu

Add `+forced-atomics` feature to esp32s2 no_std  target

Similar to rust-lang#114499 but for the Xtensa backend. The ESP32-S2 doesn't have native atomic support, but can have atomic load/stores as part of the ISA with this LLVM codegen feature.

Note: The current rev of LLVM that rustc is using doesn't contain the `+forced-atomics` feature for Xtensa, but I'm pushing this now to remove the patch from our fork in `esp-rs/rust`.

r? ``@Amanieu`` because you reviewed the related RISC-V PR
…to_variadic_function, r=compiler-errors

Simplify hir_typeck_pass_to_variadic_function

r? ``@compiler-errors``
This reworks a bit how the diagnostic is generated so that it does the same as rust-lang#133538

The `help` is useless now so I removed it
…s, r=compiler-errors

Improve span handling in `parse_expr_bottom`.

`parse_expr_bottom` stores `this.token.span` in `lo`, but then fails to use it in many places where it could. This commit fixes that, and likewise (to a smaller extent) in `parse_ty_common`.

r? ``@spastorino``
…compiler-errors

custom MIR: add doc comment for debuginfo

This is a revival of rust-lang#117015
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 30, 2024
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Nov 30, 2024

📌 Commit 6512836 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 30, 2024
@bors
Copy link
Contributor

bors commented Nov 30, 2024

⌛ Testing commit 6512836 with merge b980396...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 30, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#116161 (Stabilize `extended_varargs_abi_support`)
 - rust-lang#132750 ([AIX] handle libunwind native_libs)
 - rust-lang#133488 (tests: Add regression test for self referential structs with cow as last field)
 - rust-lang#133569 (Bump `ruzstd` to 0.7.3)
 - rust-lang#133585 (Do not call `extern_crate` on current trait on crate mismatch errors)
 - rust-lang#133587 (Fix target_feature handling in freg of LoongArch inline assembly)
 - rust-lang#133599 (Add `+forced-atomics` feature to esp32s2 no_std  target)
 - rust-lang#133620 (Simplify hir_typeck_pass_to_variadic_function)
 - rust-lang#133623 (Improve span handling in `parse_expr_bottom`.)
 - rust-lang#133625 (custom MIR: add doc comment for debuginfo)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Nov 30, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 30, 2024
@nikic
Copy link
Contributor

nikic commented Nov 30, 2024

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 30, 2024
@bors
Copy link
Contributor

bors commented Nov 30, 2024

⌛ Testing commit 6512836 with merge e93e096...

@bors
Copy link
Contributor

bors commented Nov 30, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing e93e096 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 30, 2024
@bors bors merged commit e93e096 into rust-lang:master Nov 30, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 30, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#116161 Stabilize extended_varargs_abi_support fa01cd66c55102f7ed07bd576ccb87505350a65f (link)
#132750 [AIX] handle libunwind native_libs 66000559ee823655cce309236004d261132f0113 (link)
#133488 tests: Add regression test for self referential structs wit… c1a0312f1f79d06045625d4ec8411fda7de9d4eb (link)
#133569 Bump ruzstd to 0.7.3 38ed86c97b31c1089570678b6ff04e142f11ea14 (link)
#133585 Do not call extern_crate on current trait on crate mismat… cf361bf97491de76bf2ba2114257bdde3c6aaf08 (link)
#133587 Fix target_feature handling in freg of LoongArch inline ass… 6fdace1a3db0e334c8ac8ba7a9843407e0d72671 (link)
#133599 Add +forced-atomics feature to esp32s2 no_std target 600dc5c9da4087e7320f3a27e04d54a65045f3a1 (link)
#133620 Simplify hir_typeck_pass_to_variadic_function 14389027bf421049ff7f7d73f5251e39d2f1b989 (link)
#133623 Improve span handling in parse_expr_bottom. 17b5112c16db8c917415aa8ccadc9369d94e0456 (link)
#133625 custom MIR: add doc comment for debuginfo 896425affd6caa8165d10d586ea4ce787b685e37 (link)

previous master: e48ddd8a0b

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e93e096): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -3.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.5%, -2.5%] 4
All ❌✅ (primary) - - 0

Cycles

Results (primary 5.7%, secondary 2.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
5.7% [5.7%, 5.7%] 1
Regressions ❌
(secondary)
2.6% [2.1%, 2.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.7% [5.7%, 5.7%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 773.769s -> 773.798s (0.00%)
Artifact size: 332.32 MiB -> 332.31 MiB (-0.00%)

@jieyouxu jieyouxu deleted the rollup-rq7e0gk branch November 30, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.