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

Commit

Permalink
Merge pull request #3 from Gyscos/cutting_edge
Browse files Browse the repository at this point in the history
Cutting edge
  • Loading branch information
richo committed Apr 12, 2016
2 parents e09fa3c + 66d05d3 commit ba3a16a
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 22 deletions.
4 changes: 1 addition & 3 deletions ioreg/src/builder/getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use std::iter::FromIterator;
use std::ops::Deref;

use syntax::ast;
use syntax::parse::token;
use syntax::ptr::P;
use syntax::ext::base::ExtCtxt;
use syntax::codemap::{respan, Span};
Expand Down Expand Up @@ -139,7 +138,7 @@ fn from_primitive(cx: &ExtCtxt, path: &Vec<String>, _: &node::Reg,
let val: u64 = v.value.node;
let lit = cx.expr_lit(
v.value.span,
ast::LitKind::Int(val, ast::LitIntType::Unsigned(ast::UintTy::Us)));
ast::LitKind::Int(val, ast::LitIntType::Unsigned(ast::UintTy::U32)));
let arm = ast::Arm {
attrs: vec!(),
pats: vec!(
Expand Down Expand Up @@ -197,7 +196,6 @@ fn build_impl(cx: &ExtCtxt, path: &Vec<String>, reg: &node::Reg,

let it = quote_item!(cx,
#[allow(dead_code)]
#[inline(always)]
impl $getter_ty {
$new
$getters
Expand Down
1 change: 0 additions & 1 deletion ioreg/src/builder/setter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ fn build_impl(cx: &ExtCtxt, path: &Vec<String>, reg: &node::Reg,
let done = build_done(cx, path);
quote_item!(cx,
#[allow(dead_code)]
#[inline(always)]
impl<'a> $setter_ident<'a> {
$new
$new_is
Expand Down
2 changes: 1 addition & 1 deletion ioreg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ N => NAME
*/

#![feature(quote, plugin_registrar, rustc_private, convert)]
#![feature(quote, plugin_registrar, rustc_private)]
#![feature(plugin)]

#![plugin(syntaxext_lint)]
Expand Down
8 changes: 4 additions & 4 deletions macro_platformtree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(rustc_private, plugin_registrar, quote, convert)]
#![feature(rustc_private, plugin_registrar, quote)]

extern crate platformtree;
extern crate rustc;
Expand Down Expand Up @@ -76,7 +76,7 @@ fn macro_zinc_task(cx: &mut ExtCtxt, _: Span, _: &ast::MetaItem,

fn macro_zinc_task_item(cx: &mut ExtCtxt, it: P<ast::Item>) -> P<ast::Item> {
match it.node {
ast::ItemFn(ref decl, style, constness, abi, _, ref block) => {
ast::ItemKind::Fn(ref decl, style, constness, abi, _, ref block) => {
let istr = it.ident.name.as_str();
let fn_name = &*istr;
let ty_params = platformtree::builder::meta_args::get_ty_params_for_task(cx, fn_name);
Expand All @@ -103,7 +103,7 @@ fn macro_zinc_task_item(cx: &mut ExtCtxt, it: P<ast::Item>) -> P<ast::Item> {
}).collect(),
vec!())),
None,
ast::MutImmutable));
ast::Mutability::Immutable));
let new_decl = P(ast::FnDecl {
inputs: vec!(new_arg),
..decl.deref().clone()
Expand All @@ -117,7 +117,7 @@ fn macro_zinc_task_item(cx: &mut ExtCtxt, it: P<ast::Item>) -> P<ast::Item> {
predicates: vec!(),
}
};
let new_node = ast::ItemFn(new_decl, style, constness, abi, new_generics, block.clone());
let new_node = ast::ItemKind::Fn(new_decl, style, constness, abi, new_generics, block.clone());

P(ast::Item {node: new_node, ..it.deref().clone() })
},
Expand Down
8 changes: 5 additions & 3 deletions platformtree/src/builder/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@ fn build_args(builder: &mut Builder, cx: &mut ExtCtxt,
},
};
let name_ident = cx.ident_of(k.as_str());
let sf = ast::StructField_ {
kind: ast::NamedField(name_ident, ast::Visibility::Public),
let sf = ast::StructField {
span: DUMMY_SP,
ident: Some(name_ident),
vis: ast::Visibility::Public,
id: ast::DUMMY_NODE_ID,
ty: ty,
attrs: vec!(),
};

fields.push(respan(DUMMY_SP, sf));
fields.push(sf);
expr_fields.push(cx.field_imm(DUMMY_SP, name_ident, val));
}

Expand Down
2 changes: 1 addition & 1 deletion platformtree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

//! Platform tree operations crate
#![feature(quote, rustc_private, convert)]
#![feature(quote, rustc_private)]

// extern crate regex;
extern crate syntax;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// limitations under the License.

#![feature(asm, lang_items, plugin)]
#![feature(core_intrinsics, core_slice_ext, core_str_ext)]
#![feature(core_intrinsics, core_slice_ext)]
#![allow(improper_ctypes)]
#![feature(const_fn)]
#![deny(missing_docs)]
Expand Down
8 changes: 0 additions & 8 deletions src/util/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,10 @@
#[cfg(all(not(test), not(feature = "test")))]
use core::fmt::Arguments;

#[cfg(all(not(test), not(feature = "test")))]
#[lang="stack_exhausted"]
extern fn stack_exhausted() {}

#[cfg(all(not(test), not(feature = "test")))]
#[lang="eh_personality"]
extern fn eh_personality() {}

#[cfg(all(not(test), not(feature = "test")))]
#[lang="begin_unwind"]
extern fn begin_unwind() {}

#[cfg(all(not(test), not(feature = "test")))]
#[lang="panic_fmt"]
pub fn panic_fmt(_fmt: &Arguments, _file_line: &(&'static str, usize)) -> ! {
Expand Down

0 comments on commit ba3a16a

Please sign in to comment.