]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mir/thir-constparam-temp.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / mir / thir-constparam-temp.stderr
1 warning: taking a mutable reference to a `const` item
2 --> $DIR/thir-constparam-temp.rs:14:5
3 |
4 LL | YIKES.mut_self()
5 | ^^^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(const_item_mutation)]` on by default
8 = note: each usage of a `const` item creates a new temporary
9 = note: the mutable reference will refer to this temporary, not the original `const` item
10 note: mutable reference created due to call to this method
11 --> $DIR/thir-constparam-temp.rs:10:5
12 |
13 LL | fn mut_self(&mut self) {}
14 | ^^^^^^^^^^^^^^^^^^^^^^
15 note: `const` item defined here
16 --> $DIR/thir-constparam-temp.rs:13:8
17 |
18 LL | fn foo<const YIKES: Yikes>() {
19 | ^^^^^^^^^^^^^^^^^^
20
21 warning: 1 warning emitted
22