about summary refs log tree commit diff
diff options
context:
space:
mode:
authorachernyak <artemchernyak@gmail.com>2017-05-05 14:40:26 -0500
committerachernyak <artemchernyak@gmail.com>2017-05-05 14:40:26 -0500
commitd561d4c9eb808cbca28fd641934825fdf96fb762 (patch)
tree9cee16702d2ef642f2b9f6c376fa406d9b8ac2fd
parent5a7946df703f2d9149adc0ca5c7e0b116e82a98d (diff)
downloadrust-d561d4c9eb808cbca28fd641934825fdf96fb762.tar.gz
rust-d561d4c9eb808cbca28fd641934825fdf96fb762.zip
propper trait of item impl
-rw-r--r--src/librustc/ty/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index 1c3e74d4fb9..9f43ed9bf5b 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -2682,7 +2682,7 @@ fn def_span<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Span {
 /// Otherwise, return `None`.
 fn trait_of_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Option<DefId> {
     if def_id.krate != LOCAL_CRATE {
-        return None
+        return tcx.trait_of_item(def_id)
     }
     tcx.opt_associated_item(def_id)
         .and_then(|associated_item| {