|
1 | 1 | use std::ops::ControlFlow;
|
2 | 2 |
|
3 |
| -use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; |
| 3 | +use rustc_data_structures::fx::FxIndexSet; |
4 | 4 | use rustc_errors::codes::*;
|
5 | 5 | use rustc_errors::struct_span_code_err;
|
6 | 6 | use rustc_hir as hir;
|
@@ -511,14 +511,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
511 | 511 | /// the `trait_ref` here will be `for<'a> T: Iterator`.
|
512 | 512 | /// The `constraint` data however is from *inside* the binder
|
513 | 513 | /// (e.g., `&'a u32`) and hence may reference bound regions.
|
514 |
| - #[instrument(level = "debug", skip(self, bounds, duplicates, path_span))] |
| 514 | + #[instrument(level = "debug", skip(self, bounds, path_span))] |
515 | 515 | pub(super) fn lower_assoc_item_constraint(
|
516 | 516 | &self,
|
517 | 517 | hir_ref_id: hir::HirId,
|
518 | 518 | trait_ref: ty::PolyTraitRef<'tcx>,
|
519 | 519 | constraint: &hir::AssocItemConstraint<'tcx>,
|
520 | 520 | bounds: &mut Vec<(ty::Clause<'tcx>, Span)>,
|
521 |
| - duplicates: &mut FxIndexMap<DefId, Span>, |
522 | 521 | path_span: Span,
|
523 | 522 | predicate_filter: PredicateFilter,
|
524 | 523 | ) -> Result<(), ErrorGuaranteed> {
|
@@ -574,18 +573,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
574 | 573 | )
|
575 | 574 | .expect("failed to find associated item");
|
576 | 575 |
|
577 |
| - duplicates |
578 |
| - .entry(assoc_item.def_id) |
579 |
| - .and_modify(|prev_span| { |
580 |
| - self.dcx().emit_err(errors::ValueOfAssociatedStructAlreadySpecified { |
581 |
| - span: constraint.span, |
582 |
| - prev_span: *prev_span, |
583 |
| - item_name: constraint.ident, |
584 |
| - def_path: tcx.def_path_str(assoc_item.container_id(tcx)), |
585 |
| - }); |
586 |
| - }) |
587 |
| - .or_insert(constraint.span); |
588 |
| - |
589 | 576 | let projection_term = if let ty::AssocTag::Fn = assoc_tag {
|
590 | 577 | let bound_vars = tcx.late_bound_vars(constraint.hir_id);
|
591 | 578 | ty::Binder::bind_with_vars(
|
|
0 commit comments