Issue: #30058
Updated for:
- Stmt
- BinOp_
- UnOp
- UintTy, IntTy and FloatTy
- Lit
- Generics
A possible inconsistancy?
The `Stmt` methods are on the spanned varient:
```rust
pub type Stmt = Spanned<Stmt_>;
impl Stmt {
pub fn id(s: &Stmt) -> Option<NodeId> {
match s.node {
StmtDecl(_, id) => Some(id),
StmtExpr(_, id) => Some(id),
StmtSemi(_, id) => Some(id),
StmtMac(..) => None,
}
}
}
```
Whilst the methods for BinOp are on the non spanned version.
````rust
impl BinOp_ {
pub fn to_string(op: BinOp_) -> &'static str { ... }
pub fn lazy(b: BinOp_) -> bool { ... }
pub fn is_shift(b: BinOp_) -> bool { ... }
pub fn is_comparison(b: BinOp_) -> bool { ... }
/// Returns `true` if the binary operator takes its arguments by value
pub fn is_by_value(b: BinOp_) -> bool { ... }
}
pub type BinOp = Spanned<BinOp_>;
````
r? @Manishearth