X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_borrowck%2Fsrc%2Fdiagnostics%2Fmod.rs;h=46c85dd6d35e1d6f58a6f8fbb4e6efa0c980a031;hb=53a95ea289941ffeacb95f2ca7a7a7f1a9aae679;hp=42f5d557542088a10d3da5cb673a85f494cd66e7;hpb=616f9efebb49a36bce34aad2a2badb3594a18b28;p=rust.git diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index 42f5d557542..46c85dd6d35 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -19,6 +19,7 @@ use super::borrow_set::BorrowData; use super::MirBorrowckCtxt; +mod find_all_local_uses; mod find_use; mod outlives_suggestion; mod region_name; @@ -408,7 +409,7 @@ fn describe_field_from_ty( /// Add a note that a type does not implement `Copy` pub(super) fn note_type_does_not_implement_copy( &self, - err: &mut DiagnosticBuilder<'a>, + err: &mut DiagnosticBuilder<'_>, place_desc: &str, ty: Ty<'tcx>, span: Option, @@ -732,7 +733,7 @@ pub(super) enum BorrowedContentSource<'tcx> { OverloadedIndex(Ty<'tcx>), } -impl BorrowedContentSource<'tcx> { +impl<'tcx> BorrowedContentSource<'tcx> { pub(super) fn describe_for_unnamed_place(&self, tcx: TyCtxt<'_>) -> String { match *self { BorrowedContentSource::DerefRawPointer => "a raw pointer".to_string(),