From 05329e578014ee1e9a0a45658e5fba60f6b06e83 Mon Sep 17 00:00:00 2001 From: Tommy Ip Date: Thu, 4 May 2017 13:14:39 +0100 Subject: [PATCH] Remove use of `Self: Sized` from libsyntax The bound is not required for compiling but it prevents using `next_token()` from a trait object. Fixes #33506. --- src/libsyntax/parse/lexer/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index c2e5763237d3c..7d2a1b3c4a4d2 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -73,7 +73,7 @@ fn mk_sp(lo: BytePos, hi: BytePos) -> Span { } impl<'a> StringReader<'a> { - fn next_token(&mut self) -> TokenAndSpan where Self: Sized { + fn next_token(&mut self) -> TokenAndSpan { let res = self.try_next_token(); self.unwrap_or_abort(res) }