Skip to content

Commit 13f0f49

Browse files
committed
Drop unneeded mut
These parameters don't get modified.
1 parent 9832374 commit 13f0f49

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_ast_pretty/src/pp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl Printer {
390390
self.scan_stack.pop_front().unwrap()
391391
}
392392

393-
fn scan_top(&mut self) -> usize {
393+
fn scan_top(&self) -> usize {
394394
*self.scan_stack.front().unwrap()
395395
}
396396

@@ -484,7 +484,7 @@ impl Printer {
484484
self.pending_indentation += amount;
485485
}
486486

487-
fn get_top(&mut self) -> PrintStackElem {
487+
fn get_top(&self) -> PrintStackElem {
488488
*self.print_stack.last().unwrap_or({
489489
&PrintStackElem { offset: 0, pbreak: PrintStackBreak::Broken(Breaks::Inconsistent) }
490490
})

compiler/rustc_ast_pretty/src/pprust/state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<'a> Comments<'a> {
6363
}
6464

6565
pub fn trailing_comment(
66-
&mut self,
66+
&self,
6767
span: rustc_span::Span,
6868
next_pos: Option<BytePos>,
6969
) -> Option<Comment> {

0 commit comments

Comments
 (0)