]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #30105 - faineance:master, r=nrc
authorbors <bors@rust-lang.org>
Tue, 15 Dec 2015 01:18:01 +0000 (01:18 +0000)
committerbors <bors@rust-lang.org>
Tue, 15 Dec 2015 01:18:01 +0000 (01:18 +0000)
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


Trivial merge