summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-6539.rs
blob: ac6c3e4aba046bed0696e01f1c43c9b67f661d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// The test for the ICE 6539: https://github.com/rust-lang/rust-clippy/issues/6539.
// The cause is that `zero_sized_map_values` used `layout_of` with types from type aliases,
// which is essentially the same as the ICE 4968.
// Note that only type aliases with associated types caused the crash this time,
// not others such as trait impls.

use std::collections::{BTreeMap, HashMap};

pub trait Trait {
    type Assoc;
}

type TypeAlias<T> = HashMap<(), <T as Trait>::Assoc>;
type TypeAlias2<T> = BTreeMap<(), <T as Trait>::Assoc>;

fn main() {}