Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
a3bd12b88aaf32b1036cdcb2ef3efe509dbebc15
rust/tests/ui/reachable/expr_tup.rs

18 lines
364 B
Rust
Raw Normal View History

cherry-pick over the tests I wrote for the reachability code For the most part, the current code performs similarly, although it differs in some particulars. I'll be nice to have these tests for judging future changes, as well.
2017-03-21 09:41:41 -04:00
#![allow(unused_variables)]
#![allow(unused_assignments)]
#![allow(dead_code)]
#![deny(unreachable_code)]
#![feature(type_ascription)]
fn a() {
// the `2` is unreachable:
Merge cfail and ui tests into ui tests
2017-11-20 13:13:27 +01:00
let x: (usize, usize) = (return, 2); //~ ERROR unreachable
cherry-pick over the tests I wrote for the reachability code For the most part, the current code performs similarly, although it differs in some particulars. I'll be nice to have these tests for judging future changes, as well.
2017-03-21 09:41:41 -04:00
}
fn b() {
// the tuple is unreachable:
Merge cfail and ui tests into ui tests
2017-11-20 13:13:27 +01:00
let x: (usize, usize) = (2, return); //~ ERROR unreachable
cherry-pick over the tests I wrote for the reachability code For the most part, the current code performs similarly, although it differs in some particulars. I'll be nice to have these tests for judging future changes, as well.
2017-03-21 09:41:41 -04:00
}
fn main() { }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4292ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API