diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/ui/consts/const-fn-error.stderr | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/consts/const-fn-error.stderr')
-rw-r--r-- | tests/ui/consts/const-fn-error.stderr | 19 |
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`. |