summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/thir-constparam-temp.rs
blob: cdc5910b36cfa2588f3df8c1a8d222c6fd54311d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// build-pass

#![feature(adt_const_params)]
#![allow(incomplete_features)]

#[derive(PartialEq, Eq)]
struct Yikes;

impl Yikes {
    fn mut_self(&mut self) {}
}

fn foo<const YIKES: Yikes>() {
    YIKES.mut_self()
    //~^ WARNING taking a mutable reference
}

fn main() {
    foo::<{ Yikes }>()
}