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
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/expr/if/expr-if-panic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
185 B
Rust
Raw Normal View History

Move tests from `test/run-fail` to UI
2020-04-16 15:50:32 +09:00
//@ run-fail
Update infrastructure for fail -> panic This includes updating the language items and marking what needs to change after a snapshot. If you do not use the standard library, the language items you need to implement have changed. For example: ```rust #[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} } ``` is now ```rust #[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} } ``` Related, lesser-implemented language items `fail` and `fail_bounds_check` have become `panic` and `panic_bounds_check`, as well. These are implemented by `libcore`, so it is unlikely (though possible!) that these two renamings will affect you. [breaking-change] Fix test suite
2014-10-28 14:07:33 -04:00
//@ error-pattern:explicit panic
tests: use `needs-subprocess` instead of `ignore-{wasm32,emscripten,sgx}`
2025-01-23 16:36:54 +08:00
//@ needs-subprocess
rustc: Allow if expressions to fail
2011-05-21 14:07:44 -04:00
run rustfmt on test/run-fail folder
2016-05-27 08:09:36 +05:30
fn main() {
let _x = if false {
0
} else if true {
panic!()
} else {
10
};
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2580ms Template: 2ms
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