From 5098d733af5daa569bfb57b2a9a3c521df9aeb06 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 2 Jun 2018 11:19:44 +0800 Subject: Misc - Clean up/triage some tests --- disabled_tests_run-pass.txt | 6 ++---- src/resolve/absolute.cpp | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/disabled_tests_run-pass.txt b/disabled_tests_run-pass.txt index 62266f00..63cb8fa2 100644 --- a/disabled_tests_run-pass.txt +++ b/disabled_tests_run-pass.txt @@ -92,8 +92,9 @@ static-function-pointer # ^ issue-17718 # ^ (const here, but same idea) issue-27890 # ^ empty-struct-braces # MISSING: Full support for braced initialisers for unit-like structs/variants +issue-22546 # ^ issue-29540 # Errors out on very deep method call list. -issue-34751 # Treats PhantomData as a refutable pattern +issue-34751 # Treats unit-like structs as refutable patterns mir_ascription_coercion # TODO: Either visit expected types, or make a type annotation its own node type type-ascription # ^ @@ -204,9 +205,6 @@ fat-ptr-cast # Array unsize missed issue-20797 # Trait unsize runthrough issue-26905 # Manual CoerceUnsized not working? -# None:: syntax somewhere (TODO) -issue-22546 - # MIR GEN: issue-18352 # append_from_lit - Match literal Borrow issue-11940 # ^ diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp index 46a27c2d..f5e0d9e5 100644 --- a/src/resolve/absolute.cpp +++ b/src/resolve/absolute.cpp @@ -1839,7 +1839,10 @@ void Resolve_Absolute_Pattern(Context& context, bool allow_refutable, ::AST::Pa ), (Value, if( ! allow_refutable ) + { + // TODO: If this is a single value of a unit-like struct, accept BUG(pat.span(), "Resolve_Absolute_Pattern - Encountered refutable pattern where only irrefutable allowed - " << pat); + } Resolve_Absolute_PatternValue(context, pat.span(), e.start); Resolve_Absolute_PatternValue(context, pat.span(), e.end); ), -- cgit v1.2.3