about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorJeremy Smart <jeremy3141592@gmail.com>2025-07-31 23:27:02 -0400
committerJeremy Smart <jeremy3141592@gmail.com>2025-09-08 22:07:43 -0400
commit8d0c07f1a1ccc46f58d2c6dbf0dbf32dc0b0d6b9 (patch)
tree0d328de6ffe270424d23b8a29ac875b98e87d4fa /tests
parent51ff895062ba60a7cba53f57af928c3fb7b0f2f4 (diff)
downloadrust-8d0c07f1a1ccc46f58d2c6dbf0dbf32dc0b0d6b9.tar.gz
rust-8d0c07f1a1ccc46f58d2c6dbf0dbf32dc0b0d6b9.zip
change end to last
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/const-generics/std/const-generics-range.full.stderr2
-rw-r--r--tests/ui/const-generics/std/const-generics-range.min.stderr2
-rw-r--r--tests/ui/const-generics/std/const-generics-range.rs14
-rw-r--r--tests/ui/iterators/ranges.stderr6
-rw-r--r--tests/ui/new-range/disabled.rs4
-rw-r--r--tests/ui/new-range/enabled.rs4
-rw-r--r--tests/ui/range/issue-54505-no-literals.stderr4
-rw-r--r--tests/ui/range/issue-54505-no-std.stderr2
-rw-r--r--tests/ui/range/issue-54505.stderr2
9 files changed, 20 insertions, 20 deletions
diff --git a/tests/ui/const-generics/std/const-generics-range.full.stderr b/tests/ui/const-generics/std/const-generics-range.full.stderr
index 2b5c63e6643..ccede2af9e5 100644
--- a/tests/ui/const-generics/std/const-generics-range.full.stderr
+++ b/tests/ui/const-generics/std/const-generics-range.full.stderr
@@ -28,7 +28,7 @@ error[E0741]: `RangeTo<usize>` must implement `ConstParamTy` to be used as the t
 LL | struct _RangeTo<const R: std::ops::RangeTo<usize>>;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0741]: `RangeToInclusive<usize>` must implement `ConstParamTy` to be used as the type of a const generic parameter
+error[E0741]: `std::ops::RangeToInclusive<usize>` must implement `ConstParamTy` to be used as the type of a const generic parameter
   --> $DIR/const-generics-range.rs:34:35
    |
 LL | struct _RangeToInclusive<const R: std::ops::RangeToInclusive<usize>>;
diff --git a/tests/ui/const-generics/std/const-generics-range.min.stderr b/tests/ui/const-generics/std/const-generics-range.min.stderr
index 04e3fe74453..43a57c880d5 100644
--- a/tests/ui/const-generics/std/const-generics-range.min.stderr
+++ b/tests/ui/const-generics/std/const-generics-range.min.stderr
@@ -58,7 +58,7 @@ help: add `#![feature(adt_const_params)]` to the crate attributes to enable more
 LL + #![feature(adt_const_params)]
    |
 
-error: `RangeToInclusive<usize>` is forbidden as the type of a const generic parameter
+error: `std::ops::RangeToInclusive<usize>` is forbidden as the type of a const generic parameter
   --> $DIR/const-generics-range.rs:34:35
    |
 LL | struct _RangeToInclusive<const R: std::ops::RangeToInclusive<usize>>;
diff --git a/tests/ui/const-generics/std/const-generics-range.rs b/tests/ui/const-generics/std/const-generics-range.rs
index 3a238ed177e..391366dadba 100644
--- a/tests/ui/const-generics/std/const-generics-range.rs
+++ b/tests/ui/const-generics/std/const-generics-range.rs
@@ -7,32 +7,32 @@
 // `Range` should be usable within const generics:
 struct _Range<const R: std::ops::Range<usize>>;
 //[min]~^ ERROR `std::ops::Range<usize>` is forbidden
-const RANGE : _Range<{ 0 .. 1000 }> = _Range;
+const RANGE: _Range<{ 0..1000 }> = _Range;
 
 // `RangeFrom` should be usable within const generics:
 struct _RangeFrom<const R: std::ops::RangeFrom<usize>>;
 //[min]~^ ERROR `std::ops::RangeFrom<usize>` is forbidden
-const RANGE_FROM : _RangeFrom<{ 0 .. }> = _RangeFrom;
+const RANGE_FROM: _RangeFrom<{ 0.. }> = _RangeFrom;
 
 // `RangeFull` should be usable within const generics:
 struct _RangeFull<const R: std::ops::RangeFull>;
 //[min]~^ ERROR `RangeFull` is forbidden
-const RANGE_FULL : _RangeFull<{ .. }> = _RangeFull;
+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
-const RANGE_INCLUSIVE : _RangeInclusive<{ 0 ..= 999 }> = _RangeInclusive;
+const RANGE_INCLUSIVE: _RangeInclusive<{ 0..=999 }> = _RangeInclusive;
 
 // `RangeTo` should be usable within const generics:
 struct _RangeTo<const R: std::ops::RangeTo<usize>>;
 //[min]~^ ERROR `RangeTo<usize>` is forbidden
-const RANGE_TO : _RangeTo<{ .. 1000 }> = _RangeTo;
+const RANGE_TO: _RangeTo<{ ..1000 }> = _RangeTo;
 
 // `RangeToInclusive` should be usable within const generics:
 struct _RangeToInclusive<const R: std::ops::RangeToInclusive<usize>>;
-//[min]~^ ERROR `RangeToInclusive<usize>` is forbidden
-const RANGE_TO_INCLUSIVE : _RangeToInclusive<{ ..= 999 }> = _RangeToInclusive;
+//[min]~^ ERROR `std::ops::RangeToInclusive<usize>` is forbidden
+const RANGE_TO_INCLUSIVE: _RangeToInclusive<{ ..=999 }> = _RangeToInclusive;
 
 pub fn main() {}
diff --git a/tests/ui/iterators/ranges.stderr b/tests/ui/iterators/ranges.stderr
index b9fbcd5304b..f85ce644073 100644
--- a/tests/ui/iterators/ranges.stderr
+++ b/tests/ui/iterators/ranges.stderr
@@ -8,15 +8,15 @@ LL |     for _ in ..10 {}
    = note: `..end` is a `RangeTo`, which cannot be iterated on; you might have meant to have a bounded `Range`: `0..end`
    = note: required for `RangeTo<{integer}>` to implement `IntoIterator`
 
-error[E0277]: `RangeToInclusive<{integer}>` is not an iterator
+error[E0277]: `std::ops::RangeToInclusive<{integer}>` is not an iterator
   --> $DIR/ranges.rs:4:14
    |
 LL |     for _ in ..=10 {}
    |              ^^^^^ if you meant to iterate until a value (including it), add a starting value
    |
-   = help: the trait `Iterator` is not implemented for `RangeToInclusive<{integer}>`
+   = help: the trait `Iterator` is not implemented for `std::ops::RangeToInclusive<{integer}>`
    = note: `..=end` is a `RangeToInclusive`, which cannot be iterated on; you might have meant to have a bounded `RangeInclusive`: `0..=end`
-   = note: required for `RangeToInclusive<{integer}>` to implement `IntoIterator`
+   = note: required for `std::ops::RangeToInclusive<{integer}>` to implement `IntoIterator`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/new-range/disabled.rs b/tests/ui/new-range/disabled.rs
index 1a5fe3f9743..6ba29f5ca9a 100644
--- a/tests/ui/new-range/disabled.rs
+++ b/tests/ui/new-range/disabled.rs
@@ -6,20 +6,20 @@ fn main() {
     // Unchanged
     let a: core::range::RangeFull = ..;
     let b: core::range::RangeTo<u8> = ..2;
-    let c: core::range::RangeToInclusive<u8> = ..=3;
 
     let _: core::ops::RangeFull = a;
     let _: core::ops::RangeTo<u8> = b;
-    let _: core::ops::RangeToInclusive<u8> = c;
 
     // Changed
     let a: core::range::legacy::RangeFrom<u8> = 1..;
     let b: core::range::legacy::Range<u8> = 2..3;
     let c: core::range::legacy::RangeInclusive<u8> = 4..=5;
+    let d: core::range::legacy::RangeToInclusive<u8> = ..=3;
 
     let a: core::ops::RangeFrom<u8> = a;
     let b: core::ops::Range<u8> = b;
     let c: core::ops::RangeInclusive<u8> = c;
+    let d: core::ops::RangeToInclusive<u8> = d;
 
     let _: core::ops::RangeFrom<u8> = a.into_iter();
     let _: core::ops::Range<u8> = b.into_iter();
diff --git a/tests/ui/new-range/enabled.rs b/tests/ui/new-range/enabled.rs
index a5fb76ad52b..5ddbba492e7 100644
--- a/tests/ui/new-range/enabled.rs
+++ b/tests/ui/new-range/enabled.rs
@@ -7,18 +7,18 @@ fn main() {
     // Unchanged
     let a: core::range::RangeFull = ..;
     let b: core::range::RangeTo<u8> = ..2;
-    let c: core::range::RangeToInclusive<u8> = ..=3;
 
     let _: core::ops::RangeFull = a;
     let _: core::ops::RangeTo<u8> = b;
-    let _: core::ops::RangeToInclusive<u8> = c;
 
     // Changed
     let a: core::range::RangeFrom<u8> = 1..;
     let b: core::range::Range<u8> = 2..3;
     let c: core::range::RangeInclusive<u8> = 4..=5;
+    let d: core::range::RangeToInclusive<u8> = ..=3;
 
     let _: core::range::IterRangeFrom<u8> = a.into_iter();
     let _: core::range::IterRange<u8> = b.into_iter();
     let _: core::range::IterRangeInclusive<u8> = c.into_iter();
+    // RangeToInclusive has no Iterator implementation
 }
diff --git a/tests/ui/range/issue-54505-no-literals.stderr b/tests/ui/range/issue-54505-no-literals.stderr
index c6d4384bcd3..62e2fe4a838 100644
--- a/tests/ui/range/issue-54505-no-literals.stderr
+++ b/tests/ui/range/issue-54505-no-literals.stderr
@@ -207,7 +207,7 @@ LL |     take_range(std::ops::RangeToInclusive { end: 5 });
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
+                 found struct `std::ops::RangeToInclusive<{integer}>`
 note: function defined here
   --> $DIR/issue-54505-no-literals.rs:12:4
    |
@@ -227,7 +227,7 @@ LL |     take_range(::std::ops::RangeToInclusive { end: 5 });
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
+                 found struct `std::ops::RangeToInclusive<{integer}>`
 note: function defined here
   --> $DIR/issue-54505-no-literals.rs:12:4
    |
diff --git a/tests/ui/range/issue-54505-no-std.stderr b/tests/ui/range/issue-54505-no-std.stderr
index 2aa1d584046..866a82afb7e 100644
--- a/tests/ui/range/issue-54505-no-std.stderr
+++ b/tests/ui/range/issue-54505-no-std.stderr
@@ -112,7 +112,7 @@ LL |     take_range(..=42);
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
+                 found struct `core::ops::RangeToInclusive<{integer}>`
 note: function defined here
   --> $DIR/issue-54505-no-std.rs:25:4
    |
diff --git a/tests/ui/range/issue-54505.stderr b/tests/ui/range/issue-54505.stderr
index 8b669b2910f..4d94c6c2d09 100644
--- a/tests/ui/range/issue-54505.stderr
+++ b/tests/ui/range/issue-54505.stderr
@@ -112,7 +112,7 @@ LL |     take_range(..=42);
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
+                 found struct `std::ops::RangeToInclusive<{integer}>`
 note: function defined here
   --> $DIR/issue-54505.rs:10:4
    |