mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-03 13:36:36 +00:00
18 lines
359 B
Rust
18 lines
359 B
Rust
#![allow(unused_variables)]
|
|
#![allow(unused_assignments)]
|
|
#![allow(dead_code)]
|
|
#![deny(unreachable_code)]
|
|
#![feature(type_ascription)]
|
|
|
|
fn a() {
|
|
// the `22` is unreachable:
|
|
let x: [usize; 2] = [return, 22]; //~ ERROR unreachable
|
|
}
|
|
|
|
fn b() {
|
|
// the array is unreachable:
|
|
let x: [usize; 2] = [22, return]; //~ ERROR unreachable
|
|
}
|
|
|
|
fn main() { }
|