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.
This commit is contained in:
Tommy Ip
2017-05-04 13:14:39 +01:00
parent b16c7a235f
commit 05329e5780

View File

@@ -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)
}