]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const_let_assign3.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / const_let_assign3.stderr
CommitLineData
1b1a35ee
XL
1error[E0658]: mutable references are not allowed in constant functions
2 --> $DIR/const_let_assign3.rs:8:18
0731742a 3 |
1b1a35ee
XL
4LL | const fn foo(&mut self, x: u32) {
5 | ^^^^^^^^^
f9f354fc 6 |
1b1a35ee 7 = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
f9f354fc 8 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
0731742a 9
f035d41b 10error[E0764]: mutable references are not allowed in constants
a1dfa0c6
XL
11 --> $DIR/const_let_assign3.rs:16:5
12 |
532ac7d7 13LL | s.foo(3);
f035d41b 14 | ^ `&mut` is only allowed in `const fn`
a1dfa0c6 15
f035d41b 16error[E0764]: mutable references are not allowed in constants
0731742a
XL
17 --> $DIR/const_let_assign3.rs:22:13
18 |
19LL | let y = &mut x;
f035d41b 20 | ^^^^^^ `&mut` is only allowed in `const fn`
0731742a 21
1b1a35ee 22error: aborting due to 3 previous errors
a1dfa0c6 23
1b1a35ee
XL
24Some errors have detailed explanations: E0658, E0764.
25For more information about an error, try `rustc --explain E0658`.