]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/inference-variable-behind-raw-pointer.rs
Rollup merge of #107348 - lcnr:project-solve-new, r=compiler-errors
[rust.git] / tests / ui / inference / inference-variable-behind-raw-pointer.rs
1 // check-pass
2
3 // tests that the following code compiles, but produces a future-compatibility warning
4
5 fn main() {
6     let data = std::ptr::null();
7     let _ = &data as *const *const ();
8     if data.is_null() {}
9     //~^ WARNING type annotations needed
10     //~| WARNING this is accepted in the current edition
11 }