Created
September 6, 2015 01:47
-
-
Save m4rw3r/2bbdbe60a3bec6d968d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs | |
index 61e81d7..69328e8 100644 | |
--- a/src/librustc_trans/trans/base.rs | |
+++ b/src/librustc_trans/trans/base.rs | |
@@ -2343,6 +2343,8 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef { | |
let val = match item { | |
ast_map::NodeItem(i) => { | |
let ty = ccx.tcx().node_id_to_type(i.id); | |
+ let ty = monomorphize::normalize_associated_type(ccx.tcx(), &ty); | |
+ | |
let sym = || exported_name(ccx, id, ty, &i.attrs); | |
let v = match i.node { | |
@@ -2452,6 +2454,7 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef { | |
}; | |
assert!(!args.is_empty()); | |
let ty = ccx.tcx().node_id_to_type(id); | |
+ let ty = monomorphize::normalize_associated_type(ccx.tcx(), &ty); | |
let parent = ccx.tcx().map.get_parent(id); | |
let enm = ccx.tcx().map.expect_item(parent); | |
let sym = exported_name(ccx, | |
@@ -2481,6 +2484,7 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef { | |
let parent = ccx.tcx().map.get_parent(id); | |
let struct_item = ccx.tcx().map.expect_item(parent); | |
let ty = ccx.tcx().node_id_to_type(ctor_id); | |
+ let ty = monomorphize::normalize_associated_type(ccx.tcx(), &ty); | |
let sym = exported_name(ccx, | |
id, | |
ty, | |
@@ -2513,6 +2517,7 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef { | |
fn register_method(ccx: &CrateContext, id: ast::NodeId, | |
attrs: &[ast::Attribute], span: Span) -> ValueRef { | |
let mty = ccx.tcx().node_id_to_type(id); | |
+ let mty = monomorphize::normalize_associated_type(ccx.tcx(), &mty); | |
let sym = exported_name(ccx, id, mty, &attrs); | |
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs | |
index 8bcb949..166d1c9 100644 | |
--- a/src/librustdoc/clean/mod.rs | |
+++ b/src/librustdoc/clean/mod.rs | |
@@ -1705,6 +1705,7 @@ impl<'tcx> Clean<Type> for ty::Ty<'tcx> { | |
let path = external_path(cx, &fqn.last().unwrap().to_string(), | |
Some(did), bindings, principal.substs()); | |
cx.external_paths.borrow_mut().as_mut().unwrap().insert(did, (fqn, TypeTrait)); | |
+ | |
Anon(vec![TraitBound(PolyTrait { | |
trait_: ResolvedPath { | |
path: path, | |
@@ -1712,7 +1713,7 @@ impl<'tcx> Clean<Type> for ty::Ty<'tcx> { | |
did: did, | |
is_generic: false, | |
}, | |
- lifetimes: late_bounds | |
+ lifetimes: vec![], | |
}, ast::TraitBoundModifier::None)]) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment