Skip to content

Commit 64ee38b

Browse files
committed
---
yaml --- r: 175623 b: refs/heads/auto c: 38ac9e3 h: refs/heads/master i: 175621: 5bf6bc8 175619: 9b883f8 175615: 1a259b9 v: v3
1 parent ddc0b78 commit 64ee38b

File tree

3 files changed

+131
-354
lines changed

3 files changed

+131
-354
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 53edd767b42d81efc64a018ad93efc2bf1e37f4b
13+
refs/heads/auto: 38ac9e3984392ab11e33b77d5e1927c1fa17fb07
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libsyntax/ast.rs

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ pub use self::UnboxedClosureKind::*;
5353
pub use self::UnOp::*;
5454
pub use self::UnsafeSource::*;
5555
pub use self::VariantKind::*;
56-
pub use self::ViewItem_::*;
5756
pub use self::ViewPath_::*;
5857
pub use self::Visibility::*;
5958
pub use self::PathParameters::*;
@@ -511,7 +510,6 @@ impl PartialEq for MetaItem_ {
511510

512511
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
513512
pub struct Block {
514-
pub view_items: Vec<ViewItem>,
515513
pub stmts: Vec<P<Stmt>>,
516514
pub expr: Option<P<Expr>>,
517515
pub id: NodeId,
@@ -1452,14 +1450,12 @@ pub struct Mod {
14521450
/// For `mod foo;`, the inner span ranges from the first token
14531451
/// to the last token in the external file.
14541452
pub inner: Span,
1455-
pub view_items: Vec<ViewItem>,
14561453
pub items: Vec<P<Item>>,
14571454
}
14581455

14591456
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
14601457
pub struct ForeignMod {
14611458
pub abi: Abi,
1462-
pub view_items: Vec<ViewItem>,
14631459
pub items: Vec<P<ForeignItem>>,
14641460
}
14651461

@@ -1518,44 +1514,13 @@ pub enum ViewPath_ {
15181514
/// or just
15191515
///
15201516
/// `foo::bar::baz` (with `as baz` implicitly on the right)
1521-
ViewPathSimple(Ident, Path, NodeId),
1517+
ViewPathSimple(Ident, Path),
15221518

15231519
/// `foo::bar::*`
1524-
ViewPathGlob(Path, NodeId),
1520+
ViewPathGlob(Path),
15251521

15261522
/// `foo::bar::{a,b,c}`
1527-
ViewPathList(Path, Vec<PathListItem> , NodeId)
1528-
}
1529-
1530-
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
1531-
pub struct ViewItem {
1532-
pub node: ViewItem_,
1533-
pub attrs: Vec<Attribute>,
1534-
pub vis: Visibility,
1535-
pub span: Span,
1536-
}
1537-
1538-
impl ViewItem {
1539-
pub fn id(&self) -> NodeId {
1540-
match self.node {
1541-
ViewItemExternCrate(_, _, id) => id,
1542-
ViewItemUse(ref vp) => match vp.node {
1543-
ViewPathSimple(_, _, id) => id,
1544-
ViewPathGlob(_, id) => id,
1545-
ViewPathList(_, _, id) => id,
1546-
}
1547-
}
1548-
}
1549-
}
1550-
1551-
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
1552-
pub enum ViewItem_ {
1553-
/// Ident: name used to refer to this crate in the code
1554-
/// optional (InternedString,StrStyle): if present, this is a location
1555-
/// (containing arbitrary characters) from which to fetch the crate sources
1556-
/// For example, extern crate whatever = "github.com/rust-lang/rust"
1557-
ViewItemExternCrate(Ident, Option<(InternedString,StrStyle)>, NodeId),
1558-
ViewItemUse(P<ViewPath>),
1523+
ViewPathList(Path, Vec<PathListItem>)
15591524
}
15601525

15611526
/// Meta-data associated with an item
@@ -1677,6 +1642,12 @@ pub struct Item {
16771642

16781643
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
16791644
pub enum Item_ {
1645+
// Optional location (containing arbitrary characters) from which
1646+
// to fetch the crate sources.
1647+
// For example, extern crate whatever = "github.com/rust-lang/rust".
1648+
ItemExternCrate(Option<(InternedString, StrStyle)>),
1649+
ItemUse(P<ViewPath>),
1650+
16801651
ItemStatic(P<Ty>, Mutability, P<Expr>),
16811652
ItemConst(P<Ty>, P<Expr>),
16821653
ItemFn(P<FnDecl>, Unsafety, Abi, Generics, P<Block>),
@@ -1703,6 +1674,8 @@ pub enum Item_ {
17031674
impl Item_ {
17041675
pub fn descriptive_variant(&self) -> &str {
17051676
match *self {
1677+
ItemExternCrate(..) => "extern crate",
1678+
ItemUse(..) => "use",
17061679
ItemStatic(..) => "static item",
17071680
ItemConst(..) => "constant item",
17081681
ItemFn(..) => "function",

0 commit comments

Comments
 (0)