X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Fcoherence.rs;h=258d2e2d28c9db5db8efc8e8dfcfb9b734d20be0;hb=16938915a46c64dd83f02dee85e5b4eba6891076;hp=7c569621cfeb85ab3b64cd2c2bc05c3b045180f5;hpb=adb8ba3cfe8e3ebf5d6b60858dd18fcc3375b6d4;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 7c569621cfe..258d2e2d28c 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -66,13 +66,13 @@ pub fn add_placeholder_note(err: &mut Diagnostic) { /// with a suitably-freshened `ImplHeader` with those types /// substituted. Otherwise, returns `None`. #[instrument(skip(tcx, skip_leak_check), level = "debug")] -pub fn overlapping_impls<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn overlapping_impls( + tcx: TyCtxt<'_>, impl1_def_id: DefId, impl2_def_id: DefId, skip_leak_check: SkipLeakCheck, overlap_mode: OverlapMode, -) -> Option> { +) -> Option> { // Before doing expensive operations like entering an inference context, do // a quick check via fast_reject to tell if the impl headers could possibly // unify. @@ -283,7 +283,7 @@ fn implicit_negative<'cx, 'tcx>( /// Given impl1 and impl2 check if both impls are never satisfied by a common type (including /// where-clauses) If so, return true, they are disjoint and false otherwise. -fn negative_impl<'tcx>(tcx: TyCtxt<'tcx>, impl1_def_id: DefId, impl2_def_id: DefId) -> bool { +fn negative_impl(tcx: TyCtxt<'_>, impl1_def_id: DefId, impl2_def_id: DefId) -> bool { debug!("negative_impl(impl1_def_id={:?}, impl2_def_id={:?})", impl1_def_id, impl2_def_id); // Create an infcx, taking the predicates of impl1 as assumptions: @@ -749,7 +749,7 @@ fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow { /// /// This means that we can completely ignore constants during the orphan check. /// - /// See `src/test/ui/coherence/const-generics-orphan-check-ok.rs` for examples. + /// See `tests/ui/coherence/const-generics-orphan-check-ok.rs` for examples. /// /// [^1]: This might not hold for function pointers or trait objects in the future. /// As these should be quite rare as const arguments and especially rare as impl