use rustc_data_structures::unify::{self, UnificationTable};
use std::cell::{RefCell, Ref};
use std::fmt;
-use std::rc::Rc;
use syntax::ast;
use syntax::codemap;
use syntax::codemap::{Span, DUMMY_SP};
/// See `error_reporting.rs` for more details
#[derive(Clone, Debug)]
pub enum SubregionOrigin<'tcx> {
- // Marker to indicate a constraint that only arises due to new
- // provisions from RFC 1214. This will result in a warning, not an
- // error.
- RFC1214Subregion(Rc<SubregionOrigin<'tcx>>),
-
// Arose from a subtyping relation
Subtype(TypeTrace<'tcx>),
impl<'tcx> SubregionOrigin<'tcx> {
pub fn span(&self) -> Span {
match *self {
- RFC1214Subregion(ref a) => a.span(),
Subtype(ref a) => a.span(),
InfStackClosure(a) => a,
InvokeClosure(a) => a,