Remove dead code stemming from the old effects desugaring
This commit is contained in:
@@ -821,8 +821,7 @@ pub(super) fn check_specialization_validity<'tcx>(
|
||||
let result = opt_result.unwrap_or(Ok(()));
|
||||
|
||||
if let Err(parent_impl) = result {
|
||||
// FIXME(effects) the associated type from effects could be specialized
|
||||
if !tcx.is_impl_trait_in_trait(impl_item) && !tcx.is_effects_desugared_assoc_ty(impl_item) {
|
||||
if !tcx.is_impl_trait_in_trait(impl_item) {
|
||||
report_forbidden_specialization(tcx, impl_item, parent_impl);
|
||||
} else {
|
||||
tcx.dcx().delayed_bug(format!("parent item: {parent_impl:?} not marked as default"));
|
||||
|
||||
@@ -2042,7 +2042,7 @@ pub(super) fn check_type_bounds<'tcx>(
|
||||
// A synthetic impl Trait for RPITIT desugaring or assoc type for effects desugaring has no HIR,
|
||||
// which we currently use to get the span for an impl's associated type. Instead, for these,
|
||||
// use the def_span for the synthesized associated type.
|
||||
let impl_ty_span = if impl_ty.is_impl_trait_in_trait() || impl_ty.is_effects_desugaring {
|
||||
let impl_ty_span = if impl_ty.is_impl_trait_in_trait() {
|
||||
tcx.def_span(impl_ty_def_id)
|
||||
} else {
|
||||
match tcx.hir_node_by_def_id(impl_ty_def_id) {
|
||||
|
||||
Reference in New Issue
Block a user