summary refs log tree commit diff
path: root/src/test/ui/consts/const-mut-refs/const_mut_refs.stderr
blob: 4ca7b128b7c4b8253ad5e8fa7a650229c0a6c2a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0764]: mutable references are not allowed in constants
  --> $DIR/const_mut_refs.rs:31:17
   |
LL |     let _: [(); foo().bar()] = [(); 1];
   |                 ^^^^^ `&mut` is only allowed in `const fn`

error[E0764]: mutable references are not allowed in constants
  --> $DIR/const_mut_refs.rs:33:21
   |
LL |     let _: [(); baz(&mut foo())] = [(); 2];
   |                     ^^^^^^^^^^ `&mut` is only allowed in `const fn`

error[E0764]: mutable references are not allowed in constants
  --> $DIR/const_mut_refs.rs:35:22
   |
LL |     let _: [(); bazz(&mut foo())] = [(); 3];
   |                      ^^^^^^^^^^ `&mut` is only allowed in `const fn`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0764`.