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
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/parser/range-3.rs

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

7 lines
159 B
Rust
Raw Normal View History

Fix some grammar inconsistencies for the '..' range notation. Grammar changes: * allow 'for _ in 1..i {}' (fixes #20241) * allow 'for _ in 1.. {}' as infinite loop * prevent use of range notation in contexts where only operators of high precedence are expected (fixes #20811) Parser code cleanup: * remove RESTRICTION_NO_DOTS * make AS_PREC const and follow naming convention * make min_prec inclusive
2015-01-18 21:43:03 +01:00
// Test range syntax - syntax errors.
pub fn main() {
let r = 1..2..3;
Fix tests
2021-08-01 19:55:48 -05:00
//~^ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
Rename std::path to std::old_path As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
2015-01-29 14:03:36 -08:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4241ms 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