blob: 89acfea6ed8ff8d60ae13bdc63c8602ef235fdf3 [file] [log] [blame]
const fn mutable_ref_in_const() -> u8 {
let mut a = 0;
let b = &mut a; //~ ERROR mutable references in const fn
*b
}
struct X;
impl X {
const fn inherent_mutable_ref_in_const() -> u8 {
let mut a = 0;
let b = &mut a; //~ ERROR mutable references in const fn
*b
}
}
fn main() {}