nits
This commit is contained in:
parent
ba6c166ee4
commit
25c0cf0a66
6 changed files with 15 additions and 25 deletions
|
@ -65,9 +65,6 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
let span = if span.contains(def_span) { def_span } else { span };
|
||||
let code = traits::ObligationCauseCode::OpaqueReturnType(None);
|
||||
let cause = ObligationCause::new(span, body_id, code);
|
||||
// FIXME(compiler-errors): We probably should add a new TypeVariableOriginKind
|
||||
// for opaque types, and then use that kind to fix the spans for type errors
|
||||
// that we see later on.
|
||||
let ty_var = self.next_ty_var(TypeVariableOrigin { param_def_id: None, span });
|
||||
obligations.extend(
|
||||
self.handle_opaque_type(ty, ty_var, &cause, param_env).unwrap().obligations,
|
||||
|
|
|
@ -37,7 +37,9 @@ pub struct TypeVariableTable<'a, 'tcx> {
|
|||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct TypeVariableOrigin {
|
||||
pub span: Span,
|
||||
// `DefId` of the type parameter this was instantiated for, if any.
|
||||
/// `DefId` of the type parameter this was instantiated for, if any.
|
||||
///
|
||||
/// This should only be used for diagnostics.
|
||||
pub param_def_id: Option<DefId>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue