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
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/parser/raw/raw-str-in-macro-call.rs

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

15 lines
150 B
Rust
Raw Normal View History

Improve error messages for raw strings (#60762) This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested)
2020-03-28 01:46:20 -04:00
// check-pass
macro_rules! m1 {
($tt:tt #) => ()
}
macro_rules! m2 {
($tt:tt) => ()
}
fn main() {
m1!(r#"abc"##);
m2!(r#"abc"#);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2356ms 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