blob: 97edb7e266ad0e6e68142f86e904a9b3df79ad44 [file] [log] [blame] [edit]
// Test that the variance computation considers types that
// appear in const expressions to be invariant.
#![feature(rustc_attrs)]
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
trait Trait {
const Const: usize;
}
#[rustc_variance]
struct Foo<T: Trait> { //~ ERROR [T: o]
field: [u8; <T as Trait>::Const]
//~^ ERROR: unconstrained generic constant
}
fn main() { }