about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmjad Alsharafi <amjadsharafi10@gmail.com>2020-08-26 19:17:07 +0800
committerAmjad Alsharafi <amjadsharafi10@gmail.com>2020-08-26 19:17:07 +0800
commit7a7a28d6bbfa6bbbbd3c4d65a11e9b33995cd63f (patch)
tree5b51443141fd803507e6988ce26b203e67c57bc1
parentd89d2a972d3174504594ff2eba70423dacaddcfb (diff)
downloadrust-7a7a28d6bbfa6bbbbd3c4d65a11e9b33995cd63f.tar.gz
rust-7a7a28d6bbfa6bbbbd3c4d65a11e9b33995cd63f.zip
Fixed file formatting and made `tidy` happy
-rw-r--r--src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs3
-rw-r--r--src/test/ui/const-generics/std/const-generics-range.min.stderr4
-rw-r--r--src/test/ui/const-generics/std/const-generics-range.rs6
3 files changed, 8 insertions, 5 deletions
diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
index ae77b74bbd8..356652d67aa 100644
--- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
+++ b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
@@ -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!()
 }
diff --git a/src/test/ui/const-generics/std/const-generics-range.min.stderr b/src/test/ui/const-generics/std/const-generics-range.min.stderr
index a71e7442021..00edcbc53ce 100644
--- a/src/test/ui/const-generics/std/const-generics-range.min.stderr
+++ b/src/test/ui/const-generics/std/const-generics-range.min.stderr
@@ -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>>;
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/const-generics/std/const-generics-range.rs b/src/test/ui/const-generics/std/const-generics-range.rs
index 51562e61aaa..209aa39775d 100644
--- a/src/test/ui/const-generics/std/const-generics-range.rs
+++ b/src/test/ui/const-generics/std/const-generics-range.rs
@@ -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() {}