Skip to content

Commit

Permalink
Fix dyn objects
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 4, 2018
1 parent e0f8f87 commit 2758de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/clean/def_ctor.rs
Expand Up @@ -16,7 +16,7 @@ pub fn get_def_ctor_from_def_id<F>(cx: &DocContext,
def_id: DefId,
callback: &F,
) -> Vec<Item>
where F: Fn(&Fn(DefId) -> Def) -> Vec<Item> {
where F: Fn(& dyn Fn(DefId) -> Def) -> Vec<Item> {
let ty = cx.tcx.type_of(def_id);

match ty.sty {
Expand Down Expand Up @@ -53,7 +53,7 @@ pub fn get_def_ctor_from_node_id<F>(cx: &DocContext,
name: String,
callback: &F,
) -> Vec<Item>
where F: Fn(&Fn(DefId) -> Def, String) -> Vec<Item> {
where F: Fn(& dyn Fn(DefId) -> Def, String) -> Vec<Item> {
let item = &cx.tcx.hir.expect_item(id).node;

callback(&match *item {
Expand Down

0 comments on commit 2758de4

Please sign in to comment.