blob: ae81421e9e1918b4456ac91a210d352b71d46a19 [file] [log] [blame]
Gary Guo0a03f8c2021-10-11 17:20:201// check-pass
2
3#![feature(const_trait_impl)]
Gary Guo0a03f8c2021-10-11 17:20:204
Deadbeef257f0652022-03-16 09:49:545#[const_trait]
Gary Guo0a03f8c2021-10-11 17:20:206trait Tr {
7 fn req(&self);
8
Gary Guo0a03f8c2021-10-11 17:20:209 fn default() {}
10}
11
12impl const Tr for u8 {
13 fn req(&self) {}
Gary Guo0a03f8c2021-10-11 17:20:2014}
15
16macro_rules! impl_tr {
17 ($ty: ty) => {
18 impl const Tr for $ty {
19 fn req(&self) {}
Gary Guo0a03f8c2021-10-11 17:20:2020 }
21 }
22}
23
24impl_tr!(u64);
25
26fn main() {}