| Age | Commit message (Collapse) | Author | Lines |
|
|
|
expand: Feature gate out-of-line modules in proc macro input
Extracted from https://github.com/rust-lang/rust/pull/64273.
We are currently gating attributes applied directly to `mod` items because there are unresolved questions about out-of-line modules and their behavior is very likely to change.
However, you can sneak an out-of-line module into an attribute macro input using modules nested into other items like
```rust
#[my_attr]
fn m() {
#[path = "zzz.rs"]
mod n; // what tokens does the `my_attr` macro see?
}
```
This PR prevents that and emits a feature gate error for this case as well.
r? @Centril
It would be great to land this before beta.
|
|
|
|
|
|
This is done by moving some data definitions to syntax::expand.
|
|
|
|
Remove unnecessary trait bounds and derivations
This PR removes unnecessary trait bounds and derivations from many types.
r? @nikomatsakis
|
|
|
|
This should also eliminate the ICE when using `include_bytes!`, `include_str!`
and `#[doc(include = "...")]`.
Fixes #63900
|
|
|
|
And make it more uniform with other macros.
By merging placeholders for future derives' outputs into the derive container's output fragment early.
|
|
|
|
|