Rollup merge of #78352 - JohnTitor:issue-75229, r=Dylan-DPC
Do not call `unwrap` with `signatures` option enabled Fixes #75229 Didn't add a test since I couldn't set `RUST_SAVE_ANALYSIS_CONFIG` even with `rustc-env`.
This commit is contained in:
commit
dc4d65579c
@ -21,7 +21,7 @@
|
|||||||
// references.
|
// references.
|
||||||
//
|
//
|
||||||
// Signatures do not include visibility info. I'm not sure if this is a feature
|
// 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.
|
// 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();
|
let mut text = self.ident.to_string();
|
||||||
match self.data {
|
match self.data {
|
||||||
hir::VariantData::Struct(fields, r) => {
|
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 {
|
let name_def = SigElement {
|
||||||
id: id_from_hir_id(id, scx),
|
id: id_from_hir_id(id, scx),
|
||||||
start: offset,
|
start: offset,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user