about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-08-30 00:36:19 -0700
committerGitHub <noreply@github.com>2016-08-30 00:36:19 -0700
commit71ee82a8aa0c02fc2c73e84f40bdb55512d10938 (patch)
treee2ead4306f12a3f92170850edc1176667765a9d0 /src/libsyntax/parse/mod.rs
parentaddb7537620feb228d6c9fe149b9c069d3686199 (diff)
parent02f081c0b53cad0bcfe1d20ebb892f06ffa996ff (diff)
downloadrust-71ee82a8aa0c02fc2c73e84f40bdb55512d10938.tar.gz
rust-71ee82a8aa0c02fc2c73e84f40bdb55512d10938.zip
Auto merge of #36066 - jseyfried:rollup, r=Manishearth
Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - #35591: Add a field `span: Span` to `ast::Generics`.
 - #35618: Remove variant `Mod` of `ast::PathListItemKind` and refactor the remaining variant `ast::PathListKind::Ident` to a struct `ast::PathListKind_`.
 - #35480: Change uses of `Constness` in the AST to `Spanned<Constness>`.
  - c.f. `MethodSig`, `ItemKind`
 - #35728: Refactor `cx.pat_enum()` into `cx.pat_tuple_struct()` and `cx.pat_path()`.
 - #35850: Generalize the elements of lists in attributes from `MetaItem` to a new type `NestedMetaItem` that can represent a `MetaItem` or a literal.
 - #35917: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`.
  - Besides removing imports of these traits, this won't cause fallout.
 - Add a variant `Union` to `ItemKind` to future proof for `union` (c.f. #36016).
 - Remove inherent methods `attrs` and `fold_attrs` of `Annotatable`.
  - Use methods `attrs` and `map_attrs` of `HasAttrs` instead.

r? @Manishearth
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index cd1fdcfe9d1..af95e44a567 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -674,11 +674,11 @@ pub fn integer_lit(s: &str,
 mod tests {
     use super::*;
     use std::rc::Rc;
-    use syntax_pos::{Span, BytePos, Pos, NO_EXPANSION};
+    use syntax_pos::{self, Span, BytePos, Pos, NO_EXPANSION};
     use codemap::Spanned;
     use ast::{self, PatKind};
     use abi::Abi;
-    use attr::{first_attr_value_str_by_name, AttrMetaMethods};
+    use attr::first_attr_value_str_by_name;
     use parse;
     use parse::parser::Parser;
     use parse::token::{str_to_ident};
@@ -937,7 +937,10 @@ mod tests {
                                 variadic: false
                             }),
                                     ast::Unsafety::Normal,
-                                    ast::Constness::NotConst,
+                                    Spanned {
+                                        span: sp(0,2),
+                                        node: ast::Constness::NotConst,
+                                    },
                                     Abi::Rust,
                                     ast::Generics{ // no idea on either of these:
                                         lifetimes: Vec::new(),
@@ -945,7 +948,8 @@ mod tests {
                                         where_clause: ast::WhereClause {
                                             id: ast::DUMMY_NODE_ID,
                                             predicates: Vec::new(),
-                                        }
+                                        },
+                                        span: syntax_pos::DUMMY_SP,
                                     },
                                     P(ast::Block {
                                         stmts: vec!(ast::Stmt {