blob: 9fad05387c6b45c0e857b545f08055c3ba1fde3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Tests that an `&` pointer to something inherently mutable is itself
// to be considered mutable.
#[no_freeze]
enum Foo { A }
fn bar<T: Freeze>(_: T) {}
fn main() {
let x = A;
bar(&x); //~ ERROR type parameter with an incompatible type
}
|