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
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
rust/tests/ui/expr/if/if-loop.rs

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

9 lines
142 B
Rust
Raw Normal View History

compiletest: Remove `skip-codegen`
2019-06-12 18:18:32 +03:00
//@ check-pass
Fix an ICE when translating `if loop {} {}` In `if loop {} {}`, the `if` is actually unreachable, but we didn't handle that correctly and when trying to translate the `if` we tried to branch on the "return value" of the loop expression, which is not an `i1` and therefore triggered an LLVM assertion.
2015-02-19 10:49:14 +01:00
// This used to ICE because the "if" being unreachable was not handled correctly
fn err() {
if loop {} {}
}
Removed `#[rustc_error]` from tests that are all `// compile-pass`. I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
2018-10-31 13:08:01 +01:00
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3430ms Template: 9ms
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