]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-17718-const-borrow.stderr
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / issue-17718-const-borrow.stderr
1 error[E0492]: constants cannot refer to interior mutable data
2   --> $DIR/issue-17718-const-borrow.rs:4:39
3    |
4 LL | const B: &'static UnsafeCell<usize> = &A;
5    |                                       ^^ this borrow of an interior mutable value may end up in the final value
6
7 error[E0492]: constants cannot refer to interior mutable data
8   --> $DIR/issue-17718-const-borrow.rs:9:39
9    |
10 LL | const E: &'static UnsafeCell<usize> = &D.a;
11    |                                       ^^^^ this borrow of an interior mutable value may end up in the final value
12
13 error[E0492]: constants cannot refer to interior mutable data
14   --> $DIR/issue-17718-const-borrow.rs:11:23
15    |
16 LL | const F: &'static C = &D;
17    |                       ^^ this borrow of an interior mutable value may end up in the final value
18
19 error: aborting due to 3 previous errors
20
21 For more information about this error, try `rustc --explain E0492`.