diff options
Diffstat (limited to 'tests/ui/structs/ice-struct-tail-normalization-113272.rs')
| -rw-r--r-- | tests/ui/structs/ice-struct-tail-normalization-113272.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/structs/ice-struct-tail-normalization-113272.rs b/tests/ui/structs/ice-struct-tail-normalization-113272.rs new file mode 100644 index 00000000000..85d3d1b4886 --- /dev/null +++ b/tests/ui/structs/ice-struct-tail-normalization-113272.rs @@ -0,0 +1,17 @@ +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); + } +} |
