]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir/thir-constparam-temp.stderr
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.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