Include the span of attributes of the lhs to the span of the assignment expression This PR adds the span of attributes of the lhs to the span of the assignment expression. Currently with the following code, `#[attr]` is not included to the span of the assignment (`foo = true`). ```rust #[attr] foo = true; ``` The rational behind this change is that as libsyntax user I expect the span of the parent node includes every span of child nodes. cc https://github.com/rust-lang/rustfmt/issues/3313, https://github.com/rust-lang/rust/issues/15701. |
||
|---|---|---|
| .. | ||
| attr | ||
| diagnostics | ||
| ext | ||
| parse | ||
| util | ||
| ast.rs | ||
| build.rs | ||
| Cargo.toml | ||
| config.rs | ||
| diagnostic_list.rs | ||
| early_buffered_lints.rs | ||
| entry.rs | ||
| feature_gate.rs | ||
| fold.rs | ||
| json.rs | ||
| lib.rs | ||
| ptr.rs | ||
| README.md | ||
| show_span.rs | ||
| source_map.rs | ||
| std_inject.rs | ||
| test.rs | ||
| test_snippet.rs | ||
| tokenstream.rs | ||
| visit.rs | ||
The syntax crate contains those things concerned purely with syntax
– that is, the AST ("abstract syntax tree"), parser, pretty-printer,
lexer, macro expander, and utilities for traversing ASTs.
For more information about how these things work in rustc, see the rustc guide: