Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call unwrap with signatures option enabled #78352

Merged
merged 1 commit into from
Nov 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_save_analysis/src/sig.rs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
// references.
//
// Signatures do not include visibility info. I'm not sure if this is a feature
// or an ommission (FIXME).
// or an omission (FIXME).
//
// FIXME where clauses need implementing, defs/refs in generics are mostly missing.

@@ -677,7 +677,7 @@ impl<'hir> Sig for hir::Variant<'hir> {
let mut text = self.ident.to_string();
match self.data {
hir::VariantData::Struct(fields, r) => {
let id = parent_id.unwrap();
let id = parent_id.ok_or("Missing id for Variant's parent")?;
let name_def = SigElement {
id: id_from_hir_id(id, scx),
start: offset,