Rollup merge of #142458 - oli-obk:dyn-incompat, r=compiler-errors
Merge unboxed trait object error suggestion into regular dyn incompat error Another hir-walker removed from the well-formed queries. This error was always a duplicate of another, but it was able to provide more information because it could invoke `is_dyn_compatible` without worrying about cycle errors. That's also the reason we can't put the error directly into hir_ty_lowering when lowering a `dyn Trait` within an associated item signature. So instead I packed it into the error handling of wf obligation checking.
This commit is contained in:
@@ -31,7 +31,7 @@ use crate::traits::{
|
||||
///
|
||||
/// Currently that is `Self` in supertraits. This is needed
|
||||
/// because `dyn_compatibility_violations` can't be used during
|
||||
/// type collection.
|
||||
/// type collection, as type collection is needed for `dyn_compatiblity_violations` itself.
|
||||
#[instrument(level = "debug", skip(tcx), ret)]
|
||||
pub fn hir_ty_lowering_dyn_compatibility_violations(
|
||||
tcx: TyCtxt<'_>,
|
||||
|
||||
Reference in New Issue
Block a user