Skip to content

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Aug 24, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 14 commits August 23, 2025 16:49
fixes 134088, though it is a shame to lose some of this wonderful detail.
This avoids the need for `#![allow(non_upper_case_globals)]`.
Previously it indicated a single version, regardless of their count.
Observed in: davidlattimore/wild#1041
Dial down detail of B-tree description

fixes rust-lang#134088, though it is a shame to lose some of this wonderful detail.

r? ```@workingjubilee```

EDIT: newest versions keep old detail, but move it down a bit.
remove deprecated Error::description in impls

[libs-api permission](rust-lang/libs-team#615 (comment))

r? ```@cuviper```
or ```@jhpratt```
…=lcnr

Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts

Fixes rust-lang#141806

When we have an impossible where clause like `dyn Trait<u8>: Sized`, this may make a dyn-to-dyn cast like `dyn Trait<()> -> dyn trait<u8>` to successfully type check as if it were a wide-to-thin ptr cast (discarding metadata):

https://github.com/rust-lang/rust/blob/16ad385579cebb6f7d53367c552661b6b51a4a02/compiler/rustc_hir_typeck/src/cast.rs#L862-L865

In borrowck, we are expecting that the only meaningful dyn-to-dyn cast to be a metadata-preserving wide-to-wide ptr cast, which requires that the principals of the dyn pointers are equal. Borrowck additionally assumes that these principals have already been proven equal *modulo regions*, and we thus ICE since `Trait<u8>` and `Trait<()>` do not unify:

https://github.com/rust-lang/rust/blob/16ad385579cebb6f7d53367c552661b6b51a4a02/compiler/rustc_borrowck/src/type_check/mod.rs#L1481-L1524

This PR fixes this ICE by checking whether the RHS of the cast is considered to be Sized in the environment of the MIR typeck, and if so then skipping over this dyn->dyn principal compatibility check.

r? ```@lcnr``` perhaps?
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype

This should be nicer and more type-safe than the old typedef for `c_int`/`i32`.

Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
raw-dylib-elf: set correct `DT_VERDEFNUM`

Previously it indicated a single version, regardless of their count.
Observed in: davidlattimore/wild#1041
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Aug 24, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Aug 24, 2025

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Aug 24, 2025
@bors
Copy link
Collaborator

bors commented Aug 24, 2025

📌 Commit 6efc608 has been approved by jhpratt

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 Aug 24, 2025
bors added a commit that referenced this pull request Aug 25, 2025
Rollup of 5 pull requests

Successful merges:

 - #135761 (Dial down detail of B-tree description)
 - #144373 (remove deprecated Error::description in impls)
 - #145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts)
 - #145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype)
 - #145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Aug 25, 2025

⌛ Testing commit 6efc608 with merge 874fbb1...

@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] gimli test:false 5.187
[RUSTC-TIMING] object test:false 5.536
warning: dropping unsupported crate type `dylib` for target `x86_64-fortanix-unknown-sgx`

error[E0425]: cannot find value `RESULT_SUCCESS` in this scope
 --> library/std/src/sys/pal/sgx/os.rs:8:5
  |
8 |     RESULT_SUCCESS
  |     ^^^^^^^^^^^^^^ not found in this scope
  |
help: consider importing one of these constants
  |
1 + use crate::os::fortanix_sgx::usercalls::raw::RESULT_SUCCESS;
  |
1 + use fortanix_sgx_abi::RESULT_SUCCESS;
  |

error: unused import: `str`
 --> library/std/src/sys/pal/sgx/os.rs:5:22
  |
5 | use crate::{fmt, io, str};
  |                      ^^^
  |
  = note: `-D unused-imports` implied by `-D warnings`

@bors
Copy link
Collaborator

bors commented Aug 25, 2025

💔 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 Aug 25, 2025
@Zalathar Zalathar closed this Aug 25, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 25, 2025
@jhpratt jhpratt deleted the rollup-xth9qsy branch August 25, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows rollup A PR which is a rollup 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.

8 participants