Rollup merge of #41746 - tommyip:master, r=petrochenkov

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:
Corey Farwell 2017-05-04 21:35:29 -04:00 committed by GitHub
commit a9b0b5e4c3

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