summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-fn-error.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-fn-error.stderr')
-rw-r--r--tests/ui/consts/const-fn-error.stderr19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/ui/consts/const-fn-error.stderr b/tests/ui/consts/const-fn-error.stderr
index f735b3d53..73d235d6a 100644
--- a/tests/ui/consts/const-fn-error.stderr
+++ b/tests/ui/consts/const-fn-error.stderr
@@ -5,7 +5,7 @@ LL | / for i in 0..x {
LL | |
LL | |
LL | |
-LL | |
+... |
LL | | sum += i;
LL | | }
| |_____^
@@ -33,6 +33,19 @@ LL | for i in 0..x {
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
+error[E0277]: the trait bound `std::ops::Range<usize>: Iterator` is not satisfied
+ --> $DIR/const-fn-error.rs:5:14
+ |
+LL | for i in 0..x {
+ | ^^^^ `std::ops::Range<usize>` is not an iterator
+ |
+ = help: the trait `~const Iterator` is not implemented for `std::ops::Range<usize>`
+note: the trait `Iterator` is implemented for `std::ops::Range<usize>`, but that implementation is not `const`
+ --> $DIR/const-fn-error.rs:5:14
+ |
+LL | for i in 0..x {
+ | ^^^^
+
error[E0015]: cannot call non-const fn `<std::ops::Range<usize> as Iterator>::next` in constant functions
--> $DIR/const-fn-error.rs:5:14
|
@@ -42,7 +55,7 @@ LL | for i in 0..x {
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
-Some errors have detailed explanations: E0015, E0658.
+Some errors have detailed explanations: E0015, E0277, E0658.
For more information about an error, try `rustc --explain E0015`.