X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_ast%2Fsrc%2Ftokenstream.rs;h=fabd43a1618a4387fa8af8680fe8a52f17af90d1;hb=5ff6cdca7ec664c7f96653e6c028b524757d60c4;hp=482c302950f01ae7e20b16002afb4b4e114e97f1;hpb=4b6010cbb70bb903c0d69cddaa27e262cef15761;p=rust.git diff --git a/compiler/rustc_ast/src/tokenstream.rs b/compiler/rustc_ast/src/tokenstream.rs index 482c302950f..fabd43a1618 100644 --- a/compiler/rustc_ast/src/tokenstream.rs +++ b/compiler/rustc_ast/src/tokenstream.rs @@ -258,8 +258,7 @@ pub fn to_tokenstream(&self) -> TokenStream { assert!( found, - "Failed to find trailing delimited group in: {:?}", - target_tokens + "Failed to find trailing delimited group in: {target_tokens:?}" ); } let mut flat: SmallVec<[_; 1]> = SmallVec::new(); @@ -362,7 +361,7 @@ pub fn add_comma(&self) -> Option<(TokenStream, Span)> { } } -impl iter::FromIterator for TokenStream { +impl FromIterator for TokenStream { fn from_iter>(iter: I) -> Self { TokenStream::new(iter.into_iter().collect::>()) }