use syntax::abi;
use syntax::ast;
-use syntax::owned_slice::OwnedSlice;
use syntax::codemap::{self, CodeMap, BytePos, Spanned};
-use syntax::diagnostic;
+use syntax::errors;
use syntax::parse::token::{self, BinOpToken};
use syntax::parse::lexer::comments;
use syntax::parse;
/// it can scan the input text for comments and literals to
/// copy forward.
pub fn print_crate<'a>(cm: &'a CodeMap,
- span_diagnostic: &diagnostic::SpanHandler,
+ span_diagnostic: &errors::Handler,
krate: &hir::Crate,
filename: String,
input: &mut Read,
impl<'a> State<'a> {
pub fn new_from_input(cm: &'a CodeMap,
- span_diagnostic: &diagnostic::SpanHandler,
+ span_diagnostic: &errors::Handler,
filename: String,
input: &mut Read,
out: Box<Write + 'a>,
hir::TyBareFn(ref f) => {
let generics = hir::Generics {
lifetimes: f.lifetimes.clone(),
- ty_params: OwnedSlice::empty(),
+ ty_params: P::empty(),
where_clause: hir::WhereClause {
id: ast::DUMMY_NODE_ID,
- predicates: Vec::new(),
+ predicates: hir::HirVec::new(),
},
};
try!(self.print_ty_fn(f.abi, f.unsafety, &*f.decl, None, &generics, None));
try!(self.print_generics(generics));
}
let generics = hir::Generics {
- lifetimes: Vec::new(),
- ty_params: OwnedSlice::empty(),
+ lifetimes: hir::HirVec::new(),
+ ty_params: P::empty(),
where_clause: hir::WhereClause {
id: ast::DUMMY_NODE_ID,
- predicates: Vec::new(),
+ predicates: hir::HirVec::new(),
},
};
try!(self.print_fn(decl,