@@ -69,11 +69,6 @@ impl<'a> ProgramInfo<'a> {
6969 }
7070 }
7171
72- #[ inline]
73- pub fn program ( & self ) -> & ' a Program < ' a > {
74- self . program
75- }
76-
7772 #[ inline]
7873 pub fn text_info ( & self ) -> & ' a SourceTextInfo {
7974 self . text_info
@@ -204,11 +199,6 @@ impl<'a> CommentsIterator<'a> {
204199 self . comments . extend ( other) ;
205200 }
206201
207- /// Remaining comments without consuming the iterator.
208- pub fn as_slice ( & self ) -> & [ & ' a Comment ] {
209- & self . comments [ self . index ..]
210- }
211-
212202 /// The last remaining comment without consuming the iterator.
213203 pub fn peek_last_comment ( & self ) -> Option < & ' a Comment > {
214204 self . comments [ self . index ..] . last ( ) . copied ( )
@@ -401,10 +391,8 @@ impl RangeContains for SourceRange {
401391/// code invoked directly on positions live here. There's no ambiguity with
402392/// `SourceRanged` because `u32` doesn't implement `GetSpan`.
403393pub trait PosExt {
404- fn as_source_pos ( & self ) -> SourcePos ;
405394 fn range ( & self ) -> SourceRange ;
406395 fn start ( & self ) -> SourcePos ;
407- fn end ( & self ) -> SourcePos ;
408396 fn start_line_fast ( & self , program : ProgramInfo ) -> usize ;
409397 fn end_line_fast ( & self , program : ProgramInfo ) -> usize ;
410398 fn start_column_fast ( & self , program : ProgramInfo ) -> usize ;
@@ -416,11 +404,6 @@ pub trait PosExt {
416404}
417405
418406impl PosExt for SourcePos {
419- #[ inline]
420- fn as_source_pos ( & self ) -> SourcePos {
421- * self
422- }
423-
424407 #[ inline]
425408 fn range ( & self ) -> SourceRange {
426409 SourceRange :: new ( * self , * self )
@@ -431,11 +414,6 @@ impl PosExt for SourcePos {
431414 * self
432415 }
433416
434- #[ inline]
435- fn end ( & self ) -> SourcePos {
436- * self
437- }
438-
439417 fn start_line_fast ( & self , program : ProgramInfo ) -> usize {
440418 self . line_fast ( program)
441419 }
0 commit comments