2019-11-06 00:00:00 +00:00
|
|
|
//@ check-pass
|
2017-12-15 08:20:54 +01:00
|
|
|
|
|
|
|
// tests that the following code compiles, but produces a future-compatibility warning
|
|
|
|
|
2017-12-14 18:51:25 +01:00
|
|
|
fn main() {
|
|
|
|
let data = std::ptr::null();
|
|
|
|
let _ = &data as *const *const ();
|
|
|
|
if data.is_null() {}
|
2019-11-06 00:00:00 +00:00
|
|
|
//~^ WARNING type annotations needed
|
2021-06-16 14:27:44 +02:00
|
|
|
//~| WARNING this is accepted in the current edition
|
2017-12-14 18:51:25 +01:00
|
|
|
}
|