Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit 2af9fe6

Browse files
committed
Merge pull request #138 from farcaller/fix-nightly
Fixes for nightly fallout Reviewed-by: farcaller
2 parents be654f4 + ccc0e63 commit 2af9fe6

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

ioreg/builder/register.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use std::gc::GC;
1717
use std::iter::FromIterator;
1818
use syntax::ast;
1919
use syntax::ast::P;
20+
use syntax::ast_util::empty_generics;
2021
use syntax::codemap::{respan, mk_sp};
2122
use syntax::ext::base::ExtCtxt;
2223
use syntax::ext::build::AstBuilder;
@@ -80,7 +81,7 @@ fn build_field_type<'a>(cx: &'a ExtCtxt, path: &Vec<String>,
8081
let item: P<ast::Item> = box(GC) ast::Item {
8182
ident: name,
8283
id: ast::DUMMY_NODE_ID,
83-
node: ast::ItemEnum(enum_def, utils::no_generics()),
84+
node: ast::ItemEnum(enum_def, empty_generics()),
8485
vis: ast::Public,
8586
attrs: attrs,
8687
span: field.ty.span,

ioreg/builder/union.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use std::gc::{Gc, GC};
1717
use std::iter::FromIterator;
1818
use syntax::ast;
1919
use syntax::ast::P;
20+
use syntax::ast_util::empty_generics;
2021
use syntax::codemap::{DUMMY_SP, dummy_spanned};
2122
use syntax::ext::base::ExtCtxt;
2223
use syntax::ext::build::AstBuilder;
@@ -193,7 +194,7 @@ impl<'a, 'b, 'c> BuildUnionTypes<'a, 'b, 'c> {
193194
ident: self.cx.ident_of(name.node.as_slice()),
194195
attrs: attrs,
195196
id: ast::DUMMY_NODE_ID,
196-
node: ast::ItemStruct(box(GC) struct_def, utils::no_generics()),
197+
node: ast::ItemStruct(box(GC) struct_def, empty_generics()),
197198
vis: ast::Public,
198199
span: name.span,
199200
}

ioreg/builder/utils.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,10 @@ use syntax::ast;
1818
use syntax::ast::P;
1919
use syntax::codemap::DUMMY_SP;
2020
use syntax::ext::build::AstBuilder;
21-
use syntax::owned_slice::OwnedSlice;
2221
use syntax::parse::token;
2322

2423
use super::super::node;
2524

26-
pub fn no_generics() -> ast::Generics {
27-
ast::Generics {
28-
lifetimes: Vec::new(),
29-
ty_params: OwnedSlice::empty()
30-
}
31-
}
32-
3325
/// Generate an unsuffixed integer literal expression with a dummy span
3426
pub fn expr_int<'a>(cx: &'a ExtCtxt, n: i64) -> P<ast::Expr> {
3527
let sign = if n < 0 {ast::Minus} else {ast::Plus};

macro/platformtree.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ fn macro_zinc_task(cx: &mut ExtCtxt, _: Span, _: Gc<ast::MetaItem>,
109109
let new_generics = ast::Generics {
110110
lifetimes: vec!(),
111111
ty_params: OwnedSlice::from_vec(params),
112+
where_clause: ast::WhereClause {
113+
id: ast::DUMMY_NODE_ID,
114+
predicates: vec!(),
115+
}
112116
};
113117
let new_node = ast::ItemFn(new_decl, style, abi, new_generics, block);
114118

platformtree/builder/os.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ fn build_args(builder: &mut Builder, cx: &mut ExtCtxt,
174174
}, ast::Generics {
175175
lifetimes: vec!(cx.lifetime_def(DUMMY_SP, intern("'a"), vec!())),
176176
ty_params: OwnedSlice::from_vec(collected_params),
177+
where_clause: ast::WhereClause {
178+
id: ast::DUMMY_NODE_ID,
179+
predicates: vec!(),
180+
}
177181
}),
178182
vis: ast::Public,
179183
span: DUMMY_SP,

src/drivers/chario.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! Generic char output trait.
1717
1818
use core::str::{Str, StrSlice};
19-
use core::slice::{Vector, ImmutableVector};
19+
use core::slice::{Slice, ImmutableSlice};
2020
use core::collections::Collection;
2121
use core::iter::range;
2222

src/drivers/lcd/c12332.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ might be an issue for any other peripheral sharing the same SPI bus.
2424
*/
2525

2626
use core::cell;
27-
use core::slice::ImmutableVector;
27+
use core::slice::ImmutableSlice;
2828
use core::mem::zeroed;
2929
use core::iter::range;
3030

0 commit comments

Comments
 (0)