File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
tests/ui/type/pattern_types Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ feature( pattern_types) ]
2+ #![ feature( core_pattern_types) ]
3+ #![ feature( core_pattern_type) ]
4+
5+ use std:: pat:: pattern_type;
6+
7+ trait Foo { }
8+
9+ impl < const START : u32 , const END : u32 > Foo for pattern_type ! ( u32 is START ..=END ) { }
10+ //~^ ERROR: range patterns must have constant range start and end
11+ //~| ERROR: range patterns must have constant range start and end
12+
13+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: "range patterns must have constant range start and end"
2+ --> $DIR/const_generics.rs:9:69
3+ |
4+ LL | impl<const START: u32, const END: u32> Foo for pattern_type!(u32 is START..=END) {}
5+ | ^^^^^
6+
7+ error: "range patterns must have constant range start and end"
8+ --> $DIR/const_generics.rs:9:77
9+ |
10+ LL | impl<const START: u32, const END: u32> Foo for pattern_type!(u32 is START..=END) {}
11+ | ^^^
12+
13+ error: aborting due to 2 previous errors
14+
You can’t perform that action at this time.
0 commit comments