]> git.lizzy.rs Git - rust.git/commitdiff
parser: Remove `Deref` impl from `Parser`
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Fri, 7 Jun 2019 10:52:03 +0000 (13:52 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Fri, 7 Jun 2019 10:52:03 +0000 (13:52 +0300)
src/libsyntax/parse/parser.rs

index f36fb0731300c6260cbcf39e105c9738f2f3bfa0..810133326150a661997db4f660ab1729b6c13bfb 100644 (file)
@@ -58,7 +58,6 @@
 use std::borrow::Cow;
 use std::cmp;
 use std::mem;
-use std::ops::Deref;
 use std::path::{self, Path, PathBuf};
 use std::slice;
 
@@ -251,15 +250,6 @@ fn drop(&mut self) {
     }
 }
 
-// FIXME: Parser uses `self.span` all the time.
-// Remove this impl if you think that using `self.token.span` instead is acceptable.
-impl Deref for Parser<'_> {
-    type Target = Token;
-    fn deref(&self) -> &Self::Target {
-        &self.token
-    }
-}
-
 #[derive(Clone)]
 crate struct TokenCursor {
     crate frame: TokenCursorFrame,