]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #34424 - jseyfried:breaking_batch, r=Manishearth
authorbors <bors@rust-lang.org>
Mon, 27 Jun 2016 23:42:03 +0000 (16:42 -0700)
committerGitHub <noreply@github.com>
Mon, 27 Jun 2016 23:42:03 +0000 (16:42 -0700)
Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - #34213: Add a variant `Macro` to `TraitItemKind`
 - #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path`
 - #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream`
 - #33943:
  - Remove the type parameter from `visit::Visitor`
  - Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead.
  - Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`.
  - Remove the field `ctxt` of `ast::Mac_`
  - Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead.
 - #34316:
  - Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`.
  - Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`)
  - Rename `ast::ExprKind::Again` to `Continue`.
 - #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`
  - Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>`
  - Use autoderef instead of `.as_attr_slice()`
 - #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list.
 - #34403: Move errors into a separate crate (unlikely to cause breakage)

1  2 
src/librustc/mir/repr.rs
src/librustc_trans/intrinsic.rs
src/librustc_typeck/check/intrinsic.rs
src/libsyntax/ext/source_util.rs

index d39ff28841851d8a2539bb419a4e3e7eccf1730b,f55afc342e3f3d07e9d281cefe0fa9cc57c1494e..62d3421770c2f2cefe0a28ce6115ac5e006e21d1
@@@ -27,9 -24,8 +27,9 @@@ use std::cell::Ref
  use std::fmt::{self, Debug, Formatter, Write};
  use std::{iter, u32};
  use std::ops::{Index, IndexMut};
 +use std::vec::IntoIter;
  use syntax::ast::{self, Name};
- use syntax::codemap::Span;
+ use syntax_pos::Span;
  
  use super::cache::Cache;
  
Simple merge
index d297188a35c8c56085c60bd80c78460ef98bcf21,b4ee6fa418aaea45ebb4eae93415dcd0a2723b32..97cb09991ec40b953901517cf1726d163aaa39e1
@@@ -194,11 -194,10 +194,11 @@@ pub fn expand_include_bytes(cx: &mut Ex
  
  // resolve a file-system path to an absolute file-system path (if it
  // isn't already)
- fn res_rel_file(cx: &mut ExtCtxt, sp: codemap::Span, arg: &Path) -> PathBuf {
+ fn res_rel_file(cx: &mut ExtCtxt, sp: syntax_pos::Span, arg: &Path) -> PathBuf {
      // NB: relative paths are resolved relative to the compilation unit
      if !arg.is_absolute() {
 -        let mut cu = PathBuf::from(&cx.codemap().span_to_filename(sp));
 +        let callsite = cx.codemap().source_callsite(sp);
 +        let mut cu = PathBuf::from(&cx.codemap().span_to_filename(callsite));
          cu.pop();
          cu.push(arg);
          cu