]> git.lizzy.rs Git - rust.git/blob - src/test/ui/editions/edition-raw-pointer-method-2015.rs
Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister
[rust.git] / src / test / ui / editions / edition-raw-pointer-method-2015.rs
1 // edition:2015
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: type annotations needed [tyvar_behind_raw_pointer]
11     //~^^ warning: this is accepted in the current edition
12 }