2017-03-21 08:41:41 -05:00
|
|
|
#![allow(unused_variables)]
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![deny(unreachable_code)]
|
2019-12-11 08:51:28 -06:00
|
|
|
#![feature(never_type, type_ascription)]
|
2017-03-21 08:41:41 -05:00
|
|
|
|
|
|
|
fn a() {
|
|
|
|
// the cast is unreachable:
|
2017-11-20 06:13:27 -06:00
|
|
|
let x = {return} as !; //~ ERROR unreachable
|
2021-07-20 22:23:22 -05:00
|
|
|
//~| ERROR non-primitive cast
|
2017-03-21 08:41:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|