summaryrefslogtreecommitdiffstats
path: root/tests/ui/range
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/range/exclusive-range-patterns-2021.rs (renamed from src/test/ui/range/exclusive-range-patterns-2021.rs)0
-rw-r--r--tests/ui/range/exclusive-range-patterns-2021.stderr (renamed from src/test/ui/range/exclusive-range-patterns-2021.stderr)0
-rw-r--r--tests/ui/range/issue-54505-no-literals.fixed (renamed from src/test/ui/range/issue-54505-no-literals.fixed)0
-rw-r--r--tests/ui/range/issue-54505-no-literals.rs (renamed from src/test/ui/range/issue-54505-no-literals.rs)0
-rw-r--r--tests/ui/range/issue-54505-no-literals.stderr (renamed from src/test/ui/range/issue-54505-no-literals.stderr)4
-rw-r--r--tests/ui/range/issue-54505-no-std.rs (renamed from src/test/ui/range/issue-54505-no-std.rs)0
-rw-r--r--tests/ui/range/issue-54505-no-std.stderr (renamed from src/test/ui/range/issue-54505-no-std.stderr)0
-rw-r--r--tests/ui/range/issue-54505.fixed (renamed from src/test/ui/range/issue-54505.fixed)0
-rw-r--r--tests/ui/range/issue-54505.rs (renamed from src/test/ui/range/issue-54505.rs)0
-rw-r--r--tests/ui/range/issue-54505.stderr (renamed from src/test/ui/range/issue-54505.stderr)2
-rw-r--r--tests/ui/range/issue-73553-misinterp-range-literal.rs (renamed from src/test/ui/range/issue-73553-misinterp-range-literal.rs)0
-rw-r--r--tests/ui/range/issue-73553-misinterp-range-literal.stderr (renamed from src/test/ui/range/issue-73553-misinterp-range-literal.stderr)4
-rw-r--r--tests/ui/range/range-1.rs (renamed from src/test/ui/range/range-1.rs)0
-rw-r--r--tests/ui/range/range-1.stderr (renamed from src/test/ui/range/range-1.stderr)3
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence.fixed (renamed from src/test/ui/range/range-inclusive-pattern-precedence.fixed)0
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence.rs (renamed from src/test/ui/range/range-inclusive-pattern-precedence.rs)0
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence.stderr (renamed from src/test/ui/range/range-inclusive-pattern-precedence.stderr)0
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence2.rs (renamed from src/test/ui/range/range-inclusive-pattern-precedence2.rs)0
-rw-r--r--tests/ui/range/range-inclusive-pattern-precedence2.stderr (renamed from src/test/ui/range/range-inclusive-pattern-precedence2.stderr)0
-rw-r--r--tests/ui/range/range-pattern-out-of-bounds-issue-68972.rs13
-rw-r--r--tests/ui/range/range-pattern-out-of-bounds-issue-68972.stderr26
-rw-r--r--tests/ui/range/range_traits-1.rs (renamed from src/test/ui/range/range_traits-1.rs)0
-rw-r--r--tests/ui/range/range_traits-1.stderr (renamed from src/test/ui/range/range_traits-1.stderr)0
-rw-r--r--tests/ui/range/range_traits-2.rs (renamed from src/test/ui/range/range_traits-2.rs)0
-rw-r--r--tests/ui/range/range_traits-2.stderr (renamed from src/test/ui/range/range_traits-2.stderr)0
-rw-r--r--tests/ui/range/range_traits-3.rs (renamed from src/test/ui/range/range_traits-3.rs)0
-rw-r--r--tests/ui/range/range_traits-3.stderr (renamed from src/test/ui/range/range_traits-3.stderr)0
-rw-r--r--tests/ui/range/range_traits-4.rs (renamed from src/test/ui/range/range_traits-4.rs)0
-rw-r--r--tests/ui/range/range_traits-5.rs (renamed from src/test/ui/range/range_traits-5.rs)0
-rw-r--r--tests/ui/range/range_traits-6.rs (renamed from src/test/ui/range/range_traits-6.rs)0
-rw-r--r--tests/ui/range/range_traits-6.stderr (renamed from src/test/ui/range/range_traits-6.stderr)0
-rw-r--r--tests/ui/range/range_traits-7.rs (renamed from src/test/ui/range/range_traits-7.rs)0
-rw-r--r--tests/ui/range_inclusive.rs (renamed from src/test/ui/range_inclusive.rs)0
33 files changed, 44 insertions, 8 deletions
diff --git a/src/test/ui/range/exclusive-range-patterns-2021.rs b/tests/ui/range/exclusive-range-patterns-2021.rs
index de69c9bf2..de69c9bf2 100644
--- a/src/test/ui/range/exclusive-range-patterns-2021.rs
+++ b/tests/ui/range/exclusive-range-patterns-2021.rs
diff --git a/src/test/ui/range/exclusive-range-patterns-2021.stderr b/tests/ui/range/exclusive-range-patterns-2021.stderr
index a96743704..a96743704 100644
--- a/src/test/ui/range/exclusive-range-patterns-2021.stderr
+++ b/tests/ui/range/exclusive-range-patterns-2021.stderr
diff --git a/src/test/ui/range/issue-54505-no-literals.fixed b/tests/ui/range/issue-54505-no-literals.fixed
index 4d8f67182..4d8f67182 100644
--- a/src/test/ui/range/issue-54505-no-literals.fixed
+++ b/tests/ui/range/issue-54505-no-literals.fixed
diff --git a/src/test/ui/range/issue-54505-no-literals.rs b/tests/ui/range/issue-54505-no-literals.rs
index dc21dcbc2..dc21dcbc2 100644
--- a/src/test/ui/range/issue-54505-no-literals.rs
+++ b/tests/ui/range/issue-54505-no-literals.rs
diff --git a/src/test/ui/range/issue-54505-no-literals.stderr b/tests/ui/range/issue-54505-no-literals.stderr
index 4cbf8869d..070dc8445 100644
--- a/src/test/ui/range/issue-54505-no-literals.stderr
+++ b/tests/ui/range/issue-54505-no-literals.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | take_range(std::ops::Range { start: 0, end: 1 });
| ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
- | | expected reference, found struct `std::ops::Range`
+ | | expected reference, found struct `Range`
| | help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }`
| arguments to this function are incorrect
|
@@ -22,7 +22,7 @@ error[E0308]: mismatched types
LL | take_range(::std::ops::Range { start: 0, end: 1 });
| ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
- | | expected reference, found struct `std::ops::Range`
+ | | expected reference, found struct `Range`
| | help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }`
| arguments to this function are incorrect
|
diff --git a/src/test/ui/range/issue-54505-no-std.rs b/tests/ui/range/issue-54505-no-std.rs
index 9f378b483..9f378b483 100644
--- a/src/test/ui/range/issue-54505-no-std.rs
+++ b/tests/ui/range/issue-54505-no-std.rs
diff --git a/src/test/ui/range/issue-54505-no-std.stderr b/tests/ui/range/issue-54505-no-std.stderr
index 9fb0e54a8..9fb0e54a8 100644
--- a/src/test/ui/range/issue-54505-no-std.stderr
+++ b/tests/ui/range/issue-54505-no-std.stderr
diff --git a/src/test/ui/range/issue-54505.fixed b/tests/ui/range/issue-54505.fixed
index f8298c0b5..f8298c0b5 100644
--- a/src/test/ui/range/issue-54505.fixed
+++ b/tests/ui/range/issue-54505.fixed
diff --git a/src/test/ui/range/issue-54505.rs b/tests/ui/range/issue-54505.rs
index 03673252d..03673252d 100644
--- a/src/test/ui/range/issue-54505.rs
+++ b/tests/ui/range/issue-54505.rs
diff --git a/src/test/ui/range/issue-54505.stderr b/tests/ui/range/issue-54505.stderr
index 38df6e144..9eec16940 100644
--- a/src/test/ui/range/issue-54505.stderr
+++ b/tests/ui/range/issue-54505.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | take_range(0..1);
| ---------- ^^^^
| | |
- | | expected reference, found struct `std::ops::Range`
+ | | expected reference, found struct `Range`
| | help: consider borrowing here: `&(0..1)`
| arguments to this function are incorrect
|
diff --git a/src/test/ui/range/issue-73553-misinterp-range-literal.rs b/tests/ui/range/issue-73553-misinterp-range-literal.rs
index e65dba0a0..e65dba0a0 100644
--- a/src/test/ui/range/issue-73553-misinterp-range-literal.rs
+++ b/tests/ui/range/issue-73553-misinterp-range-literal.rs
diff --git a/src/test/ui/range/issue-73553-misinterp-range-literal.stderr b/tests/ui/range/issue-73553-misinterp-range-literal.stderr
index 6badd998f..d08d9b134 100644
--- a/src/test/ui/range/issue-73553-misinterp-range-literal.stderr
+++ b/tests/ui/range/issue-73553-misinterp-range-literal.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | demo(tell(1)..tell(10));
| ---- ^^^^^^^^^^^^^^^^^
| | |
- | | expected reference, found struct `std::ops::Range`
+ | | expected `&Range<usize>`, found struct `Range`
| | help: consider borrowing here: `&(tell(1)..tell(10))`
| arguments to this function are incorrect
|
@@ -22,7 +22,7 @@ error[E0308]: mismatched types
LL | demo(1..10);
| ---- ^^^^^
| | |
- | | expected reference, found struct `std::ops::Range`
+ | | expected `&Range<usize>`, found struct `Range`
| | help: consider borrowing here: `&(1..10)`
| arguments to this function are incorrect
|
diff --git a/src/test/ui/range/range-1.rs b/tests/ui/range/range-1.rs
index 192426fe2..192426fe2 100644
--- a/src/test/ui/range/range-1.rs
+++ b/tests/ui/range/range-1.rs
diff --git a/src/test/ui/range/range-1.stderr b/tests/ui/range/range-1.stderr
index aaea91ce0..395639036 100644
--- a/src/test/ui/range/range-1.stderr
+++ b/tests/ui/range/range-1.stderr
@@ -32,9 +32,6 @@ LL | let range = *arr..;
= 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
- |
-LL | pub struct RangeFrom<Idx> {
- | ^^^ required by this bound in `RangeFrom`
error: aborting due to 3 previous errors
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.fixed b/tests/ui/range/range-inclusive-pattern-precedence.fixed
index 38104bab7..38104bab7 100644
--- a/src/test/ui/range/range-inclusive-pattern-precedence.fixed
+++ b/tests/ui/range/range-inclusive-pattern-precedence.fixed
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.rs b/tests/ui/range/range-inclusive-pattern-precedence.rs
index b294e436f..b294e436f 100644
--- a/src/test/ui/range/range-inclusive-pattern-precedence.rs
+++ b/tests/ui/range/range-inclusive-pattern-precedence.rs
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.stderr b/tests/ui/range/range-inclusive-pattern-precedence.stderr
index f6788d034..f6788d034 100644
--- a/src/test/ui/range/range-inclusive-pattern-precedence.stderr
+++ b/tests/ui/range/range-inclusive-pattern-precedence.stderr
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence2.rs b/tests/ui/range/range-inclusive-pattern-precedence2.rs
index bede9c579..bede9c579 100644
--- a/src/test/ui/range/range-inclusive-pattern-precedence2.rs
+++ b/tests/ui/range/range-inclusive-pattern-precedence2.rs
diff --git a/src/test/ui/range/range-inclusive-pattern-precedence2.stderr b/tests/ui/range/range-inclusive-pattern-precedence2.stderr
index bb4e3a13a..bb4e3a13a 100644
--- a/src/test/ui/range/range-inclusive-pattern-precedence2.stderr
+++ b/tests/ui/range/range-inclusive-pattern-precedence2.stderr
diff --git a/tests/ui/range/range-pattern-out-of-bounds-issue-68972.rs b/tests/ui/range/range-pattern-out-of-bounds-issue-68972.rs
new file mode 100644
index 000000000..d02caff1f
--- /dev/null
+++ b/tests/ui/range/range-pattern-out-of-bounds-issue-68972.rs
@@ -0,0 +1,13 @@
+#![feature(exclusive_range_pattern)]
+#![allow(unreachable_patterns)]
+fn main() {
+ match 0u8 {
+ 251..257 => {}
+ //~^ ERROR literal out of range
+ //~| ERROR literal out of range
+ 251..=256 => {}
+ //~^ ERROR literal out of range
+ //~| ERROR literal out of range
+ _ => {}
+ }
+}
diff --git a/tests/ui/range/range-pattern-out-of-bounds-issue-68972.stderr b/tests/ui/range/range-pattern-out-of-bounds-issue-68972.stderr
new file mode 100644
index 000000000..7b8309b9b
--- /dev/null
+++ b/tests/ui/range/range-pattern-out-of-bounds-issue-68972.stderr
@@ -0,0 +1,26 @@
+error: literal out of range for `u8`
+ --> $DIR/range-pattern-out-of-bounds-issue-68972.rs:5:14
+ |
+LL | 251..257 => {}
+ | ^^^ this value doesn't fit in `u8` whose maximum value is `255`
+
+error: literal out of range for `u8`
+ --> $DIR/range-pattern-out-of-bounds-issue-68972.rs:8:15
+ |
+LL | 251..=256 => {}
+ | ^^^ this value doesn't fit in `u8` whose maximum value is `255`
+
+error: literal out of range for `u8`
+ --> $DIR/range-pattern-out-of-bounds-issue-68972.rs:5:14
+ |
+LL | 251..257 => {}
+ | ^^^ this value doesn't fit in `u8` whose maximum value is `255`
+
+error: literal out of range for `u8`
+ --> $DIR/range-pattern-out-of-bounds-issue-68972.rs:8:15
+ |
+LL | 251..=256 => {}
+ | ^^^ this value doesn't fit in `u8` whose maximum value is `255`
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/range/range_traits-1.rs b/tests/ui/range/range_traits-1.rs
index e28e47435..e28e47435 100644
--- a/src/test/ui/range/range_traits-1.rs
+++ b/tests/ui/range/range_traits-1.rs
diff --git a/src/test/ui/range/range_traits-1.stderr b/tests/ui/range/range_traits-1.stderr
index 617afc995..617afc995 100644
--- a/src/test/ui/range/range_traits-1.stderr
+++ b/tests/ui/range/range_traits-1.stderr
diff --git a/src/test/ui/range/range_traits-2.rs b/tests/ui/range/range_traits-2.rs
index 234d7a64d..234d7a64d 100644
--- a/src/test/ui/range/range_traits-2.rs
+++ b/tests/ui/range/range_traits-2.rs
diff --git a/src/test/ui/range/range_traits-2.stderr b/tests/ui/range/range_traits-2.stderr
index 61facba53..61facba53 100644
--- a/src/test/ui/range/range_traits-2.stderr
+++ b/tests/ui/range/range_traits-2.stderr
diff --git a/src/test/ui/range/range_traits-3.rs b/tests/ui/range/range_traits-3.rs
index 2d597cce5..2d597cce5 100644
--- a/src/test/ui/range/range_traits-3.rs
+++ b/tests/ui/range/range_traits-3.rs
diff --git a/src/test/ui/range/range_traits-3.stderr b/tests/ui/range/range_traits-3.stderr
index e54d17b32..e54d17b32 100644
--- a/src/test/ui/range/range_traits-3.stderr
+++ b/tests/ui/range/range_traits-3.stderr
diff --git a/src/test/ui/range/range_traits-4.rs b/tests/ui/range/range_traits-4.rs
index b8e88559b..b8e88559b 100644
--- a/src/test/ui/range/range_traits-4.rs
+++ b/tests/ui/range/range_traits-4.rs
diff --git a/src/test/ui/range/range_traits-5.rs b/tests/ui/range/range_traits-5.rs
index 4aec7a415..4aec7a415 100644
--- a/src/test/ui/range/range_traits-5.rs
+++ b/tests/ui/range/range_traits-5.rs
diff --git a/src/test/ui/range/range_traits-6.rs b/tests/ui/range/range_traits-6.rs
index bce106bbf..bce106bbf 100644
--- a/src/test/ui/range/range_traits-6.rs
+++ b/tests/ui/range/range_traits-6.rs
diff --git a/src/test/ui/range/range_traits-6.stderr b/tests/ui/range/range_traits-6.stderr
index addc525f1..addc525f1 100644
--- a/src/test/ui/range/range_traits-6.stderr
+++ b/tests/ui/range/range_traits-6.stderr
diff --git a/src/test/ui/range/range_traits-7.rs b/tests/ui/range/range_traits-7.rs
index c7b310562..c7b310562 100644
--- a/src/test/ui/range/range_traits-7.rs
+++ b/tests/ui/range/range_traits-7.rs
diff --git a/src/test/ui/range_inclusive.rs b/tests/ui/range_inclusive.rs
index c9107d24e..c9107d24e 100644
--- a/src/test/ui/range_inclusive.rs
+++ b/tests/ui/range_inclusive.rs