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
fd1a263fc7029b06a8f041feadbcc85c65b0a6e8
rust/tests/ui/proc-macro/not-joint.rs

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

25 lines
247 B
Rust
Raw Normal View History

tests: Add missing run-pass annotations
2019-07-27 00:54:25 +03:00
// run-pass
rustc: Fix joint-ness of stringified token-streams This commit fixes `StringReader`'s parsing of tokens which have been stringified through procedural macros. Whether or not a token tree is joint is defined by span information, but when working with procedural macros these spans are often dummy and/or overridden which means that they end up considering all operators joint if they can! The fix here is to track the raw source span as opposed to the overridden span. With this information we can more accurately classify `Punct` structs as either joint or not. Closes #50700
2018-05-17 09:30:43 -07:00
// aux-build:not-joint.rs
extern crate not_joint as bar;
use bar::{tokens, nothing};
tokens![< -];
#[nothing]
a![< -];
#[nothing]
b!{< -}
#[nothing]
c!(< -);
#[nothing]
fn foo() {
//! dox
let x = 2 < - 3;
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3315ms Template: 5ms
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