Skip to content

Commit 483068d

Browse files
committed
---
yaml --- r: 273157 b: refs/heads/beta c: 1726c1b h: refs/heads/master i: 273155: 141e97b
1 parent 24e2071 commit 483068d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: eaf2f909561c3b2c26ee8d40ac7a95e89c5034d9
26+
refs/heads/beta: 1726c1b54a12b9f499affdc3ef0b769f3de15a23
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc/middle/traits/specialize/specialization_graph.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ impl Graph {
6565
let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap();
6666
let trait_def_id = trait_ref.def_id;
6767

68+
debug!("inserting TraitRef {:?} into specialization graph", trait_ref);
69+
6870
// if the reference itself contains an earlier error (e.g., due to a
6971
// resolution failure), then we just insert the impl at the top level of
7072
// the graph and claim that there's no overlap (in order to supress
@@ -99,10 +101,16 @@ impl Graph {
99101
let ge = specializes(tcx, possible_sibling, impl_def_id);
100102

101103
if le && !ge {
104+
let parent_trait_ref = tcx.impl_trait_ref(possible_sibling).unwrap();
105+
debug!("descending as child of TraitRef {:?}", parent_trait_ref);
106+
102107
// the impl specializes possible_sibling
103108
parent = possible_sibling;
104109
continue 'descend;
105110
} else if ge && !le {
111+
let child_trait_ref = tcx.impl_trait_ref(possible_sibling).unwrap();
112+
debug!("placing as parent of TraitRef {:?}", child_trait_ref);
113+
106114
// possible_sibling specializes the impl
107115
*slot = impl_def_id;
108116
self.parent.insert(impl_def_id, parent);
@@ -123,6 +131,7 @@ impl Graph {
123131
}
124132

125133
// no overlap with any potential siblings, so add as a new sibling
134+
debug!("placing as new sibling");
126135
self.parent.insert(impl_def_id, parent);
127136
possible_siblings.push(impl_def_id);
128137
return Ok(());

0 commit comments

Comments
 (0)