Report nicer lifetime errors for specialization

Add an obligation cause for these error so that the error points to the
implementations that caused the error.
This commit is contained in:
Matthew Jasper
2023-05-05 15:52:53 +01:00
parent fafe9e71d5
commit f46eabb9e5
7 changed files with 132 additions and 10 deletions

View File

@@ -54,7 +54,9 @@ pub use self::select::{EvaluationCache, SelectionCache, SelectionContext};
pub use self::select::{EvaluationResult, IntercrateAmbiguityCause, OverflowError};
pub use self::specialize::specialization_graph::FutureCompatOverlapError;
pub use self::specialize::specialization_graph::FutureCompatOverlapErrorKind;
pub use self::specialize::{specialization_graph, translate_substs, OverlapError};
pub use self::specialize::{
specialization_graph, translate_substs, translate_substs_with_cause, OverlapError,
};
pub use self::structural_match::{
search_for_adt_const_param_violation, search_for_structural_match_violation,
};