2023-04-16 11:12:37 +00:00
|
|
|
error[E0015]: cannot call non-const fn `Vec::<u32>::len` in constant functions
|
2023-07-27 15:51:02 +00:00
|
|
|
--> $DIR/issue-94675.rs:11:27
|
2022-03-06 18:38:42 -08:00
|
|
|
|
|
|
|
|
LL | self.bar[0] = baz.len();
|
2023-04-16 11:12:37 +00:00
|
|
|
| ^^^^^
|
2022-03-06 18:38:42 -08:00
|
|
|
|
|
2023-04-16 11:12:37 +00:00
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
2022-03-06 18:38:42 -08:00
|
|
|
|
2023-04-16 11:12:37 +00:00
|
|
|
error[E0015]: cannot call non-const operator in constant functions
|
2023-07-27 15:51:02 +00:00
|
|
|
--> $DIR/issue-94675.rs:11:9
|
2023-04-16 11:12:37 +00:00
|
|
|
|
|
|
|
|
LL | self.bar[0] = baz.len();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: impl defined here, but it is not `const`
|
|
|
|
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
|
|
|
|
2023-07-27 15:51:02 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2022-03-06 18:38:42 -08:00
|
|
|
|
2023-07-27 15:51:02 +00:00
|
|
|
For more information about this error, try `rustc --explain E0015`.
|