fix rebase
This commit is contained in:
parent
2e2f82053f
commit
d0d30b0a3e
@ -1,13 +1,13 @@
|
||||
//! Error Reporting for `impl` items that do not match the obligations from their `trait`.
|
||||
|
||||
use crate::hir;
|
||||
use crate::hir::def_id::DefId;
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::infer::{Subtype, ValuePairs};
|
||||
use crate::traits::ObligationCauseCode::CompareImplMethodObligation;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_errors::ErrorReported;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::ItemKind;
|
||||
use rustc_middle::ty::error::ExpectedFound;
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
@ -85,7 +85,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
if let Some(id) = tcx.hir().as_local_hir_id(trait_def_id) {
|
||||
let parent_id = tcx.hir().get_parent_item(id);
|
||||
let trait_item = tcx.hir().expect_item(parent_id);
|
||||
if let hir::ItemKind::Trait(_, _, generics, _, _) = &trait_item.kind {
|
||||
if let ItemKind::Trait(_, _, generics, _, _) = &trait_item.kind {
|
||||
for param_ty in visitor.0 {
|
||||
if let Some(generic) = generics.get_named(param_ty.name) {
|
||||
err.span_label(generic.span, &format!(
|
||||
|
@ -87,8 +87,8 @@ note: ...so that the types are compatible
|
||||
|
|
||||
LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: expected `Publisher<'_>`
|
||||
found `Publisher<'_>`
|
||||
= note: expected `Publisher<'_>`
|
||||
found `Publisher<'_>`
|
||||
|
||||
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
|
||||
--> $DIR/issue-20831-debruijn.rs:28:33
|
||||
|
@ -63,8 +63,8 @@ LL | | where <() as Project<'a, 'b>>::Item : Eq
|
||||
LL | | {
|
||||
LL | | }
|
||||
| |_^
|
||||
= note: expected `Project<'a, 'b>`
|
||||
found `Project<'_, '_>`
|
||||
= note: expected `Project<'a, 'b>`
|
||||
found `Project<'_, '_>`
|
||||
|
||||
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
|
||||
--> $DIR/regions-normalize-in-where-clause-list.rs:22:4
|
||||
@ -87,8 +87,8 @@ note: ...so that the types are compatible
|
||||
|
|
||||
LL | fn bar<'a, 'b>()
|
||||
| ^^^
|
||||
= note: expected `Project<'a, 'b>`
|
||||
found `Project<'_, '_>`
|
||||
= note: expected `Project<'a, 'b>`
|
||||
found `Project<'_, '_>`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user