]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-91210-ptr-method.fixed
fn-trait-closure test now pass on new solver
[rust.git] / tests / 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() {}