Skip to content

Commit 8a764b9

Browse files
eddybmark-i-m
authored andcommitted
Remove Option from the return type of def_kind.
1 parent fba38a9 commit 8a764b9

File tree

24 files changed

+83
-106
lines changed

24 files changed

+83
-106
lines changed

src/librustc_infer/infer/error_reporting/need_type_info.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
192192
.get_opt_name()
193193
.map(|parent_symbol| parent_symbol.to_string());
194194

195-
let type_parent_desc = self
196-
.tcx
197-
.def_kind(parent_def_id)
198-
.map(|parent_def_kind| parent_def_kind.descr(parent_def_id));
199-
200-
(parent_name, type_parent_desc)
195+
(parent_name, Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)))
201196
} else {
202197
(None, None)
203198
};

src/librustc_metadata/rmeta/decoder/cstore_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
127127
is_foreign_item => { cdata.is_foreign_item(def_id.index) }
128128
static_mutability => { cdata.static_mutability(def_id.index) }
129129
generator_kind => { cdata.generator_kind(def_id.index) }
130-
def_kind => { Some(cdata.def_kind(def_id.index)) }
130+
def_kind => { cdata.def_kind(def_id.index) }
131131
def_span => { cdata.get_span(def_id.index, &tcx.sess) }
132132
lookup_stability => {
133133
cdata.get_stability(def_id.index).map(|s| tcx.intern_stability(s))

src/librustc_middle/hir/map/mod.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,14 @@ impl<'hir> Map<'hir> {
229229
self.tcx.definitions.opt_local_def_id_to_hir_id(def_id)
230230
}
231231

232-
pub fn def_kind(&self, local_def_id: LocalDefId) -> Option<DefKind> {
232+
pub fn def_kind(&self, local_def_id: LocalDefId) -> DefKind {
233+
// FIXME(eddyb) support `find` on the crate root.
233234
if local_def_id.to_def_id().index == CRATE_DEF_INDEX {
234-
return Some(DefKind::Mod);
235+
return DefKind::Mod;
235236
}
236237

237238
let hir_id = self.local_def_id_to_hir_id(local_def_id);
238-
let node = self.find(hir_id)?;
239-
240-
Some(match node {
239+
match self.get(hir_id) {
241240
Node::Item(item) => match item.kind {
242241
ItemKind::Static(..) => DefKind::Static,
243242
ItemKind::Const(..) => DefKind::Const,
@@ -275,7 +274,7 @@ impl<'hir> Map<'hir> {
275274
Node::Variant(_) => DefKind::Variant,
276275
Node::Ctor(variant_data) => {
277276
// FIXME(eddyb) is this even possible, if we have a `Node::Ctor`?
278-
variant_data.ctor_hir_id()?;
277+
assert_ne!(variant_data.ctor_hir_id(), None);
279278

280279
let ctor_of = match self.find(self.get_parent_node(hir_id)) {
281280
Some(Node::Item(..)) => def::CtorOf::Struct,
@@ -310,7 +309,7 @@ impl<'hir> Map<'hir> {
310309
| Node::Visibility(_)
311310
| Node::Block(_)
312311
| Node::Crate(_) => bug!("def_kind: unsupported node: {}", self.node_to_string(hir_id)),
313-
})
312+
}
314313
}
315314

316315
fn find_entry(&self, id: HirId) -> Option<Entry<'hir>> {

src/librustc_middle/middle/stability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pub enum EvalResult {
246246
fn skip_stability_check_due_to_privacy(tcx: TyCtxt<'_>, mut def_id: DefId) -> bool {
247247
// Check if `def_id` is a trait method.
248248
match tcx.def_kind(def_id) {
249-
Some(DefKind::AssocFn) | Some(DefKind::AssocTy) | Some(DefKind::AssocConst) => {
249+
DefKind::AssocFn | DefKind::AssocTy | DefKind::AssocConst => {
250250
if let ty::TraitContainer(trait_def_id) = tcx.associated_item(def_id).container {
251251
// Trait methods do not declare visibility (even
252252
// for visibility info in cstore). Use containing

src/librustc_middle/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ rustc_queries! {
630630
cache_on_disk_if { true }
631631
}
632632

633-
query def_kind(_: DefId) -> Option<DefKind> {}
633+
query def_kind(_: DefId) -> DefKind {}
634634
query def_span(_: DefId) -> Span {
635635
// FIXME(mw): DefSpans are not really inputs since they are derived from
636636
// HIR. But at the moment HIR hashing still contains some hacks that allow

src/librustc_middle/ty/context.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use rustc_errors::ErrorReported;
5050
use rustc_hir as hir;
5151
use rustc_hir::def::{DefKind, Res};
5252
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, DefIdSet, LocalDefId, LOCAL_CRATE};
53-
use rustc_hir::definitions::{DefPathData, DefPathHash, Definitions};
53+
use rustc_hir::definitions::{DefPathHash, Definitions};
5454
use rustc_hir::lang_items;
5555
use rustc_hir::lang_items::PanicLocationLangItem;
5656
use rustc_hir::{HirId, Node, TraitCandidate};
@@ -1492,21 +1492,13 @@ impl<'tcx> TyCtxt<'tcx> {
14921492

14931493
/// Returns a displayable description and article for the given `def_id` (e.g. `("a", "struct")`).
14941494
pub fn article_and_description(&self, def_id: DefId) -> (&'static str, &'static str) {
1495-
self.def_kind(def_id)
1496-
.map(|def_kind| (def_kind.article(), def_kind.descr(def_id)))
1497-
.unwrap_or_else(|| match self.def_key(def_id).disambiguated_data.data {
1498-
DefPathData::ClosureExpr => match self.generator_kind(def_id) {
1499-
None => ("a", "closure"),
1500-
Some(rustc_hir::GeneratorKind::Async(..)) => ("an", "async closure"),
1501-
Some(rustc_hir::GeneratorKind::Gen) => ("a", "generator"),
1502-
},
1503-
DefPathData::LifetimeNs(..) => ("a", "lifetime"),
1504-
DefPathData::Impl => ("an", "implementation"),
1505-
DefPathData::TypeNs(..) | DefPathData::ValueNs(..) | DefPathData::MacroNs(..) => {
1506-
unreachable!()
1507-
}
1508-
_ => bug!("article_and_description called on def_id {:?}", def_id),
1509-
})
1495+
match self.def_kind(def_id) {
1496+
DefKind::Generator => match self.generator_kind(def_id).unwrap() {
1497+
rustc_hir::GeneratorKind::Async(..) => ("an", "async closure"),
1498+
rustc_hir::GeneratorKind::Gen => ("a", "generator"),
1499+
},
1500+
def_kind => (def_kind.article(), def_kind.descr(def_id)),
1501+
}
15101502
}
15111503
}
15121504

src/librustc_middle/ty/mod.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,16 +2671,9 @@ impl<'tcx> TyCtxt<'tcx> {
26712671
}
26722672

26732673
pub fn opt_associated_item(self, def_id: DefId) -> Option<AssocItem> {
2674-
let is_associated_item = if let Some(hir_id) = self.hir().as_local_hir_id(def_id) {
2675-
match self.hir().get(hir_id) {
2676-
Node::TraitItem(_) | Node::ImplItem(_) => true,
2677-
_ => false,
2678-
}
2679-
} else {
2680-
match self.def_kind(def_id) {
2681-
Some(DefKind::AssocConst | DefKind::AssocFn | DefKind::AssocTy) => true,
2682-
_ => false,
2683-
}
2674+
let is_associated_item = match self.def_kind(def_id) {
2675+
DefKind::AssocConst | DefKind::AssocFn | DefKind::AssocTy => true,
2676+
_ => false,
26842677
};
26852678

26862679
is_associated_item.then(|| self.associated_item(def_id))

src/librustc_middle/ty/print/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ pub trait PrettyPrinter<'tcx>:
909909
p!(write("::{:?}", promoted));
910910
} else {
911911
match self.tcx().def_kind(did) {
912-
Some(DefKind::Static | DefKind::Const | DefKind::AssocConst) => {
912+
DefKind::Static | DefKind::Const | DefKind::AssocConst => {
913913
p!(print_value_path(did, substs))
914914
}
915915
_ => {

src/librustc_middle/ty/util.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use rustc_errors::ErrorReported;
1616
use rustc_hir as hir;
1717
use rustc_hir::def::DefKind;
1818
use rustc_hir::def_id::DefId;
19-
use rustc_hir::definitions::DefPathData;
2019
use rustc_macros::HashStable;
2120
use rustc_span::Span;
2221
use rustc_target::abi::{Integer, Size, TargetDataLayout};
@@ -446,24 +445,24 @@ impl<'tcx> TyCtxt<'tcx> {
446445
/// those are not yet phased out). The parent of the closure's
447446
/// `DefId` will also be the context where it appears.
448447
pub fn is_closure(self, def_id: DefId) -> bool {
449-
self.def_key(def_id).disambiguated_data.data == DefPathData::ClosureExpr
448+
matches!(self.def_kind(def_id), DefKind::Closure | DefKind::Generator)
450449
}
451450

452451
/// Returns `true` if `def_id` refers to a trait (i.e., `trait Foo { ... }`).
453452
pub fn is_trait(self, def_id: DefId) -> bool {
454-
self.def_kind(def_id) == Some(DefKind::Trait)
453+
self.def_kind(def_id) == DefKind::Trait
455454
}
456455

457456
/// Returns `true` if `def_id` refers to a trait alias (i.e., `trait Foo = ...;`),
458457
/// and `false` otherwise.
459458
pub fn is_trait_alias(self, def_id: DefId) -> bool {
460-
self.def_kind(def_id) == Some(DefKind::TraitAlias)
459+
self.def_kind(def_id) == DefKind::TraitAlias
461460
}
462461

463462
/// Returns `true` if this `DefId` refers to the implicit constructor for
464463
/// a tuple struct like `struct Foo(u32)`, and `false` otherwise.
465464
pub fn is_constructor(self, def_id: DefId) -> bool {
466-
self.def_key(def_id).disambiguated_data.data == DefPathData::Ctor
465+
matches!(self.def_kind(def_id), DefKind::Ctor(..))
467466
}
468467

469468
/// Given the def-ID of a fn or closure, returns the def-ID of

src/librustc_mir/const_eval/eval_queries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ pub fn const_eval_raw_provider<'tcx>(
341341
// because any code that existed before validation could not have failed
342342
// validation thus preventing such a hard error from being a backwards
343343
// compatibility hazard
344-
Some(DefKind::Const | DefKind::AssocConst) => {
344+
DefKind::Const | DefKind::AssocConst => {
345345
let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap();
346346
err.report_as_lint(
347347
tcx.at(tcx.def_span(def_id)),

src/librustc_mir/interpret/eval_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
632632
// FIXME: The above is likely untrue. See
633633
// <https://github.com/rust-lang/rust/pull/70004#issuecomment-602022110>. Is it
634634
// okay to ignore `StorageDead`/`StorageLive` annotations during CTFE?
635-
Some(DefKind::Static | DefKind::Const | DefKind::AssocConst) => {}
635+
DefKind::Static | DefKind::Const | DefKind::AssocConst => {}
636636
_ => {
637637
// Mark locals that use `Storage*` annotations as dead on function entry.
638638
let always_live = AlwaysLiveLocals::new(self.body());

src/librustc_mir/monomorphize/partitioning.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ fn compute_codegen_unit_name(
779779
cgu_def_id = Some(DefId { krate: def_id.krate, index: CRATE_DEF_INDEX });
780780
}
781781
break;
782-
} else if tcx.def_kind(current_def_id) == Some(DefKind::Mod) {
782+
} else if tcx.def_kind(current_def_id) == DefKind::Mod {
783783
if cgu_def_id.is_none() {
784784
cgu_def_id = Some(current_def_id);
785785
}

src/librustc_mir/transform/const_prop.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
7272
.expect("Non-local call to local provider is_const_fn");
7373

7474
let is_fn_like = FnLikeNode::from_node(tcx.hir().get(hir_id)).is_some();
75-
let is_assoc_const = match tcx.def_kind(source.def_id()) {
76-
Some(DefKind::AssocConst) => true,
77-
_ => false,
78-
};
75+
let is_assoc_const = tcx.def_kind(source.def_id()) == DefKind::AssocConst;
7976

8077
// Only run const prop on functions, methods, closures and associated constants
8178
if !is_fn_like && !is_assoc_const {

src/librustc_mir/util/pretty.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -807,17 +807,17 @@ fn write_mir_sig(
807807
trace!("write_mir_sig: {:?}", src.instance);
808808
let kind = tcx.def_kind(src.def_id());
809809
let is_function = match kind {
810-
Some(DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(..)) => true,
810+
DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(..) => true,
811811
_ => tcx.is_closure(src.def_id()),
812812
};
813813
match (kind, src.promoted) {
814814
(_, Some(i)) => write!(w, "{:?} in ", i)?,
815-
(Some(DefKind::Const | DefKind::AssocConst), _) => write!(w, "const ")?,
816-
(Some(DefKind::Static), _) => {
815+
(DefKind::Const | DefKind::AssocConst, _) => write!(w, "const ")?,
816+
(DefKind::Static, _) => {
817817
write!(w, "static {}", if tcx.is_mutable_static(src.def_id()) { "mut " } else { "" })?
818818
}
819819
(_, _) if is_function => write!(w, "fn ")?,
820-
(Some(DefKind::AnonConst), _) | (None, _) => {} // things like anon const, not an item
820+
(DefKind::AnonConst, _) => {} // things like anon const, not an item
821821
_ => bug!("Unexpected def kind {:?}", kind),
822822
}
823823

src/librustc_privacy/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,10 @@ impl EmbargoVisitor<'tcx> {
537537
for item_id in module.item_ids {
538538
let hir_id = item_id.id;
539539
let item_def_id = self.tcx.hir().local_def_id(hir_id);
540-
if let Some(def_kind) = self.tcx.def_kind(item_def_id) {
541-
let item = self.tcx.hir().expect_item(hir_id);
542-
let vis = ty::Visibility::from_hir(&item.vis, hir_id, self.tcx);
543-
self.update_macro_reachable_def(hir_id, def_kind, vis, defining_mod);
544-
}
540+
let def_kind = self.tcx.def_kind(item_def_id);
541+
let item = self.tcx.hir().expect_item(hir_id);
542+
let vis = ty::Visibility::from_hir(&item.vis, hir_id, self.tcx);
543+
self.update_macro_reachable_def(hir_id, def_kind, vis, defining_mod);
545544
}
546545
if let Some(exports) = self.tcx.module_exports(module_def_id) {
547546
for export in exports {

src/librustc_resolve/build_reduced_graph.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,21 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
906906
Res::Def(DefKind::Macro(..), _) | Res::NonMacroAttr(..) => {
907907
self.r.define(parent, ident, MacroNS, (res, vis, span, expansion))
908908
}
909-
Res::Def(DefKind::TyParam | DefKind::ConstParam, _)
909+
Res::Def(
910+
DefKind::TyParam
911+
| DefKind::ConstParam
912+
| DefKind::ExternCrate
913+
| DefKind::Use
914+
| DefKind::ForeignMod
915+
| DefKind::AnonConst
916+
| DefKind::Field
917+
| DefKind::LifetimeParam
918+
| DefKind::GlobalAsm
919+
| DefKind::Closure
920+
| DefKind::Impl
921+
| DefKind::Generator,
922+
_,
923+
)
910924
| Res::Local(..)
911925
| Res::SelfTy(..)
912926
| Res::SelfCtor(..)

src/librustc_trait_selection/traits/error_reporting/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
14521452
// ```
14531453
debug!("parent_def_kind: {:?}", self.tcx.def_kind(parent_did));
14541454
let is_raw_borrow_inside_fn_like_call = match self.tcx.def_kind(parent_did) {
1455-
Some(DefKind::Fn | DefKind::Ctor(..)) => target_ty.is_unsafe_ptr(),
1455+
DefKind::Fn | DefKind::Ctor(..) => target_ty.is_unsafe_ptr(),
14561456
_ => false,
14571457
};
14581458

src/librustc_traits/lowering/mod.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,24 +150,22 @@ crate fn program_clauses_for(tcx: TyCtxt<'_>, def_id: DefId) -> Clauses<'_> {
150150
// FIXME(eddyb) this should only be using `def_kind`.
151151
match tcx.def_key(def_id).disambiguated_data.data {
152152
DefPathData::TypeNs(..) => match tcx.def_kind(def_id) {
153-
Some(DefKind::Trait | DefKind::TraitAlias) => program_clauses_for_trait(tcx, def_id),
153+
DefKind::Trait | DefKind::TraitAlias => program_clauses_for_trait(tcx, def_id),
154154
// FIXME(eddyb) deduplicate this `associated_item` call with
155155
// `program_clauses_for_associated_type_{value,def}`.
156-
Some(DefKind::AssocTy) => match tcx.associated_item(def_id).container {
156+
DefKind::AssocTy => match tcx.associated_item(def_id).container {
157157
ty::AssocItemContainer::ImplContainer(_) => {
158158
program_clauses_for_associated_type_value(tcx, def_id)
159159
}
160160
ty::AssocItemContainer::TraitContainer(_) => {
161161
program_clauses_for_associated_type_def(tcx, def_id)
162162
}
163163
},
164-
Some(
165-
DefKind::Struct
166-
| DefKind::Enum
167-
| DefKind::TyAlias
168-
| DefKind::Union
169-
| DefKind::OpaqueTy,
170-
) => program_clauses_for_type_def(tcx, def_id),
164+
DefKind::Struct
165+
| DefKind::Enum
166+
| DefKind::TyAlias
167+
| DefKind::Union
168+
| DefKind::OpaqueTy => program_clauses_for_type_def(tcx, def_id),
171169
_ => List::empty(),
172170
},
173171
DefPathData::Impl => program_clauses_for_impl(tcx, def_id),

src/librustc_typeck/check/dropck.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
9393
}
9494
Err(_) => {
9595
let item_span = tcx.def_span(self_type_did);
96-
let self_descr = tcx
97-
.def_kind(self_type_did)
98-
.map(|kind| kind.descr(self_type_did))
99-
.unwrap_or("type");
96+
let self_descr = tcx.def_kind(self_type_did).descr(self_type_did);
10097
struct_span_err!(
10198
tcx.sess,
10299
drop_impl_span,
@@ -243,8 +240,7 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
243240

244241
if !assumptions_in_impl_context.iter().any(predicate_matches_closure) {
245242
let item_span = tcx.hir().span(self_type_hir_id);
246-
let self_descr =
247-
tcx.def_kind(self_type_did).map(|kind| kind.descr(self_type_did)).unwrap_or("type");
243+
let self_descr = tcx.def_kind(self_type_did).descr(self_type_did);
248244
struct_span_err!(
249245
tcx.sess,
250246
*predicate_sp,

src/librustc_typeck/check/expr.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,10 +1564,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
15641564
base_did: DefId,
15651565
) {
15661566
let struct_path = self.tcx().def_path_str(base_did);
1567-
let kind_name = match self.tcx().def_kind(base_did) {
1568-
Some(def_kind) => def_kind.descr(base_did),
1569-
_ => " ",
1570-
};
1567+
let kind_name = self.tcx().def_kind(base_did).descr(base_did);
15711568
let mut err = struct_span_err!(
15721569
self.tcx().sess,
15731570
field.span,

src/librustc_typeck/check/mod.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -831,18 +831,22 @@ fn primary_body_of(
831831
}
832832

833833
fn has_typeck_tables(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
834+
// FIXME(#71104) some `LocalDefId` do not seem to have a corresponding `HirId`.
835+
if let Some(def_id) = def_id.as_local() {
836+
if tcx.hir().opt_local_def_id_to_hir_id(def_id).is_none() {
837+
return false;
838+
}
839+
}
840+
834841
// Closures' tables come from their outermost function,
835842
// as they are part of the same "inference environment".
836843
let outer_def_id = tcx.closure_base_def_id(def_id);
837844
if outer_def_id != def_id {
838845
return tcx.has_typeck_tables(outer_def_id);
839846
}
840847

841-
// FIXME(#71104) Should really be using just `as_local_hir_id` but
842-
// some `LocalDefId` do not seem to have a corresponding HirId.
843-
if let Some(id) =
844-
def_id.as_local().and_then(|def_id| tcx.hir().opt_local_def_id_to_hir_id(def_id))
845-
{
848+
if let Some(def_id) = def_id.as_local() {
849+
let id = tcx.hir().local_def_id_to_hir_id(def_id);
846850
primary_body_of(tcx, id).is_some()
847851
} else {
848852
false
@@ -4949,10 +4953,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
49494953
Some(Node::Ctor(hir::VariantData::Tuple(fields, _))) => {
49504954
sugg_call = fields.iter().map(|_| "_").collect::<Vec<_>>().join(", ");
49514955
match self.tcx.def_kind(def_id) {
4952-
Some(hir::def::DefKind::Ctor(hir::def::CtorOf::Variant, _)) => {
4956+
DefKind::Ctor(CtorOf::Variant, _) => {
49534957
msg = "instantiate this tuple variant";
49544958
}
4955-
Some(hir::def::DefKind::Ctor(hir::def::CtorOf::Struct, _)) => {
4959+
DefKind::Ctor(CtorOf::Struct, _) => {
49564960
msg = "instantiate this tuple struct";
49574961
}
49584962
_ => {}

0 commit comments

Comments
 (0)