span: move MultiSpan
`MultiSpan` contains labels, which are more complicated with the introduction of diagnostic translation and will use types from `rustc_errors` - however, `rustc_errors` depends on `rustc_span` so `rustc_span` cannot use types like `DiagnosticMessage` without dependency cycles. Introduce a new `rustc_error_messages` crate that can contain `DiagnosticMessage` and `MultiSpan`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
@@ -2,11 +2,11 @@ use super::ObjectSafetyViolation;
|
||||
|
||||
use crate::infer::InferCtxt;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder, ErrorGuaranteed};
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder, ErrorGuaranteed, MultiSpan};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::{MultiSpan, Span};
|
||||
use rustc_span::Span;
|
||||
use std::fmt;
|
||||
use std::iter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user