Skip to content

save-analysis: fix impls on primitive types #22691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions src/librustc_trans/save/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,23 +663,21 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
match typ.node {
// Common case impl for a struct or something basic.
ast::TyPath(ref path, id) => {
match self.lookup_type_ref(id) {
Some(id) => {
let sub_span = self.span.sub_span_for_type_name(path.span);
self.fmt.ref_str(recorder::TypeRef,
path.span,
sub_span,
id,
self.cur_scope);
self.fmt.impl_str(path.span,
sub_span,
item.id,
Some(id),
trait_id,
self.cur_scope);
},
None => ()
}
let sub_span = self.span.sub_span_for_type_name(path.span);
let self_id = self.lookup_type_ref(id).map(|id| {
self.fmt.ref_str(recorder::TypeRef,
path.span,
sub_span,
id,
self.cur_scope);
id
});
self.fmt.impl_str(path.span,
sub_span,
item.id,
self_id,
trait_id,
self.cur_scope);
},
_ => {
// Less useful case, impl for a compound type.
Expand Down