fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0658]: `for` is not allowed in a `const fn` 2 --> $DIR/const-fn-error.rs:5:5 3 | 4LL | / for i in 0..x { 5LL | | 6LL | | 7LL | | 8LL | | 9LL | | sum += i; 10LL | | } 11 | |_____^ 12 | 13 = note: see issue #87575 <https://github.com/rust-lang/rust/issues/87575> for more information 14 = help: add `#![feature(const_for)]` to the crate attributes to enable 15 16error[E0015]: cannot convert `std::ops::Range<usize>` into an iterator in constant functions 17 --> $DIR/const-fn-error.rs:5:14 18 | 19LL | for i in 0..x { 20 | ^^^^ 21 | 22note: impl defined here, but it is not `const` 23 --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL 24 = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants 25 = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable 26 27error[E0658]: mutable references are not allowed in constant functions 28 --> $DIR/const-fn-error.rs:5:14 29 | 30LL | for i in 0..x { 31 | ^^^^ 32 | 33 = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information 34 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable 35 36error[E0015]: cannot call non-const fn `<std::ops::Range<usize> as Iterator>::next` in constant functions 37 --> $DIR/const-fn-error.rs:5:14 38 | 39LL | for i in 0..x { 40 | ^^^^ 41 | 42 = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants 43 = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable 44 45error: aborting due to 4 previous errors 46 47Some errors have detailed explanations: E0015, E0658. 48For more information about an error, try `rustc --explain E0015`.