nits
This commit is contained in:
parent
f8931a7933
commit
d075faa2ed
@ -120,7 +120,7 @@ impl<'a, 'tcx> Implicator<'a, 'tcx> {
|
||||
//
|
||||
// Note that `p` (and `'a`) are not used in the
|
||||
// closure at all, but to meet the requirement that
|
||||
// the closure type `C: 'static` (so it can be coerce
|
||||
// the closure type `C: 'static` (so it can be coerced
|
||||
// to the object type), we get the requirement that
|
||||
// `'a: 'static` since `'a` appears in the closure
|
||||
// type `C`.
|
||||
|
@ -1162,10 +1162,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
/// these unconstrained type variables.
|
||||
fn resolve_type_vars_or_error(&self, t: &Ty<'tcx>) -> mc::McResult<Ty<'tcx>> {
|
||||
let ty = self.resolve_type_vars_if_possible(t);
|
||||
if ty.references_error() {
|
||||
debug!("resolve_type_vars_or_error: error from {:?}", ty);
|
||||
Err(())
|
||||
} else if ty.is_ty_var() {
|
||||
if ty.references_error() || ty.is_ty_var() {
|
||||
debug!("resolve_type_vars_or_error: error from {:?}", ty);
|
||||
Err(())
|
||||
} else {
|
||||
|
@ -1857,9 +1857,9 @@ pub enum TypeVariants<'tcx> {
|
||||
/// closures from capturing themselves (except via a trait
|
||||
/// object). This simplifies closure inference considerably, since it
|
||||
/// means that when we infer the kind of a closure or its upvars, we
|
||||
/// don't have to handles cycles where the decisions we make wind up
|
||||
/// for closure C wind up influencing the decisions we ought to make
|
||||
/// for closure C (which would then require fixed point iteration to
|
||||
/// don't have to handle cycles where the decisions we make for
|
||||
/// closure C wind up influencing the decisions we ought to make for
|
||||
/// closure C (which would then require fixed point iteration to
|
||||
/// handle). Plus it fixes an ICE. :P
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub struct ClosureSubsts<'tcx> {
|
||||
@ -7158,8 +7158,6 @@ impl<'tcx> HasTypeFlags for ClosureSubsts<'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
impl<'tcx> fmt::Debug for ClosureTy<'tcx> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "ClosureTy({},{:?},{})",
|
||||
|
@ -138,7 +138,7 @@ pub fn get_or_create_closure_declaration<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
|
||||
};
|
||||
|
||||
if let Some(&llfn) = ccx.closure_vals().borrow().get(&mono_id) {
|
||||
debug!("get_or_create_declaration_if_closure(): found closure {:?}: {:?}",
|
||||
debug!("get_or_create_closure_declaration(): found closure {:?}: {:?}",
|
||||
mono_id, ccx.tn().val_to_string(llfn));
|
||||
return llfn;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user