Comments (3)
This looks like a compiler bug. The input is being passed into the macro without Span information. We will need to minimize the bug and file it against the compiler.
Unfortunately the compiler's span handling is totally broken right now --- rust-lang/rust#43081.
TokenStream [
Ident {
ident: "new",
span: #0 bytes(0..0)
},
Punct {
ch: '.',
spacing: Alone,
span: #0 bytes(0..0)
},
Group {
delimiter: Bracket,
stream: TokenStream [
Punct {
ch: '<',
spacing: Alone,
span: #0 bytes(0..0)
},
Ident {
ident: "set_",
span: #0 bytes(0..0)
},
Ident {
ident: "val",
span: #0 bytes(0..0)
},
Punct {
ch: '>',
spacing: Alone,
span: #0 bytes(0..0)
}
],
span: #0 bytes(0..0)
},
Group {
delimiter: Parenthesis,
stream: TokenStream [
Literal {
lit: Integer(42),
suffix: None,
span: #0 bytes(0..0)
}
],
span: #0 bytes(0..0)
},
Punct {
ch: ';',
spacing: Alone,
span: #0 bytes(0..0)
}
]
from paste.
The code in #7 (comment) now builds successfully with Rust 1.45 and paste 1.0.
from paste.
Correction: it builds with Rust 1.46+ (the current beta; releasing on August 27).
from paste.
Related Issues (20)
- Support paste in cfg feature context HOT 1
- Conflict with extended_key_value_attributes
- E0463 when linking dead code HOT 1
- Can't paste together `use` import HOT 2
- macro expansion fails with formating types inside a string literal HOT 4
- use of undeclared crate or module `paste` HOT 1
- "Expected identifier after `:`" error when `::` is used inside attribute HOT 1
- Readme and code identifies PascalCase as camelCase HOT 4
- Edge cases with `:camel`
- Paste sometimes produces keywords HOT 2
- Compile error with old Glibc? HOT 1
- Access to variable declared in macro HOT 3
- Wishlist: local token identifiers? HOT 2
- Ident concatenation doesn't work HOT 1
- Does not preserve invisible delimiters from declarative macros HOT 1
- Build errors following the release of `1.0.9` HOT 2
- Add $var:unquote modifier HOT 1
- Lifetime idents support HOT 3
- Possible to use bracket inside a paste expansion? HOT 1
- Can not use in literals? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paste.