//! This test used to ICE in typeck because of the type/const mismatch, //! even though wfcheck already errored. //! issue: rust-lang/rust#123457 pub struct KeyHolder {} pub trait ContainsKey {} pub trait SubsetExcept

{} impl ContainsKey for KeyHolder {} //~^ ERROR: type provided when a constant was expected //~| ERROR: type provided when a constant was expected impl> SubsetExcept

for T {} pub fn remove_key>() -> S { loop {} } fn main() { let map: KeyHolder<0> = remove_key::<_, _>(); //~^ ERROR: the trait bound `KeyHolder<0>: SubsetExcept<_>` is not satisfied }