]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/crashes/ice-6539.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / crashes / ice-6539.rs
CommitLineData
f20569fa
XL
1// The test for the ICE 6539: https://github.com/rust-lang/rust-clippy/issues/6539.
2// The cause is that `zero_sized_map_values` used `layout_of` with types from type aliases,
3// which is essentially the same as the ICE 4968.
4// Note that only type aliases with associated types caused the crash this time,
5// not others such as trait impls.
6
7use std::collections::{BTreeMap, HashMap};
8
9pub trait Trait {
10 type Assoc;
11}
12
13type TypeAlias<T> = HashMap<(), <T as Trait>::Assoc>;
14type TypeAlias2<T> = BTreeMap<(), <T as Trait>::Assoc>;
15
16fn main() {}