diff options
author | John Hodge (bugs) <tpg@mutabah.net> | 2017-07-06 20:05:02 +0800 |
---|---|---|
committer | John Hodge (bugs) <tpg@mutabah.net> | 2017-07-06 20:05:02 +0800 |
commit | bded1205ddf56332f5864f4a93d69b74a41fb38f (patch) | |
tree | fe35b09d89607721770a52ffc86543deb56ef1f1 /src | |
parent | 48e2c4973d5401c9f7d0ee2bac22ac6015744961 (diff) | |
download | mrust-bded1205ddf56332f5864f4a93d69b74a41fb38f.tar.gz |
Misc - Minor MSVC fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/static.cpp | 4 | ||||
-rw-r--r-- | src/trans/codegen_c.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp index 0067eb7f..1d613d96 100644 --- a/src/hir_typeck/static.cpp +++ b/src/hir_typeck/static.cpp @@ -1574,7 +1574,7 @@ bool StaticTraitResolve::can_unsize(const Span& sp, const ::HIR::TypeRef& dst_ty // 1. Data trait must be the same if( de->m_trait != se->m_trait ) { - return ::HIR::Compare::Unequal; + return false; } // 2. Destination markers must be a strict subset @@ -1658,7 +1658,7 @@ bool StaticTraitResolve::can_unsize(const Span& sp, const ::HIR::TypeRef& dst_ty } DEBUG("Can't unsize, no rules matched"); - return ::HIR::Compare::Unequal; + return false; } diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp index f5c1a61d..9ef60523 100644 --- a/src/trans/codegen_c.cpp +++ b/src/trans/codegen_c.cpp @@ -113,7 +113,7 @@ namespace { ; // u128/i128 ops m_of - << "static inline unsigned __int128 __builtin_bswap128(unsigned __int128 v) {\n" + << "static inline unsigned __int128 __builtin_bswap128(uint128_t v) {\n" << "\tuint64_t lo = __builtin_bswap64((uint64_t)v);\n" << "\tuint64_t hi = __builtin_bswap64((uint64_t)(v>>64));\n" << "\treturn ((uint128_t)lo << 64) | (uint128_t)hi;\n" |