Skip to content

Commit edf1d0c

Browse files
committed
Minor cleanups/comments/whitespace changes
1 parent 293f371 commit edf1d0c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/rustc/middle/typeck.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,18 @@ enum vtable_origin {
152152

153153
type vtable_map = hashmap<ast::node_id, vtable_res>;
154154

155-
type ty_param_substs_and_ty = {substs: ty::substs, ty: ty::t};
156155
// Stores information about provided methods, aka "default methods" in traits.
157156
// Maps from a trait's def_id to a MethodInfo about
158157
// that method in that trait.
159158
type provided_methods_map = hashmap<ast::node_id,
160159
~[@resolve3::MethodInfo]>;
161160

162-
type ty_table = hashmap<ast::def_id, ty::t>;
161+
type ty_param_substs_and_ty = {substs: ty::substs, ty: ty::t};
163162

164163
type crate_ctxt_ = {impl_map: resolve3::ImplMap,
164+
165+
// A mapping from method call sites to traits that have
166+
// that method.
165167
trait_map: resolve3::TraitMap,
166168
method_map: method_map,
167169
vtable_map: vtable_map,

src/rustc/middle/typeck/coherence.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ class CoherenceChecker {
257257
// Bring in external crates. It's fine for this to happen after the
258258
// coherence checks, because we ensure by construction that no errors
259259
// can happen at link time.
260-
261260
self.add_external_crates();
262261
}
263262

@@ -273,8 +272,8 @@ class CoherenceChecker {
273272
*item.ident};
274273

275274
match get_base_type_def_id(self.inference_context,
276-
item.span,
277-
self_type.ty) {
275+
item.span,
276+
self_type.ty) {
278277
none => {
279278
let session = self.crate_context.tcx.sess;
280279
session.span_err(item.span,
@@ -421,7 +420,6 @@ class CoherenceChecker {
421420
}
422421

423422
// Privileged scope checking
424-
425423
fn check_privileged_scopes(crate: @crate) {
426424
// Gather up all privileged types.
427425
let privileged_types =
@@ -717,8 +715,8 @@ class CoherenceChecker {
717715

718716
if associated_traits.len() == 0 {
719717
match get_base_type_def_id(self.inference_context,
720-
dummy_sp(),
721-
self_type.ty) {
718+
dummy_sp(),
719+
self_type.ty) {
722720
none => {
723721
let session = self.crate_context.tcx.sess;
724722
session.bug(fmt!{"no base type for external impl \

0 commit comments

Comments
 (0)