]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mir/thir-constparam-temp.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / mir / thir-constparam-temp.rs
1 // build-pass
2
3 #![feature(adt_const_params)]
4 #![allow(incomplete_features)]
5
6 #[derive(PartialEq, Eq)]
7 struct Yikes;
8
9 impl Yikes {
10 fn mut_self(&mut self) {}
11 }
12
13 fn foo<const YIKES: Yikes>() {
14 YIKES.mut_self()
15 //~^ WARNING taking a mutable reference
16 }
17
18 fn main() {
19 foo::<{ Yikes }>()
20 }