]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-91210-ptr-method.rs
Auto merge of #107303 - compiler-errors:intern-canonical-var-values, r=lcnr
[rust.git] / tests / ui / typeck / issue-91210-ptr-method.rs
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() {}