summaryrefslogtreecommitdiff
path: root/src/hir_typeck
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2019-11-24 15:09:17 +0800
committerJohn Hodge <tpg@mutabah.net>2019-11-24 15:09:17 +0800
commitec78d24bd3d22b383d71d9c3ef261044da403c98 (patch)
treee268d4200f831f11da010a1a81c38ece9f682160 /src/hir_typeck
parent25aff26fb8ced9c032c5593ad6acdd78b09d225f (diff)
downloadmrust-ec78d24bd3d22b383d71d9c3ef261044da403c98.tar.gz
Misc - Warning tweaks to make MSVC be quiet
Diffstat (limited to 'src/hir_typeck')
-rw-r--r--src/hir_typeck/expr_cs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 0eb20568..431dc2f9 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -1275,7 +1275,7 @@ namespace {
}
const ::HIR::t_struct_fields* fields_ptr = nullptr;
- const ::HIR::GenericParams* generics;
+ const ::HIR::GenericParams* generics = nullptr;
TU_MATCH(::HIR::TypeRef::TypePathBinding, (ty.m_data.as_Path().binding), (e),
(Unbound, ),
(Opaque, ),
@@ -1322,6 +1322,7 @@ namespace {
)
)
ASSERT_BUG(node.span(), fields_ptr, "");
+ assert(generics);
const ::HIR::t_struct_fields& fields = *fields_ptr;
const auto& ty_params = ty_path.m_params.m_types;