We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap
signatures
1 parent f58ffc9 commit 3dd0a7dCopy full SHA for 3dd0a7d
compiler/rustc_save_analysis/src/sig.rs
@@ -21,7 +21,7 @@
21
// references.
22
//
23
// Signatures do not include visibility info. I'm not sure if this is a feature
24
-// or an ommission (FIXME).
+// or an omission (FIXME).
25
26
// FIXME where clauses need implementing, defs/refs in generics are mostly missing.
27
@@ -677,7 +677,7 @@ impl<'hir> Sig for hir::Variant<'hir> {
677
let mut text = self.ident.to_string();
678
match self.data {
679
hir::VariantData::Struct(fields, r) => {
680
- let id = parent_id.unwrap();
+ let id = parent_id.ok_or("Missing id for Variant's parent")?;
681
let name_def = SigElement {
682
id: id_from_hir_id(id, scx),
683
start: offset,
0 commit comments