]> git.lizzy.rs Git - rust.git/blob - src/test/ui/editions/edition-raw-pointer-method-2018.rs
Rollup merge of #86747 - FabianWolff:issue-86653, r=GuillaumeGomez
[rust.git] / src / test / ui / editions / edition-raw-pointer-method-2018.rs
1 // edition:2018
2
3 // tests that editions work with the tyvar warning-turned-error
4
5 #[deny(warnings)]
6 fn main() {
7     let x = 0;
8     let y = &x as *const _;
9     let _ = y.is_null();
10     //~^ error: the type of this value must be known to call a method on a raw pointer on it [E0699]
11 }