Skip to content

Commit

Permalink
Fix MSVC build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Sep 24, 2024
1 parent 8564661 commit d893fc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/hir/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ class EncodedLiteralPtr {
const EncodedLiteral* operator->() const { assert(p); return p; }
};
TAGGED_UNION_EX(ConstGeneric, (), Infer, (
(Infer, struct { // To be inferred
unsigned index = ~0u;
(Infer, struct InferData { // To be inferred
unsigned index;
// NOTE: Workaround for VS2014, which can't use initialiser lists when a default is specified
InferData(unsigned index=~0u): index(index) {}
}),
(Unevaluated, std::shared_ptr<HIR::ExprPtr>), // Unevaluated (or evaluation deferred)
(Generic, GenericRef), // A single generic reference
Expand Down
4 changes: 2 additions & 2 deletions src/hir/type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ struct TypeData_ErasedType
struct TypeData_FunctionPointer
{
GenericParams hrls; // Higher-ranked lifetimes
bool is_unsafe = false;
bool is_variadic = false;
bool is_unsafe;
bool is_variadic;
::std::string m_abi;
TypeRef m_rettype;
::std::vector<TypeRef> m_arg_types;
Expand Down
4 changes: 2 additions & 2 deletions tools/standalone_miri/mir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,9 @@ namespace MIR {
(If,
if( ae.cond != be.cond )
return false;
if( ae.bb0 != be.bb0 )
if( ae.bb_true != be.bb_true )
return false;
if( ae.bb1 != be.bb1 )
if( ae.bb_false != be.bb_false )
return false;
),
(Switch,
Expand Down

0 comments on commit d893fc7

Please sign in to comment.