Fixed file formatting and made tidy happy

This commit is contained in:
Amjad Alsharafi
2020-08-26 19:17:07 +08:00
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 @@
// 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 @@
// `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() {}