This commit is contained in:
Michael Wright 2019-01-20 10:14:23 +02:00
parent e648adf086
commit 77b71a1af2

View File

@ -5,7 +5,7 @@
use std::borrow::Cow;
use syntax::ast::*;
use syntax::parse::{parser, token};
use syntax::tokenstream::{ThinTokenStream, TokenStream};
use syntax::tokenstream::TokenStream;
/// **What it does:** This lint warns when you use `println!("")` to
/// print a newline.
@ -261,9 +261,9 @@ fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &Mac) {
/// ```rust,ignore
/// (Some("string to write: {}"), Some(buf))
/// ```
fn check_tts<'a>(cx: &EarlyContext<'a>, tts: &ThinTokenStream, is_write: bool) -> (Option<String>, Option<Expr>) {
fn check_tts<'a>(cx: &EarlyContext<'a>, tts: &TokenStream, is_write: bool) -> (Option<String>, Option<Expr>) {
use fmt_macros::*;
let tts = TokenStream::from(tts.clone());
let tts = tts.clone();
let mut parser = parser::Parser::new(&cx.sess.parse_sess, tts, None, false, false);
let mut expr: Option<Expr> = None;
if is_write {