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
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/consts/control-flow/issue-46843.rs

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

17 lines
226 B
Rust
Raw Normal View History

Update tests
2020-05-21 12:49:38 -07:00
enum Thing {
This,
That,
}
Reorganize, bless and add tests for const control flow This creates a new test directory, `ui/consts/control-flow` to hold tests related to control flow in a const context. It also blesses all existing tests with the new error messages, and adds new tests for the `const_if_match` feature.
2019-11-17 21:11:42 -08:00
fn non_const() -> Thing {
Thing::This
}
pub const Q: i32 = match non_const() {
Note def descr in NonConstFunctionCall
2024-12-23 21:49:48 +00:00
//~^ ERROR cannot call non-const function
Reorganize, bless and add tests for const control flow This creates a new test directory, `ui/consts/control-flow` to hold tests related to control flow in a const context. It also blesses all existing tests with the new error messages, and adds new tests for the `const_if_match` feature.
2019-11-17 21:11:42 -08:00
Thing::This => 1,
Thing::That => 0
};
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1605ms 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