Skip to content

Commit 115c0f6

Browse files
committed
---
yaml --- r: 104441 b: refs/heads/try c: 0135b52 h: refs/heads/master i: 104439: e6ce033 v: v3
1 parent c8bfb64 commit 115c0f6

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: bb8721da69e4c54fc2e22c3352d74c406e817049
5+
refs/heads/try: 0135b521ad38615e9a07aac54d9c22627af57ca4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libsyntax/ext/build.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ pub trait AstBuilder {
242242

243243
fn view_use(&self, sp: Span,
244244
vis: ast::Visibility, vp: ~[@ast::ViewPath]) -> ast::ViewItem;
245+
fn view_use_simple(&self, sp: Span, vis: ast::Visibility, path: ast::Path) -> ast::ViewItem;
246+
fn view_use_simple_(&self, sp: Span, vis: ast::Visibility,
247+
ident: ast::Ident, path: ast::Path) -> ast::ViewItem;
245248
fn view_use_list(&self, sp: Span, vis: ast::Visibility,
246249
path: ~[ast::Ident], imports: &[ast::Ident]) -> ast::ViewItem;
247250
fn view_use_glob(&self, sp: Span,
@@ -900,6 +903,20 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
900903
}
901904
}
902905

906+
fn view_use_simple(&self, sp: Span, vis: ast::Visibility, path: ast::Path) -> ast::ViewItem {
907+
let last = path.segments.last().unwrap().identifier;
908+
self.view_use_simple_(sp, vis, last, path)
909+
}
910+
911+
fn view_use_simple_(&self, sp: Span, vis: ast::Visibility,
912+
ident: ast::Ident, path: ast::Path) -> ast::ViewItem {
913+
self.view_use(sp, vis,
914+
~[@respan(sp,
915+
ast::ViewPathSimple(ident,
916+
path,
917+
ast::DUMMY_NODE_ID))])
918+
}
919+
903920
fn view_use_list(&self, sp: Span, vis: ast::Visibility,
904921
path: ~[ast::Ident], imports: &[ast::Ident]) -> ast::ViewItem {
905922
let imports = imports.map(|id| {

0 commit comments

Comments
 (0)