about summary refs log tree commit diff
path: root/compiler/rustc_span/src/lib.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2021-01-07 15:23:25 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2021-01-07 16:09:47 +0300
commit3ff866ed7c814add27d32a31caaf29fa44cb53f5 (patch)
tree48c882cc3f441cc7d0bfa43cea262d0c251ef180 /compiler/rustc_span/src/lib.rs
parentbf5f30684a732dbe529cc5ccc031e1fa9e746a2e (diff)
downloadrust-3ff866ed7c814add27d32a31caaf29fa44cb53f5.tar.gz
rust-3ff866ed7c814add27d32a31caaf29fa44cb53f5.zip
resolve: Scope visiting doesn't need an `Ident`
Diffstat (limited to 'compiler/rustc_span/src/lib.rs')
-rw-r--r--compiler/rustc_span/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 99f01062545..62ca7b066d9 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -301,6 +301,10 @@ pub struct SpanData {
 
 impl SpanData {
     #[inline]
+    pub fn span(&self) -> Span {
+        Span::new(self.lo, self.hi, self.ctxt)
+    }
+    #[inline]
     pub fn with_lo(&self, lo: BytePos) -> Span {
         Span::new(lo, self.hi, self.ctxt)
     }
@@ -468,7 +472,7 @@ impl Span {
 
     /// Edition of the crate from which this span came.
     pub fn edition(self) -> edition::Edition {
-        self.ctxt().outer_expn_data().edition
+        self.ctxt().edition()
     }
 
     #[inline]