rust/tests/ui/consts/issue-94675.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-08-28 01:27:31 -05:00
error[E0277]: the trait bound `Vec<usize>: ~const Index<_>` is not satisfied
--> $DIR/issue-94675.rs:9:9
2022-03-06 20:38:42 -06:00
|
LL | self.bar[0] = baz.len();
2022-08-28 01:27:31 -05:00
| ^^^^^^^^^^^ vector indices are of type `usize` or ranges of `usize`
|
= help: the trait `~const Index<_>` is not implemented for `Vec<usize>`
note: the trait `Index<_>` is implemented for `Vec<usize>`, but that implementation is not `const`
--> $DIR/issue-94675.rs:9:9
2022-03-06 20:38:42 -06:00
|
2022-08-28 01:27:31 -05:00
LL | self.bar[0] = baz.len();
| ^^^^^^^^^^^
2022-03-06 20:38:42 -06:00
error[E0277]: the trait bound `Vec<usize>: ~const IndexMut<usize>` is not satisfied
--> $DIR/issue-94675.rs:9:9
|
LL | self.bar[0] = baz.len();
| ^^^^^^^^^^^ vector indices are of type `usize` or ranges of `usize`
|
= help: the trait `~const IndexMut<usize>` is not implemented for `Vec<usize>`
note: the trait `IndexMut<usize>` is implemented for `Vec<usize>`, but that implementation is not `const`
--> $DIR/issue-94675.rs:9:9
|
LL | self.bar[0] = baz.len();
| ^^^^^^^^^^^
2022-08-28 01:27:31 -05:00
error: aborting due to 2 previous errors
2022-03-06 20:38:42 -06:00
2022-08-28 01:27:31 -05:00
For more information about this error, try `rustc --explain E0277`.