about summary refs log tree commit diff
path: root/src/test/ui/range
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/range
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/range')
-rw-r--r--src/test/ui/range/exclusive-range-patterns-2021.rs14
-rw-r--r--src/test/ui/range/exclusive-range-patterns-2021.stderr27
-rw-r--r--src/test/ui/range/issue-54505-no-literals.fixed75
-rw-r--r--src/test/ui/range/issue-54505-no-literals.rs75
-rw-r--r--src/test/ui/range/issue-54505-no-literals.stderr219
-rw-r--r--src/test/ui/range/issue-54505-no-std.rs58
-rw-r--r--src/test/ui/range/issue-54505-no-std.stderr123
-rw-r--r--src/test/ui/range/issue-54505.fixed43
-rw-r--r--src/test/ui/range/issue-54505.rs43
-rw-r--r--src/test/ui/range/issue-54505.stderr111
-rw-r--r--src/test/ui/range/issue-73553-misinterp-range-literal.rs16
-rw-r--r--src/test/ui/range/issue-73553-misinterp-range-literal.stderr39
-rw-r--r--src/test/ui/range/range-1.rs16
-rw-r--r--src/test/ui/range/range-1.stderr39
-rw-r--r--src/test/ui/range/range-inclusive-pattern-precedence.fixed21
-rw-r--r--src/test/ui/range/range-inclusive-pattern-precedence.rs21
-rw-r--r--src/test/ui/range/range-inclusive-pattern-precedence.stderr22
-rw-r--r--src/test/ui/range/range-inclusive-pattern-precedence2.rs20
-rw-r--r--src/test/ui/range/range-inclusive-pattern-precedence2.stderr22
-rw-r--r--src/test/ui/range/range_traits-1.rs25
-rw-r--r--src/test/ui/range/range_traits-1.stderr141
-rw-r--r--src/test/ui/range/range_traits-2.rs6
-rw-r--r--src/test/ui/range/range_traits-2.stderr13
-rw-r--r--src/test/ui/range/range_traits-3.rs6
-rw-r--r--src/test/ui/range/range_traits-3.stderr13
-rw-r--r--src/test/ui/range/range_traits-4.rs9
-rw-r--r--src/test/ui/range/range_traits-5.rs9
-rw-r--r--src/test/ui/range/range_traits-6.rs6
-rw-r--r--src/test/ui/range/range_traits-6.stderr13
-rw-r--r--src/test/ui/range/range_traits-7.rs9
30 files changed, 0 insertions, 1254 deletions
diff --git a/src/test/ui/range/exclusive-range-patterns-2021.rs b/src/test/ui/range/exclusive-range-patterns-2021.rs
deleted file mode 100644
index de69c9bf2f3..00000000000
--- a/src/test/ui/range/exclusive-range-patterns-2021.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// edition:2021
-
-fn main() {
-    let n = 2;
-    match n {
-        0...3 => {}
-        //~^ ERROR `...` range patterns are deprecated
-        4...10 => {}
-        //~^ ERROR `...` range patterns are deprecated
-        (11...100) => {}
-        //~^ ERROR `...` range patterns are deprecated
-        _ => {}
-    }
-}
diff --git a/src/test/ui/range/exclusive-range-patterns-2021.stderr b/src/test/ui/range/exclusive-range-patterns-2021.stderr
deleted file mode 100644
index a967437041a..00000000000
--- a/src/test/ui/range/exclusive-range-patterns-2021.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0783]: `...` range patterns are deprecated
-  --> $DIR/exclusive-range-patterns-2021.rs:6:9
-   |
-LL |         0...3 => {}
-   |         ^---^
-   |          |
-   |          help: use `..=` for an inclusive range
-
-error[E0783]: `...` range patterns are deprecated
-  --> $DIR/exclusive-range-patterns-2021.rs:8:9
-   |
-LL |         4...10 => {}
-   |         ^---^^
-   |          |
-   |          help: use `..=` for an inclusive range
-
-error[E0783]: `...` range patterns are deprecated
-  --> $DIR/exclusive-range-patterns-2021.rs:10:10
-   |
-LL |         (11...100) => {}
-   |          ^^---^^^
-   |            |
-   |            help: use `..=` for an inclusive range
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0783`.
diff --git a/src/test/ui/range/issue-54505-no-literals.fixed b/src/test/ui/range/issue-54505-no-literals.fixed
deleted file mode 100644
index 4d8f67182b9..00000000000
--- a/src/test/ui/range/issue-54505-no-literals.fixed
+++ /dev/null
@@ -1,75 +0,0 @@
-// run-rustfix
-
-// Regression test for changes introduced while fixing #54505
-
-// This test uses non-literals for Ranges
-// (expecting no parens with borrow suggestion)
-
-use std::ops::RangeBounds;
-
-
-// take a reference to any built-in range
-fn take_range(_r: &impl RangeBounds<i8>) {}
-
-
-fn main() {
-    take_range(&std::ops::Range { start: 0, end: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::Range { start: 0, end: 1 }
-
-    take_range(&::std::ops::Range { start: 0, end: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::Range { start: 0, end: 1 }
-
-    take_range(&std::ops::RangeFrom { start: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFrom { start: 1 }
-
-    take_range(&::std::ops::RangeFrom { start: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFrom { start: 1 }
-
-    take_range(&std::ops::RangeFull {});
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFull {}
-
-    take_range(&::std::ops::RangeFull {});
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFull {}
-
-    take_range(&std::ops::RangeInclusive::new(0, 1));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeInclusive::new(0, 1)
-
-    take_range(&::std::ops::RangeInclusive::new(0, 1));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeInclusive::new(0, 1)
-
-    take_range(&std::ops::RangeTo { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeTo { end: 5 }
-
-    take_range(&::std::ops::RangeTo { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeTo { end: 5 }
-
-    take_range(&std::ops::RangeToInclusive { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeToInclusive { end: 5 }
-
-    take_range(&::std::ops::RangeToInclusive { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeToInclusive { end: 5 }
-}
diff --git a/src/test/ui/range/issue-54505-no-literals.rs b/src/test/ui/range/issue-54505-no-literals.rs
deleted file mode 100644
index dc21dcbc2db..00000000000
--- a/src/test/ui/range/issue-54505-no-literals.rs
+++ /dev/null
@@ -1,75 +0,0 @@
-// run-rustfix
-
-// Regression test for changes introduced while fixing #54505
-
-// This test uses non-literals for Ranges
-// (expecting no parens with borrow suggestion)
-
-use std::ops::RangeBounds;
-
-
-// take a reference to any built-in range
-fn take_range(_r: &impl RangeBounds<i8>) {}
-
-
-fn main() {
-    take_range(std::ops::Range { start: 0, end: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::Range { start: 0, end: 1 }
-
-    take_range(::std::ops::Range { start: 0, end: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::Range { start: 0, end: 1 }
-
-    take_range(std::ops::RangeFrom { start: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFrom { start: 1 }
-
-    take_range(::std::ops::RangeFrom { start: 1 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFrom { start: 1 }
-
-    take_range(std::ops::RangeFull {});
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFull {}
-
-    take_range(::std::ops::RangeFull {});
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFull {}
-
-    take_range(std::ops::RangeInclusive::new(0, 1));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeInclusive::new(0, 1)
-
-    take_range(::std::ops::RangeInclusive::new(0, 1));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeInclusive::new(0, 1)
-
-    take_range(std::ops::RangeTo { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeTo { end: 5 }
-
-    take_range(::std::ops::RangeTo { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeTo { end: 5 }
-
-    take_range(std::ops::RangeToInclusive { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeToInclusive { end: 5 }
-
-    take_range(::std::ops::RangeToInclusive { end: 5 });
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeToInclusive { end: 5 }
-}
diff --git a/src/test/ui/range/issue-54505-no-literals.stderr b/src/test/ui/range/issue-54505-no-literals.stderr
deleted file mode 100644
index 070dc844563..00000000000
--- a/src/test/ui/range/issue-54505-no-literals.stderr
+++ /dev/null
@@ -1,219 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:16:16
-   |
-LL |     take_range(std::ops::Range { start: 0, end: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `Range`
-   |     |          help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `std::ops::Range<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:21:16
-   |
-LL |     take_range(::std::ops::Range { start: 0, end: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `Range`
-   |     |          help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `std::ops::Range<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:26:16
-   |
-LL |     take_range(std::ops::RangeFrom { start: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFrom`
-   |     |          help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFrom<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:31:16
-   |
-LL |     take_range(::std::ops::RangeFrom { start: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFrom`
-   |     |          help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFrom<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:36:16
-   |
-LL |     take_range(std::ops::RangeFull {});
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFull`
-   |     |          help: consider borrowing here: `&std::ops::RangeFull {}`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFull`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:41:16
-   |
-LL |     take_range(::std::ops::RangeFull {});
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFull`
-   |     |          help: consider borrowing here: `&::std::ops::RangeFull {}`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFull`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:46:16
-   |
-LL |     take_range(std::ops::RangeInclusive::new(0, 1));
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeInclusive`
-   |     |          help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:51:16
-   |
-LL |     take_range(::std::ops::RangeInclusive::new(0, 1));
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeInclusive`
-   |     |          help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:56:16
-   |
-LL |     take_range(std::ops::RangeTo { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeTo`
-   |     |          help: consider borrowing here: `&std::ops::RangeTo { end: 5 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeTo<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:61:16
-   |
-LL |     take_range(::std::ops::RangeTo { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeTo`
-   |     |          help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeTo<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:66:16
-   |
-LL |     take_range(std::ops::RangeToInclusive { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeToInclusive`
-   |     |          help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-literals.rs:71:16
-   |
-LL |     take_range(::std::ops::RangeToInclusive { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeToInclusive`
-   |     |          help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-literals.rs:12:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error: aborting due to 12 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/range/issue-54505-no-std.rs b/src/test/ui/range/issue-54505-no-std.rs
deleted file mode 100644
index 9f378b4836e..00000000000
--- a/src/test/ui/range/issue-54505-no-std.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-// Regression test for #54505 - range borrowing suggestion had
-// incorrect syntax (missing parentheses).
-
-// This test doesn't use std
-// (so all Ranges resolve to core::ops::Range...)
-
-#![no_std]
-#![feature(lang_items)]
-
-use core::ops::RangeBounds;
-
-#[cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))]
-#[lang = "eh_personality"]
-extern "C" fn eh_personality() {}
-#[cfg(target_os = "emscripten")]
-#[lang = "eh_catch_typeinfo"]
-static EH_CATCH_TYPEINFO: u8 = 0;
-
-#[panic_handler]
-fn panic_handler() {}
-//~^ ERROR return type should be `!`
-//~| ERROR function should have one argument
-
-// take a reference to any built-in range
-fn take_range(_r: &impl RangeBounds<i8>) {}
-
-
-fn main() {
-    take_range(0..1);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..1)
-
-    take_range(1..);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(1..)
-
-    take_range(..);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..)
-
-    take_range(0..=1);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..=1)
-
-    take_range(..5);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..5)
-
-    take_range(..=42);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..=42)
-}
diff --git a/src/test/ui/range/issue-54505-no-std.stderr b/src/test/ui/range/issue-54505-no-std.stderr
deleted file mode 100644
index 9fb0e54a8a9..00000000000
--- a/src/test/ui/range/issue-54505-no-std.stderr
+++ /dev/null
@@ -1,123 +0,0 @@
-error: return type should be `!`
-  --> $DIR/issue-54505-no-std.rs:20:20
-   |
-LL | fn panic_handler() {}
-   |                    ^
-
-error: function should have one argument
-  --> $DIR/issue-54505-no-std.rs:20:1
-   |
-LL | fn panic_handler() {}
-   | ^^^^^^^^^^^^^^^^^^
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:29:16
-   |
-LL |     take_range(0..1);
-   |     ---------- ^^^^
-   |     |          |
-   |     |          expected reference, found struct `Range`
-   |     |          help: consider borrowing here: `&(0..1)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `Range<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-std.rs:25:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:34:16
-   |
-LL |     take_range(1..);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFrom`
-   |     |          help: consider borrowing here: `&(1..)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFrom<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-std.rs:25:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:39:16
-   |
-LL |     take_range(..);
-   |     ---------- ^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFull`
-   |     |          help: consider borrowing here: `&(..)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFull`
-note: function defined here
-  --> $DIR/issue-54505-no-std.rs:25:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:44:16
-   |
-LL |     take_range(0..=1);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeInclusive`
-   |     |          help: consider borrowing here: `&(0..=1)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-std.rs:25:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:49:16
-   |
-LL |     take_range(..5);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeTo`
-   |     |          help: consider borrowing here: `&(..5)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeTo<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-std.rs:25:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505-no-std.rs:54:16
-   |
-LL |     take_range(..=42);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeToInclusive`
-   |     |          help: consider borrowing here: `&(..=42)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505-no-std.rs:25:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/range/issue-54505.fixed b/src/test/ui/range/issue-54505.fixed
deleted file mode 100644
index f8298c0b5ce..00000000000
--- a/src/test/ui/range/issue-54505.fixed
+++ /dev/null
@@ -1,43 +0,0 @@
-// run-rustfix
-
-// Regression test for #54505 - range borrowing suggestion had
-// incorrect syntax (missing parentheses).
-
-use std::ops::RangeBounds;
-
-
-// take a reference to any built-in range
-fn take_range(_r: &impl RangeBounds<i8>) {}
-
-
-fn main() {
-    take_range(&(0..1));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..1)
-
-    take_range(&(1..));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(1..)
-
-    take_range(&(..));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..)
-
-    take_range(&(0..=1));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..=1)
-
-    take_range(&(..5));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..5)
-
-    take_range(&(..=42));
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..=42)
-}
diff --git a/src/test/ui/range/issue-54505.rs b/src/test/ui/range/issue-54505.rs
deleted file mode 100644
index 03673252dd3..00000000000
--- a/src/test/ui/range/issue-54505.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-// run-rustfix
-
-// Regression test for #54505 - range borrowing suggestion had
-// incorrect syntax (missing parentheses).
-
-use std::ops::RangeBounds;
-
-
-// take a reference to any built-in range
-fn take_range(_r: &impl RangeBounds<i8>) {}
-
-
-fn main() {
-    take_range(0..1);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..1)
-
-    take_range(1..);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(1..)
-
-    take_range(..);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..)
-
-    take_range(0..=1);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..=1)
-
-    take_range(..5);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..5)
-
-    take_range(..=42);
-    //~^ ERROR mismatched types [E0308]
-    //~| HELP consider borrowing here
-    //~| SUGGESTION &(..=42)
-}
diff --git a/src/test/ui/range/issue-54505.stderr b/src/test/ui/range/issue-54505.stderr
deleted file mode 100644
index 9eec169404c..00000000000
--- a/src/test/ui/range/issue-54505.stderr
+++ /dev/null
@@ -1,111 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:14:16
-   |
-LL |     take_range(0..1);
-   |     ---------- ^^^^
-   |     |          |
-   |     |          expected reference, found struct `Range`
-   |     |          help: consider borrowing here: `&(0..1)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `std::ops::Range<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505.rs:10:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:19:16
-   |
-LL |     take_range(1..);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFrom`
-   |     |          help: consider borrowing here: `&(1..)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFrom<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505.rs:10:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:24:16
-   |
-LL |     take_range(..);
-   |     ---------- ^^
-   |     |          |
-   |     |          expected reference, found struct `RangeFull`
-   |     |          help: consider borrowing here: `&(..)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeFull`
-note: function defined here
-  --> $DIR/issue-54505.rs:10:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:29:16
-   |
-LL |     take_range(0..=1);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeInclusive`
-   |     |          help: consider borrowing here: `&(0..=1)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505.rs:10:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:34:16
-   |
-LL |     take_range(..5);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeTo`
-   |     |          help: consider borrowing here: `&(..5)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeTo<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505.rs:10:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-54505.rs:39:16
-   |
-LL |     take_range(..=42);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected reference, found struct `RangeToInclusive`
-   |     |          help: consider borrowing here: `&(..=42)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&_`
-                 found struct `RangeToInclusive<{integer}>`
-note: function defined here
-  --> $DIR/issue-54505.rs:10:4
-   |
-LL | fn take_range(_r: &impl RangeBounds<i8>) {}
-   |    ^^^^^^^^^^ -------------------------
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/range/issue-73553-misinterp-range-literal.rs b/src/test/ui/range/issue-73553-misinterp-range-literal.rs
deleted file mode 100644
index e65dba0a038..00000000000
--- a/src/test/ui/range/issue-73553-misinterp-range-literal.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-type Range = std::ops::Range<usize>;
-
-fn demo(r: &Range) {
-    println!("{:?}", r);
-}
-
-fn tell(x: usize) -> usize {
-    x
-}
-
-fn main() {
-    demo(tell(1)..tell(10));
-    //~^ ERROR mismatched types
-    demo(1..10);
-    //~^ ERROR mismatched types
-}
diff --git a/src/test/ui/range/issue-73553-misinterp-range-literal.stderr b/src/test/ui/range/issue-73553-misinterp-range-literal.stderr
deleted file mode 100644
index d08d9b1345d..00000000000
--- a/src/test/ui/range/issue-73553-misinterp-range-literal.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/issue-73553-misinterp-range-literal.rs:12:10
-   |
-LL |     demo(tell(1)..tell(10));
-   |     ---- ^^^^^^^^^^^^^^^^^
-   |     |    |
-   |     |    expected `&Range<usize>`, found struct `Range`
-   |     |    help: consider borrowing here: `&(tell(1)..tell(10))`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&std::ops::Range<usize>`
-                 found struct `std::ops::Range<usize>`
-note: function defined here
-  --> $DIR/issue-73553-misinterp-range-literal.rs:3:4
-   |
-LL | fn demo(r: &Range) {
-   |    ^^^^ ---------
-
-error[E0308]: mismatched types
-  --> $DIR/issue-73553-misinterp-range-literal.rs:14:10
-   |
-LL |     demo(1..10);
-   |     ---- ^^^^^
-   |     |    |
-   |     |    expected `&Range<usize>`, found struct `Range`
-   |     |    help: consider borrowing here: `&(1..10)`
-   |     arguments to this function are incorrect
-   |
-   = note: expected reference `&std::ops::Range<usize>`
-                 found struct `std::ops::Range<{integer}>`
-note: function defined here
-  --> $DIR/issue-73553-misinterp-range-literal.rs:3:4
-   |
-LL | fn demo(r: &Range) {
-   |    ^^^^ ---------
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/range/range-1.rs b/src/test/ui/range/range-1.rs
deleted file mode 100644
index 192426fe228..00000000000
--- a/src/test/ui/range/range-1.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Test range syntax - type errors.
-
-pub fn main() {
-    // Mixed types.
-    let _ = 0u32..10i32;
-    //~^ ERROR mismatched types
-
-    // Bool => does not implement iterator.
-    for i in false..true {}
-    //~^ ERROR `bool: Step` is not satisfied
-
-    // Unsized type.
-    let arr: &[_] = &[1, 2, 3];
-    let range = *arr..;
-    //~^ ERROR the size for values of type
-}
diff --git a/src/test/ui/range/range-1.stderr b/src/test/ui/range/range-1.stderr
deleted file mode 100644
index 3956390368f..00000000000
--- a/src/test/ui/range/range-1.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/range-1.rs:5:19
-   |
-LL |     let _ = 0u32..10i32;
-   |                   ^^^^^ expected `u32`, found `i32`
-
-error[E0277]: the trait bound `bool: Step` is not satisfied
-  --> $DIR/range-1.rs:9:14
-   |
-LL |     for i in false..true {}
-   |              ^^^^^^^^^^^ the trait `Step` is not implemented for `bool`
-   |
-   = help: the following other types implement trait `Step`:
-             char
-             i128
-             i16
-             i32
-             i64
-             i8
-             isize
-             u128
-           and 5 others
-   = note: required for `std::ops::Range<bool>` to implement `Iterator`
-   = note: required for `std::ops::Range<bool>` to implement `IntoIterator`
-
-error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time
-  --> $DIR/range-1.rs:14:17
-   |
-LL |     let range = *arr..;
-   |                 ^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `[{integer}]`
-note: required by a bound in `RangeFrom`
-  --> $SRC_DIR/core/src/ops/range.rs:LL:COL
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0277, E0308.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.fixed b/src/test/ui/range/range-inclusive-pattern-precedence.fixed
deleted file mode 100644
index 38104bab7c8..00000000000
--- a/src/test/ui/range/range-inclusive-pattern-precedence.fixed
+++ /dev/null
@@ -1,21 +0,0 @@
-// In expression, `&a..=b` is treated as `(&a)..=(b)` and `box a..=b` is
-// `(box a)..=(b)`. In a pattern, however, `&a..=b` means `&(a..=b)`. This may
-// lead to confusion.
-
-// run-rustfix
-
-#![warn(ellipsis_inclusive_range_patterns)]
-
-pub fn main() {
-    match &12 {
-        &(0..=9) => {}
-        //~^ WARN `...` range patterns are deprecated
-        //~| WARN this is accepted in the current edition
-        //~| HELP use `..=` for an inclusive range
-        &(10..=15) => {}
-        //~^ ERROR the range pattern here has ambiguous interpretation
-        //~| HELP add parentheses to clarify the precedence
-        &(16..=20) => {}
-        _ => {}
-    }
-}
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.rs b/src/test/ui/range/range-inclusive-pattern-precedence.rs
deleted file mode 100644
index b294e436fa6..00000000000
--- a/src/test/ui/range/range-inclusive-pattern-precedence.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// In expression, `&a..=b` is treated as `(&a)..=(b)` and `box a..=b` is
-// `(box a)..=(b)`. In a pattern, however, `&a..=b` means `&(a..=b)`. This may
-// lead to confusion.
-
-// run-rustfix
-
-#![warn(ellipsis_inclusive_range_patterns)]
-
-pub fn main() {
-    match &12 {
-        &0...9 => {}
-        //~^ WARN `...` range patterns are deprecated
-        //~| WARN this is accepted in the current edition
-        //~| HELP use `..=` for an inclusive range
-        &10..=15 => {}
-        //~^ ERROR the range pattern here has ambiguous interpretation
-        //~| HELP add parentheses to clarify the precedence
-        &(16..=20) => {}
-        _ => {}
-    }
-}
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.stderr b/src/test/ui/range/range-inclusive-pattern-precedence.stderr
deleted file mode 100644
index f6788d034e6..00000000000
--- a/src/test/ui/range/range-inclusive-pattern-precedence.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error: the range pattern here has ambiguous interpretation
-  --> $DIR/range-inclusive-pattern-precedence.rs:15:10
-   |
-LL |         &10..=15 => {}
-   |          ^^^^^^^ help: add parentheses to clarify the precedence: `(10..=15)`
-
-warning: `...` range patterns are deprecated
-  --> $DIR/range-inclusive-pattern-precedence.rs:11:9
-   |
-LL |         &0...9 => {}
-   |         ^^^^^^ help: use `..=` for an inclusive range: `&(0..=9)`
-   |
-   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
-note: the lint level is defined here
-  --> $DIR/range-inclusive-pattern-precedence.rs:7:9
-   |
-LL | #![warn(ellipsis_inclusive_range_patterns)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence2.rs b/src/test/ui/range/range-inclusive-pattern-precedence2.rs
deleted file mode 100644
index bede9c57976..00000000000
--- a/src/test/ui/range/range-inclusive-pattern-precedence2.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// We are going to disallow `&a..=b` and `box a..=b` in a pattern. However, the
-// older ... syntax is still allowed as a stability guarantee.
-
-#![feature(box_patterns)]
-#![warn(ellipsis_inclusive_range_patterns)]
-
-fn main() {
-    match Box::new(12) {
-        // FIXME: can we add suggestions like `&(0..=9)`?
-        box 0...9 => {}
-        //~^ WARN `...` range patterns are deprecated
-        //~| WARN this is accepted in the current edition
-        //~| HELP use `..=` for an inclusive range
-        box 10..=15 => {}
-        //~^ ERROR the range pattern here has ambiguous interpretation
-        //~^^ HELP add parentheses to clarify the precedence
-        box (16..=20) => {}
-        _ => {}
-    }
-}
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence2.stderr b/src/test/ui/range/range-inclusive-pattern-precedence2.stderr
deleted file mode 100644
index bb4e3a13a5c..00000000000
--- a/src/test/ui/range/range-inclusive-pattern-precedence2.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error: the range pattern here has ambiguous interpretation
-  --> $DIR/range-inclusive-pattern-precedence2.rs:14:13
-   |
-LL |         box 10..=15 => {}
-   |             ^^^^^^^ help: add parentheses to clarify the precedence: `(10..=15)`
-
-warning: `...` range patterns are deprecated
-  --> $DIR/range-inclusive-pattern-precedence2.rs:10:14
-   |
-LL |         box 0...9 => {}
-   |              ^^^ help: use `..=` for an inclusive range
-   |
-   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
-   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
-note: the lint level is defined here
-  --> $DIR/range-inclusive-pattern-precedence2.rs:5:9
-   |
-LL | #![warn(ellipsis_inclusive_range_patterns)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/src/test/ui/range/range_traits-1.rs b/src/test/ui/range/range_traits-1.rs
deleted file mode 100644
index e28e47435c2..00000000000
--- a/src/test/ui/range/range_traits-1.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-use std::ops::*;
-
-#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-struct AllTheRanges {
-    a: Range<usize>,
-    //~^ ERROR can't compare
-    //~| ERROR Ord
-    b: RangeTo<usize>,
-    //~^ ERROR can't compare
-    //~| ERROR Ord
-    c: RangeFrom<usize>,
-    //~^ ERROR can't compare
-    //~| ERROR Ord
-    d: RangeFull,
-    //~^ ERROR can't compare
-    //~| ERROR Ord
-    e: RangeInclusive<usize>,
-    //~^ ERROR can't compare
-    //~| ERROR Ord
-    f: RangeToInclusive<usize>,
-    //~^ ERROR can't compare
-    //~| ERROR Ord
-}
-
-fn main() {}
diff --git a/src/test/ui/range/range_traits-1.stderr b/src/test/ui/range/range_traits-1.stderr
deleted file mode 100644
index 617afc99530..00000000000
--- a/src/test/ui/range/range_traits-1.stderr
+++ /dev/null
@@ -1,141 +0,0 @@
-error[E0277]: can't compare `std::ops::Range<usize>` with `std::ops::Range<usize>`
-  --> $DIR/range_traits-1.rs:5:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                ---------- in this derive macro expansion
-LL | struct AllTheRanges {
-LL |     a: Range<usize>,
-   |     ^^^^^^^^^^^^^^^ no implementation for `std::ops::Range<usize> < std::ops::Range<usize>` and `std::ops::Range<usize> > std::ops::Range<usize>`
-   |
-   = help: the trait `PartialOrd` is not implemented for `std::ops::Range<usize>`
-   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't compare `std::ops::RangeTo<usize>` with `std::ops::RangeTo<usize>`
-  --> $DIR/range_traits-1.rs:8:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                ---------- in this derive macro expansion
-...
-LL |     b: RangeTo<usize>,
-   |     ^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeTo<usize> < std::ops::RangeTo<usize>` and `std::ops::RangeTo<usize> > std::ops::RangeTo<usize>`
-   |
-   = help: the trait `PartialOrd` is not implemented for `std::ops::RangeTo<usize>`
-   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't compare `std::ops::RangeFrom<usize>` with `std::ops::RangeFrom<usize>`
-  --> $DIR/range_traits-1.rs:11:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                ---------- in this derive macro expansion
-...
-LL |     c: RangeFrom<usize>,
-   |     ^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeFrom<usize> < std::ops::RangeFrom<usize>` and `std::ops::RangeFrom<usize> > std::ops::RangeFrom<usize>`
-   |
-   = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFrom<usize>`
-   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull`
-  --> $DIR/range_traits-1.rs:14:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                ---------- in this derive macro expansion
-...
-LL |     d: RangeFull,
-   |     ^^^^^^^^^^^^ no implementation for `std::ops::RangeFull < std::ops::RangeFull` and `std::ops::RangeFull > std::ops::RangeFull`
-   |
-   = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFull`
-   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't compare `std::ops::RangeInclusive<usize>` with `std::ops::RangeInclusive<usize>`
-  --> $DIR/range_traits-1.rs:17:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                ---------- in this derive macro expansion
-...
-LL |     e: RangeInclusive<usize>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeInclusive<usize> < std::ops::RangeInclusive<usize>` and `std::ops::RangeInclusive<usize> > std::ops::RangeInclusive<usize>`
-   |
-   = help: the trait `PartialOrd` is not implemented for `std::ops::RangeInclusive<usize>`
-   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't compare `std::ops::RangeToInclusive<usize>` with `std::ops::RangeToInclusive<usize>`
-  --> $DIR/range_traits-1.rs:20:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                ---------- in this derive macro expansion
-...
-LL |     f: RangeToInclusive<usize>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeToInclusive<usize> < std::ops::RangeToInclusive<usize>` and `std::ops::RangeToInclusive<usize> > std::ops::RangeToInclusive<usize>`
-   |
-   = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive<usize>`
-   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `std::ops::Range<usize>: Ord` is not satisfied
-  --> $DIR/range_traits-1.rs:5:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                            --- in this derive macro expansion
-LL | struct AllTheRanges {
-LL |     a: Range<usize>,
-   |     ^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::Range<usize>`
-   |
-   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `std::ops::RangeTo<usize>: Ord` is not satisfied
-  --> $DIR/range_traits-1.rs:8:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                            --- in this derive macro expansion
-...
-LL |     b: RangeTo<usize>,
-   |     ^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeTo<usize>`
-   |
-   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `std::ops::RangeFrom<usize>: Ord` is not satisfied
-  --> $DIR/range_traits-1.rs:11:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                            --- in this derive macro expansion
-...
-LL |     c: RangeFrom<usize>,
-   |     ^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeFrom<usize>`
-   |
-   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `std::ops::RangeFull: Ord` is not satisfied
-  --> $DIR/range_traits-1.rs:14:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                            --- in this derive macro expansion
-...
-LL |     d: RangeFull,
-   |     ^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeFull`
-   |
-   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `std::ops::RangeInclusive<usize>: Ord` is not satisfied
-  --> $DIR/range_traits-1.rs:17:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                            --- in this derive macro expansion
-...
-LL |     e: RangeInclusive<usize>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeInclusive<usize>`
-   |
-   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `std::ops::RangeToInclusive<usize>: Ord` is not satisfied
-  --> $DIR/range_traits-1.rs:20:5
-   |
-LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-   |                                            --- in this derive macro expansion
-...
-LL |     f: RangeToInclusive<usize>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeToInclusive<usize>`
-   |
-   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 12 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/range/range_traits-2.rs b/src/test/ui/range/range_traits-2.rs
deleted file mode 100644
index 234d7a64dc8..00000000000
--- a/src/test/ui/range/range_traits-2.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-use std::ops::*;
-
-#[derive(Copy, Clone)] //~ ERROR Copy
-struct R(Range<usize>);
-
-fn main() {}
diff --git a/src/test/ui/range/range_traits-2.stderr b/src/test/ui/range/range_traits-2.stderr
deleted file mode 100644
index 61facba535b..00000000000
--- a/src/test/ui/range/range_traits-2.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0204]: the trait `Copy` may not be implemented for this type
-  --> $DIR/range_traits-2.rs:3:10
-   |
-LL | #[derive(Copy, Clone)]
-   |          ^^^^
-LL | struct R(Range<usize>);
-   |          ------------ this field does not implement `Copy`
-   |
-   = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0204`.
diff --git a/src/test/ui/range/range_traits-3.rs b/src/test/ui/range/range_traits-3.rs
deleted file mode 100644
index 2d597cce5ad..00000000000
--- a/src/test/ui/range/range_traits-3.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-use std::ops::*;
-
-#[derive(Copy, Clone)] //~ ERROR Copy
-struct R(RangeFrom<usize>);
-
-fn main() {}
diff --git a/src/test/ui/range/range_traits-3.stderr b/src/test/ui/range/range_traits-3.stderr
deleted file mode 100644
index e54d17b329e..00000000000
--- a/src/test/ui/range/range_traits-3.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0204]: the trait `Copy` may not be implemented for this type
-  --> $DIR/range_traits-3.rs:3:10
-   |
-LL | #[derive(Copy, Clone)]
-   |          ^^^^
-LL | struct R(RangeFrom<usize>);
-   |          ---------------- this field does not implement `Copy`
-   |
-   = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0204`.
diff --git a/src/test/ui/range/range_traits-4.rs b/src/test/ui/range/range_traits-4.rs
deleted file mode 100644
index b8e88559b15..00000000000
--- a/src/test/ui/range/range_traits-4.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-
-use std::ops::*;
-
-#[derive(Copy, Clone)]
-struct R(RangeTo<usize>);
-
-
-fn main() {}
diff --git a/src/test/ui/range/range_traits-5.rs b/src/test/ui/range/range_traits-5.rs
deleted file mode 100644
index 4aec7a4159a..00000000000
--- a/src/test/ui/range/range_traits-5.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-
-use std::ops::*;
-
-#[derive(Copy, Clone)]
-struct R(RangeFull);
-
-
-fn main() {}
diff --git a/src/test/ui/range/range_traits-6.rs b/src/test/ui/range/range_traits-6.rs
deleted file mode 100644
index bce106bbfe7..00000000000
--- a/src/test/ui/range/range_traits-6.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-use std::ops::*;
-
-#[derive(Copy, Clone)] //~ ERROR Copy
-struct R(RangeInclusive<usize>);
-
-fn main() {}
diff --git a/src/test/ui/range/range_traits-6.stderr b/src/test/ui/range/range_traits-6.stderr
deleted file mode 100644
index addc525f1fa..00000000000
--- a/src/test/ui/range/range_traits-6.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0204]: the trait `Copy` may not be implemented for this type
-  --> $DIR/range_traits-6.rs:3:10
-   |
-LL | #[derive(Copy, Clone)]
-   |          ^^^^
-LL | struct R(RangeInclusive<usize>);
-   |          --------------------- this field does not implement `Copy`
-   |
-   = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0204`.
diff --git a/src/test/ui/range/range_traits-7.rs b/src/test/ui/range/range_traits-7.rs
deleted file mode 100644
index c7b310562d1..00000000000
--- a/src/test/ui/range/range_traits-7.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-
-use std::ops::*;
-
-#[derive(Copy, Clone)]
-struct R(RangeToInclusive<usize>);
-
-
-fn main() {}