/// Requires you to pass an input filename and reader so that
/// it can scan the input text for comments and literals to
/// copy forward.
Requires you to pass an input filename and reader so that
it can scan the input text for comments and literals to
copy forward.
Requires you to pass an input filename and reader so that 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,
                       krate: &hir::Crate,
                       filename: String,
                       input: &mut Read,
                       out: Box<Write+'a>,
                       ann: &'a PpAnn,
                       is_expanded: bool) -> io::Result<()> {
    let mut s = State::new_from_input(cm,
                                      span_diagnostic,
                                      filename,
                                      input,
                                      out,
                                      ann,
                                      is_expanded);
    // When printing the AST, we sometimes need to inject `#[no_std]` here.
    // Since you can't compile the HIR, it's not necessary.
    try!(s.print_mod(&krate.module, &krate.attrs));
    try!(s.print_remaining_comments());
    eof(&mut s.s)
}
pub fn print_crate < ' a > ( cm : & ' a CodeMap , span_diagnostic : & diagnostic :: SpanHandler , krate : & hir :: Crate , filename : String , input : & mut Read , out : Box < Write + ' a > , ann : & ' a PpAnn , is_expanded : bool ) -> io :: Result < ( ) > { let mut s = State :: new_from_input ( cm , span_diagnostic , filename , input , out , ann , is_expanded ) ; // When printing the AST, we sometimes need to inject `#[no_std]` here. // Since you can't compile the HIR, it's not necessary. try ! ( s print_mod ( krate module krate attrs ) ) ; try ! ( s print_remaining_comments ( ) ) ; eof ( & mut s . s ) }
Requires you to pass an input filename and reader so that
it can scan the input text for comments and literals to
copy forward.
Requires you to pass an input filename and reader so that it can scan the input text for comments and literals to copy forward .
cm
&'a CodeMap
span_diagnostic
&diagnostic::SpanHandler
krate
&hir::Crate
filename
String
input
&mut Read
out
Box<Write+'a>
ann
&'a PpAnn
is_expanded
bool