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

13 lines
258 B
Rust
Raw Normal View History

Revert "Remove `#![feature(never_type)]` from tests." This reverts commit 8f6197f39f7d468dfc5b2bd41dae4769992a2f83.
2019-12-11 09:51:28 -05:00
#![feature(never_type)]
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)]
fn foo() {
Replace ! with * in ui test of unary expr reachability
2021-11-21 19:30:17 -08:00
let x: ! = * { return; }; //~ ERROR unreachable
//~| ERROR type `!` cannot be dereferenced
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: 2803ms 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