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