Indicates a range of tokens that should be replaced by the tokens in the provided vector. This is used in two places during token collection:
During the parsing of an AST node that may have a
#[derive]attribute, we parse a nested AST node that has
#[cfg_attr]In this case, we use a
ReplaceRangeto replace the entire inner AST node with
FlatToken::AttrTarget, allowing us to perform eager cfg-expansion on an
When we parse an inner attribute while collecting tokens. We remove inner attributes from the token stream entirely, and instead track them through the
attrsfield on the AST node. This allows us to easily manipulate them (for example, removing the first macro inner attribute to invoke a proc-macro). When create a
TokenStream, the inner attributes get inserted into the proper place in the token stream.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain
repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes