From edf1d0c245e7ba4eed4be89101073d8515a0f129 Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Wed, 8 Aug 2012 16:06:43 -0700 Subject: [PATCH] Minor cleanups/comments/whitespace changes --- src/rustc/middle/typeck.rs | 6 ++++-- src/rustc/middle/typeck/coherence.rs | 10 ++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rustc/middle/typeck.rs b/src/rustc/middle/typeck.rs index d2aa73a21f75..aa9942ee1084 100644 --- a/src/rustc/middle/typeck.rs +++ b/src/rustc/middle/typeck.rs @@ -152,16 +152,18 @@ enum vtable_origin { type vtable_map = hashmap; -type ty_param_substs_and_ty = {substs: ty::substs, ty: ty::t}; // Stores information about provided methods, aka "default methods" in traits. // Maps from a trait's def_id to a MethodInfo about // that method in that trait. type provided_methods_map = hashmap; -type ty_table = hashmap; +type ty_param_substs_and_ty = {substs: ty::substs, ty: ty::t}; type crate_ctxt_ = {impl_map: resolve3::ImplMap, + + // A mapping from method call sites to traits that have + // that method. trait_map: resolve3::TraitMap, method_map: method_map, vtable_map: vtable_map, diff --git a/src/rustc/middle/typeck/coherence.rs b/src/rustc/middle/typeck/coherence.rs index 2a74a0767bcb..c732f16dc800 100644 --- a/src/rustc/middle/typeck/coherence.rs +++ b/src/rustc/middle/typeck/coherence.rs @@ -257,7 +257,6 @@ class CoherenceChecker { // Bring in external crates. It's fine for this to happen after the // coherence checks, because we ensure by construction that no errors // can happen at link time. - self.add_external_crates(); } @@ -273,8 +272,8 @@ class CoherenceChecker { *item.ident}; match get_base_type_def_id(self.inference_context, - item.span, - self_type.ty) { + item.span, + self_type.ty) { none => { let session = self.crate_context.tcx.sess; session.span_err(item.span, @@ -421,7 +420,6 @@ class CoherenceChecker { } // Privileged scope checking - fn check_privileged_scopes(crate: @crate) { // Gather up all privileged types. let privileged_types = @@ -717,8 +715,8 @@ class CoherenceChecker { if associated_traits.len() == 0 { match get_base_type_def_id(self.inference_context, - dummy_sp(), - self_type.ty) { + dummy_sp(), + self_type.ty) { none => { let session = self.crate_context.tcx.sess; session.bug(fmt!{"no base type for external impl \