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
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/parser/issues/issue-1802-1.rs

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

8 lines
129 B
Rust
Raw Normal View History

Continue evaluating after parsing incorrect binary literal
2019-01-11 19:56:41 -08:00
fn log(a: i32, b: i32) {}
test: Add tests for #1802
2012-02-10 15:43:16 -08:00
fn main() {
Continue evaluating after parsing incorrect binary literal
2019-01-11 19:56:41 -08:00
let error = 42;
Lex binary and octal literals more eagerly. Previously 0b12 was considered two tokens, 0b1 and 2, as 2 isn't a valid base 2 digit. This patch changes that to collapse them into one (and makes `0b12` etc. an error: 2 isn't a valid base 2 digit). This may break some macro invocations of macros with `tt` (or syntax extensions) that rely on adjacent digits being separate tokens and hence is a [breaking-change] The fix is to separate the tokens, e.g. `0b12` -> `0b1 2`. cc https://github.com/rust-lang/rfcs/pull/879
2015-03-31 00:27:13 +11:00
log(error, 0b);
Continue evaluating after parsing incorrect binary literal
2019-01-11 19:56:41 -08:00
//~^ ERROR no valid digits found for number
librustc: Replace `impl Type : Trait` with `impl Trait for Type`. rs=implflipping
2013-02-14 11:47:00 -08:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4903ms 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