pub fn rewrite_extern_crate(context: &RewriteContext<'_>, item: &ast::Item) -> Option<String> {
    assert!(is_extern_crate(item));
    let new_str = context.snippet(item.span);
    Some(if contains_comment(new_str) {
        new_str.to_owned()
    } else {
        let no_whitespace = &new_str.split_whitespace().collect::<Vec<&str>>().join(" ");
        String::from(&*Regex::new(r"\s;").unwrap().replace(no_whitespace, ";"))
    })
}
/// Rewrite `extern crate foo;` WITHOUT attributes.
Rewrite `extern crate foo;` WITHOUT attributes.
Rewrite ` extern crate foo ; ` WITHOUT attributes .
pub fn rewrite_extern_crate(context: &RewriteContext<'_>, item: &ast::Item) -> Option<String> {
    assert!(is_extern_crate(item));
    let new_str = context.snippet(item.span);
    Some(if contains_comment(new_str) {
        new_str.to_owned()
    } else {
        let no_whitespace = &new_str.split_whitespace().collect::<Vec<&str>>().join(" ");
        String::from(&*Regex::new(r"\s;").unwrap().replace(no_whitespace, ";"))
    })
}
pub fn rewrite_extern_crate ( context : & RewriteContext < ' _ > , item : & ast :: Item ) -> Option < String > { assert ! ( is_extern_crate ( item ) ) ; let new_str = context . snippet ( item . span ) ; Some ( if contains_comment ( new_str ) { new_str . to_owned ( ) } else { let no_whitespace = & new_str . split_whitespace ( ) . collect :: < Vec < & str > > ( ) . join ( " " ) ; String :: from ( & * Regex :: new ( r"\s;" ) . unwrap ( ) . replace ( no_whitespace , " " ) ) } ) }
Rewrite `extern crate foo;` WITHOUT attributes.
Rewrite ` extern crate foo ; ` WITHOUT attributes .
context
&RewriteContext<'_>
item
&ast::Item
context
&RewriteContext<'_>
item
&ast::Item