Fixed file formatting and made tidy
happy
This commit is contained in:
parent
d89d2a972d
commit
7a7a28d6bb
3 changed files with 8 additions and 5 deletions
|
@ -9,7 +9,8 @@ impl A for B {}
|
|||
|
||||
fn test<const T: &'static dyn A>() {
|
||||
//[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
|
||||
//[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden as the type of a const generic parameter
|
||||
//[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden as the type of
|
||||
// a const generic parameter
|
||||
//[min]~| ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
|
||||
unimplemented!()
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ LL | struct _RangeInclusive<const R: std::ops::RangeInclusive<usize>>;
|
|||
= note: more complex types are supported with `#[feature(const_generics)]`
|
||||
|
||||
error: `std::ops::RangeTo<usize>` is forbidden as the type of a const generic parameter
|
||||
--> $DIR/const-generics-range.rs:29:26
|
||||
--> $DIR/const-generics-range.rs:30:26
|
||||
|
|
||||
LL | struct _RangeTo<const R: std::ops::RangeTo<usize>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -44,7 +44,7 @@ LL | struct _RangeTo<const R: std::ops::RangeTo<usize>>;
|
|||
= note: more complex types are supported with `#[feature(const_generics)]`
|
||||
|
||||
error: `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic parameter
|
||||
--> $DIR/const-generics-range.rs:34:35
|
||||
--> $DIR/const-generics-range.rs:35:35
|
||||
|
|
||||
LL | struct _RangeToInclusive<const R: std::ops::RangeToInclusive<usize>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -22,7 +22,8 @@ const RANGE_FULL : _RangeFull<{ .. }> = _RangeFull;
|
|||
// Regression test for #70155
|
||||
// `RangeInclusive` should be usable within const generics:
|
||||
struct _RangeInclusive<const R: std::ops::RangeInclusive<usize>>;
|
||||
//[min]~^ ERROR `std::ops::RangeInclusive<usize>` is forbidden as the type of a const generic parameter
|
||||
//[min]~^ ERROR `std::ops::RangeInclusive<usize>` is forbidden as the type of a const generic
|
||||
// parameter
|
||||
const RANGE_INCLUSIVE : _RangeInclusive<{ 0 ..= 999 }> = _RangeInclusive;
|
||||
|
||||
// `RangeTo` should be usable within const generics:
|
||||
|
@ -32,7 +33,8 @@ const RANGE_TO : _RangeTo<{ .. 1000 }> = _RangeTo;
|
|||
|
||||
// `RangeToInclusive` should be usable within const generics:
|
||||
struct _RangeToInclusive<const R: std::ops::RangeToInclusive<usize>>;
|
||||
//[min]~^ ERROR `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic parameter
|
||||
//[min]~^ ERROR `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic
|
||||
// parameter
|
||||
const RANGE_TO_INCLUSIVE : _RangeToInclusive<{ ..= 999 }> = _RangeToInclusive;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue