mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
16 lines
266 B
Rust
16 lines
266 B
Rust
// 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() {}
|