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
e73069767f11d992f0dca7e31d53d7e1a77fd237
rust/src/test/ui/parser/issue-17718-const-mut.rs

8 lines
128 B
Rust
Raw Normal View History

syntax: Enable parsing of `const` globals This rewrites them to the current `ItemStatic` production of the compiler, but I want to get this into a snapshot. It will be illegal to use a `static` in a pattern of a `match` statement, so all those current uses will need to be rewritten to `const` once it's implemented. This requires that the stage0 snapshot is able to parse `const`. cc #17718
2014-10-02 15:06:08 -07:00
const
Convert some notes to help messages Closes #18126.
2014-10-18 15:39:44 +13:00
mut //~ ERROR: const globals cannot be mutable
//~^ HELP did you mean to declare a static?
Update compile fail tests to use usize.
2015-01-08 22:02:42 +11:00
FOO: usize = 3;
syntax: Enable parsing of `const` globals This rewrites them to the current `ItemStatic` production of the compiler, but I want to get this into a snapshot. It will be illegal to use a `static` in a pattern of a `match` statement, so all those current uses will need to be rewritten to `const` once it's implemented. This requires that the stage0 snapshot is able to parse `const`. cc #17718
2014-10-02 15:06:08 -07:00
fn main() {
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2102ms Template: 3ms
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