]>
Commit | Line | Data |
---|---|---|
5e7ed085 FG |
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 | } |