File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
src/test/ui/const-generics Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ impl A for B {}
99
1010fn test < const T : & ' static dyn A > ( ) {
1111 //[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
12- //[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden as the type of a const generic parameter
12+ //[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden as the type of
13+ // a const generic parameter
1314 //[min]~| ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
1415 unimplemented ! ( )
1516}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ LL | struct _RangeInclusive<const R: std::ops::RangeInclusive<usize>>;
3535 = note: more complex types are supported with `#[feature(const_generics)]`
3636
3737error: `std::ops::RangeTo<usize>` is forbidden as the type of a const generic parameter
38- --> $DIR/const-generics-range.rs:29 :26
38+ --> $DIR/const-generics-range.rs:30 :26
3939 |
4040LL | struct _RangeTo<const R: std::ops::RangeTo<usize>>;
4141 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -44,7 +44,7 @@ LL | struct _RangeTo<const R: std::ops::RangeTo<usize>>;
4444 = note: more complex types are supported with `#[feature(const_generics)]`
4545
4646error: `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic parameter
47- --> $DIR/const-generics-range.rs:34 :35
47+ --> $DIR/const-generics-range.rs:35 :35
4848 |
4949LL | struct _RangeToInclusive<const R: std::ops::RangeToInclusive<usize>>;
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ const RANGE_FULL : _RangeFull<{ .. }> = _RangeFull;
2222// Regression test for #70155
2323// `RangeInclusive` should be usable within const generics:
2424struct _RangeInclusive < const R : std:: ops:: RangeInclusive < usize > > ;
25- //[min]~^ ERROR `std::ops::RangeInclusive<usize>` is forbidden as the type of a const generic parameter
25+ //[min]~^ ERROR `std::ops::RangeInclusive<usize>` is forbidden as the type of a const generic
26+ // parameter
2627const RANGE_INCLUSIVE : _RangeInclusive < { 0 ..= 999 } > = _RangeInclusive;
2728
2829// `RangeTo` should be usable within const generics:
@@ -32,7 +33,8 @@ const RANGE_TO : _RangeTo<{ .. 1000 }> = _RangeTo;
3233
3334// `RangeToInclusive` should be usable within const generics:
3435struct _RangeToInclusive < const R : std:: ops:: RangeToInclusive < usize > > ;
35- //[min]~^ ERROR `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic parameter
36+ //[min]~^ ERROR `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic
37+ // parameter
3638const RANGE_TO_INCLUSIVE : _RangeToInclusive < { ..= 999 } > = _RangeToInclusive;
3739
3840pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments