1
Fork 0

Auto merge of #89405 - GuillaumeGomez:fix-clippy-lints, r=cjgillot

Fix clippy lints

I'm currently working on allowing clippy to run on librustdoc after a discussion I had with `@Mark-Simulacrum.` So in the meantime, I fixed a few lints on the compiler crates.
This commit is contained in:
bors 2021-10-02 10:52:09 +00:00
commit b27661eb33
61 changed files with 458 additions and 506 deletions

View file

@ -296,7 +296,7 @@ struct TypedAnnotation<'tcx> {
impl<'tcx> HirPrinterSupport<'tcx> for TypedAnnotation<'tcx> {
fn sess(&self) -> &Session {
&self.tcx.sess
self.tcx.sess
}
fn hir_map(&self) -> Option<hir_map::Map<'tcx>> {
@ -347,8 +347,7 @@ impl<'tcx> pprust_hir::PpAnn for TypedAnnotation<'tcx> {
fn get_source(input: &Input, sess: &Session) -> (String, FileName) {
let src_name = input.source_name();
let src = String::clone(
&sess
.source_map()
sess.source_map()
.get_source_file(&src_name)
.expect("get_source_file")
.src