blob: 703e63ae047ffba861487dc4a95ac62a54ce80c0 [file] [log] [blame] [edit]
// Check that a byte string literal to a const parameter with a non-u8
// element type isn't lowered to a ValTree with an incorrect type
#![feature(adt_const_params)]
#![feature(rustc_attrs)]
#[rustc_dump_predicates]
struct ConstBytes<const T: &'static [*mut u8; 3]>
//~^ ERROR rustc_dump_predicates
//~| NOTE Binder { value: ConstArgHasType(T/#0, &'static [*mut u8; 3_usize]), bound_vars: [] }
//~| NOTE Binder { value: TraitPredicate(<ConstBytes<{const error}> as std::marker::Sized>, polarity:Positive), bound_vars: [] }
where
ConstBytes<b"AAA">: Sized;
//~^ ERROR mismatched types
//~| NOTE expected `&[*mut u8; 3]`, found `&[u8; 3]`
//~| NOTE expected reference `&'static [*mut u8; 3]`
fn main() {}