blob: ed0ce6effe7d90488f4cc550abfb56fde3cd399d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Regression test for issue #91210.
// run-rustfix
#![allow(unused)]
struct Foo { read: i32 }
unsafe fn blah(x: *mut Foo) {
x.read = 4;
//~^ ERROR: attempted to take value of method
//~| HELP: to access the field, dereference first
}
fn main() {}
|