summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_save_analysis/src/sig.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_save_analysis/src/sig.rs')
-rw-r--r--compiler/rustc_save_analysis/src/sig.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_save_analysis/src/sig.rs b/compiler/rustc_save_analysis/src/sig.rs
index d1286c9b8..bae1828cd 100644
--- a/compiler/rustc_save_analysis/src/sig.rs
+++ b/compiler/rustc_save_analysis/src/sig.rs
@@ -316,7 +316,7 @@ impl<'hir> Sig for hir::Ty<'hir> {
let text = format!("[{}; {}]", nested_ty.text, expr);
Ok(replace_text(nested_ty, text))
}
- hir::TyKind::OpaqueDef(item_id, _) => {
+ hir::TyKind::OpaqueDef(item_id, _, _) => {
let item = scx.tcx.hir().item(item_id);
item.make(offset, Some(item_id.hir_id()), scx)
}
@@ -561,7 +561,13 @@ impl<'hir> Sig for hir::Item<'hir> {
hir::ItemKind::ForeignMod { .. } => Err("extern mod"),
hir::ItemKind::GlobalAsm(_) => Err("global asm"),
hir::ItemKind::ExternCrate(_) => Err("extern crate"),
- hir::ItemKind::OpaqueTy(..) => Err("opaque type"),
+ hir::ItemKind::OpaqueTy(ref opaque) => {
+ if opaque.in_trait {
+ Err("opaque type in trait")
+ } else {
+ Err("opaque type")
+ }
+ }
// FIXME should implement this (e.g., pub use).
hir::ItemKind::Use(..) => Err("import"),
}