]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-91210-ptr-method.fixed
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / typeck / issue-91210-ptr-method.fixed
1 // Regression test for issue #91210.
2
3 // run-rustfix
4
5 #![allow(unused)]
6
7 struct Foo { read: i32 }
8
9 unsafe fn blah(x: *mut Foo) {
10     (*x).read = 4;
11     //~^ ERROR: attempted to take value of method
12     //~| HELP: to access the field, dereference first
13 }
14
15 fn main() {}