]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #101936 - IntQuant:issue-100717-infer-4, r=compiler-errors
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 7 Jan 2023 19:43:18 +0000 (20:43 +0100)
committerGitHub <noreply@github.com>
Sat, 7 Jan 2023 19:43:18 +0000 (20:43 +0100)
Migrating rustc_infer to session diagnostics (part 3)

``@rustbot`` label +A-translation
r? rust-lang/diagnostics
cc https://github.com/rust-lang/rust/issues/100717

Seems like a part of static_impl_trait.rs emits suggestions in a loop, and note.rs needs to have two instances of the same subdiagnostic, so these will need to wait until we have eager translation/list support.
Other than that, there is only error_reporting/mod.rs left to migrate.

1  2 
compiler/rustc_infer/src/errors/mod.rs
compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs
compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs

index 94662780c36e927a5a8125a09a54db3092da346a,8a6dadf935f426fda693422883cb681f6934afeb..fb0f09198ccc185330064cb2b7df525d1048f26c
@@@ -5,13 -9,10 +9,13 @@@ use crate::infer::lexical_region_resolv
  use crate::infer::{SubregionOrigin, TypeTrace};
  use crate::traits::{ObligationCauseCode, UnifyReceiverContext};
  use rustc_data_structures::fx::FxIndexSet;
- use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorGuaranteed, MultiSpan};
+ use rustc_errors::{AddToDiagnostic, Applicability, Diagnostic, ErrorGuaranteed, MultiSpan};
  use rustc_hir::def_id::DefId;
  use rustc_hir::intravisit::{walk_ty, Visitor};
 -use rustc_hir::{self as hir, GenericBound, Item, ItemKind, Lifetime, LifetimeName, Node, TyKind};
 +use rustc_hir::{
 +    self as hir, GenericBound, GenericParamKind, Item, ItemKind, Lifetime, LifetimeName, Node,
 +    TyKind,
 +};
  use rustc_middle::ty::{
      self, AssocItemContainer, StaticLifetimeVisitor, Ty, TyCtxt, TypeSuperVisitable, TypeVisitor,
  };