mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 20:17:50 +00:00

- `check-pass` test for a MRE of #135020 - fail test for #135138 - switch to `TooGeneric` for checking CMSE fn signatures - switch to `TooGeneric` for compute `SizeSkeleton` (for transmute) - fix broken tests
19 lines
446 B
Rust
19 lines
446 B
Rust
trait Trait {
|
|
type RefTarget;
|
|
}
|
|
|
|
impl Trait for () where Missing: Trait {}
|
|
//~^ ERROR cannot find type `Missing` in this scope
|
|
//~| ERROR not all trait items implemented, missing: `RefTarget`
|
|
|
|
struct Other {
|
|
data: <() as Trait>::RefTarget,
|
|
}
|
|
|
|
fn main() {
|
|
unsafe {
|
|
std::mem::transmute::<Option<()>, Option<&Other>>(None);
|
|
//~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
|
|
}
|
|
}
|