f3191a450c
than the current ones, which were very fine-grained. Also, cleanly distinguish when properties must be found in *owned* types vs *reachable* types. Fixes #10157 Fixes #10278
13 lines
251 B
Rust
13 lines
251 B
Rust
// 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
|
|
}
|