blob: 2340df25025466e4c4b48d45bc2f9bdcc67a540c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//! Test that we don't ICE when passing the wrong ADT to ASSUME.
#![feature(adt_const_params)]
#![feature(transmutability)]
use std::marker::ConstParamTy;
use std::mem::TransmuteFrom;
#[derive(ConstParamTy, PartialEq, Eq)]
struct NotAssume;
fn foo<const ASSUME: NotAssume>()
where
u8: TransmuteFrom<u8, ASSUME>, //~ ERROR the constant `ASSUME` is not of type `Assume`
{
}
fn main() {
foo::<{ NotAssume }>();
}
|