diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/expand/format_args.cpp | 1 | ||||
-rw-r--r-- | src/expand/mod.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 5 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/expand/format_args.cpp b/src/expand/format_args.cpp index 0f881a6e..89503e0c 100644 --- a/src/expand/format_args.cpp +++ b/src/expand/format_args.cpp @@ -251,6 +251,7 @@ namespace { if( *s == '0' ) { args.zero_pad = true; + args.align_char = '0'; s ++; } else { diff --git a/src/expand/mod.cpp b/src/expand/mod.cpp index f152b1ab..df0a26f2 100644 --- a/src/expand/mod.cpp +++ b/src/expand/mod.cpp @@ -67,7 +67,7 @@ void Expand_Attrs(/*const */::AST::MetaItems& attrs, AttrStage stage, ::std::fu } void Expand_Attrs(::AST::MetaItems& attrs, AttrStage stage, ::AST::Crate& crate, const ::AST::Path& path, ::AST::Module& mod, ::AST::Item& item) { - Expand_Attrs(attrs, stage, [&](const auto& sp, const auto& d, const auto& a){ d.handle(sp, a, crate, path, mod, item); }); + Expand_Attrs(attrs, stage, [&](const auto& sp, const auto& d, const auto& a){ if(!item.is_None()) d.handle(sp, a, crate, path, mod, item); }); } void Expand_Attrs(::AST::MetaItems& attrs, AttrStage stage, ::AST::Crate& crate, ::AST::Module& mod, ::AST::ImplDef& impl) { diff --git a/src/main.cpp b/src/main.cpp index 0c181c29..2f392bb7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -224,7 +224,6 @@ int main(int argc, char *argv[]) if( params.test_harness ) { - // TODO: Generate harness main (and override the mrustc-main lang item) Expand_TestHarness(crate); } @@ -273,6 +272,10 @@ int main(int argc, char *argv[]) } } crate.m_crate_name = crate_name; + if( params.test_harness ) + { + crate.m_crate_name += "$test"; + } if( params.outfile == "" ) { switch( crate.m_crate_type ) |