Skip to content

Commit 43a0816

Browse files
committed
---
yaml --- r: 67255 b: refs/heads/master c: 17e30d6 h: refs/heads/master i: 67253: 3dd9e9c 67251: d82f9a7 67247: f889dd3 v: v3
1 parent 30d4dad commit 43a0816

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 387df4e1277ed09002bb050caac5a86d126a1339
2+
refs/heads/master: 17e30d6b4ef5c6fb4d6257323903cba1213cae8f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustc/middle/ty.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4348,9 +4348,9 @@ pub fn determine_inherited_purity(parent: (ast::purity, ast::node_id),
43484348
// relation on the supertraits from each bounded trait's constraint
43494349
// list.
43504350
pub fn each_bound_trait_and_supertraits(tcx: ctxt,
4351-
bounds: &ParamBounds,
4351+
bounds: &[@TraitRef],
43524352
f: &fn(@TraitRef) -> bool) -> bool {
4353-
for bounds.trait_bounds.iter().advance |&bound_trait_ref| {
4353+
for bounds.iter().advance |&bound_trait_ref| {
43544354
let mut supertrait_set = HashMap::new();
43554355
let mut trait_refs = ~[];
43564356
let mut i = 0;
@@ -4392,7 +4392,8 @@ pub fn count_traits_and_supertraits(tcx: ctxt,
43924392
type_param_defs: &[TypeParameterDef]) -> uint {
43934393
let mut total = 0;
43944394
for type_param_defs.iter().advance |type_param_def| {
4395-
for each_bound_trait_and_supertraits(tcx, type_param_def.bounds) |_| {
4395+
for each_bound_trait_and_supertraits(
4396+
tcx, type_param_def.bounds.trait_bounds) |_| {
43964397
total += 1;
43974398
}
43984399
}

trunk/src/librustc/middle/typeck/check/method.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ impl<'self> LookupContext<'self> {
413413
};
414414

415415
self.push_inherent_candidates_from_bounds(
416-
rcvr_ty, &*type_param_def.bounds, param_numbered(param_ty.idx));
416+
rcvr_ty, type_param_def.bounds.trait_bounds,
417+
param_numbered(param_ty.idx));
417418
}
418419

419420

@@ -423,18 +424,13 @@ impl<'self> LookupContext<'self> {
423424
let tcx = self.tcx();
424425

425426
let trait_ref = ty::lookup_trait_def(tcx, did).trait_ref;
426-
let bounds = ParamBounds {
427-
builtin_bounds: EmptyBuiltinBounds(),
428-
trait_bounds: ~[trait_ref]
429-
};
430-
431427
self.push_inherent_candidates_from_bounds(
432-
self_ty, &bounds, param_self);
428+
self_ty, &[trait_ref], param_self);
433429
}
434430

435431
pub fn push_inherent_candidates_from_bounds(&self,
436432
self_ty: ty::t,
437-
bounds: &ParamBounds,
433+
bounds: &[@TraitRef],
438434
param: param_index) {
439435
let tcx = self.tcx();
440436
let mut next_bound_idx = 0; // count only trait bounds

trunk/src/librustc/middle/typeck/check/vtable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn lookup_vtables_for_param(vcx: &VtableContext,
132132
let mut param_result = ~[];
133133

134134
for ty::each_bound_trait_and_supertraits(
135-
tcx, type_param_bounds) |trait_ref|
135+
tcx, type_param_bounds.trait_bounds) |trait_ref|
136136
{
137137
// ...and here trait_ref is each bound that was declared on A,
138138
// expressed in terms of the type parameters.
@@ -249,7 +249,7 @@ fn lookup_vtable(vcx: &VtableContext,
249249
let mut n_bound = 0;
250250
let type_param_def = tcx.ty_param_defs.get(&did.node);
251251
for ty::each_bound_trait_and_supertraits(
252-
tcx, type_param_def.bounds) |bound_trait_ref|
252+
tcx, type_param_def.bounds.trait_bounds) |bound_trait_ref|
253253
{
254254
debug!("checking bounds trait %s", bound_trait_ref.repr(vcx.tcx()));
255255

0 commit comments

Comments
 (0)