]> git.lizzy.rs Git - rust.git/blob - tests/ui/reachable/expr_unary.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / reachable / expr_unary.rs
1 #![feature(never_type)]
2 #![allow(unused_variables)]
3 #![allow(unused_assignments)]
4 #![allow(dead_code)]
5 #![deny(unreachable_code)]
6
7 fn foo() {
8     let x: ! = * { return; }; //~ ERROR unreachable
9     //~| ERROR type `!` cannot be dereferenced
10 }
11
12 fn main() { }