Closed shao-hua-li closed 1 hour ago
This is not unsound. This is just nonsense code being accepted by the compiler. There is no meaning to ?
on arbitrary traits, so ignoring the bound outright is obviously not desirable, but totally fine for the compiler to do.
I fixed this in https://github.com/rust-lang/rust/pull/132209.
Code
I tried this code:
I expected to see this happen: rustc rejects this code
Instead, this happened: rustc since 1.78 accepts the code
Version it worked on
It most recently worked on: Rust 1.77
Version with regression