• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
7 use std::collections::{BTreeMap, HashMap};
8 
9 pub trait Trait {
10     type Assoc;
11 }
12 
13 type TypeAlias<T> = HashMap<(), <T as Trait>::Assoc>;
14 type TypeAlias2<T> = BTreeMap<(), <T as Trait>::Assoc>;
15 
main()16 fn main() {}
17