From 904f5870e670e7498945d1758da1619ed49f6fc8 Mon Sep 17 00:00:00 2001 From: Timothy Zakian Date: Fri, 19 Apr 2024 14:01:47 -0700 Subject: [PATCH] [4/n][enums] Move compiler enums tests --- .../tests/matching/basic.exp | 1 + .../tests/matching/basic.move | 51 +++++++++++++++++ .../enums/expansion/pattern_ellipsis.exp | 8 --- .../enums/hlir/dead_code_guard.exp | 8 --- .../development/enums/matching/abc_match.exp | 8 --- .../enums/matching/abc_match_binder.exp | 8 --- .../enums/matching/abc_match_mut_ref.exp | 8 --- .../enums/matching/abc_match_no_drop.exp | 8 --- .../enums/matching/abc_match_ref.exp | 8 --- .../enums/matching/abc_match_twice.exp | 8 --- .../matching/abc_match_value_wildcard.exp | 8 --- .../enums/matching/at_pattern_copy.exp | 8 --- .../enums/matching/at_pattern_drop.exp | 8 --- .../enums/matching/at_pattern_reuse.exp | 8 --- .../enums/matching/bad_guard_1.exp | 8 --- .../enums/matching/bad_guard_2.exp | 8 --- .../enums/matching/bind_subject.exp | 8 --- .../development/enums/matching/drop_ref.exp | 8 --- .../enums/matching/enum_no_tyargs_match.exp | 8 --- .../enums/matching/enum_poly_match.exp | 8 --- .../development/enums/matching/guard.exp | 8 --- .../enums/matching/guard_backtrack.exp | 8 --- .../enums/matching/guard_backtrack_2.exp | 8 --- .../enums/matching/guard_backtrack_3.exp | 8 --- .../enums/matching/guard_backtrack_4.exp | 8 --- .../enums/matching/guard_backtrack_5.exp | 8 --- .../enums/matching/haskell_maybe.exp | 8 --- .../enums/matching/macro_match.exp | 8 --- .../development/enums/matching/match_type.exp | 8 --- .../development/enums/matching/multi_or.exp | 8 --- .../enums/matching/nested_bindings.exp | 16 ------ .../enums/matching/nested_either_borrow.exp | 8 --- .../enums/matching/nesting_defns.exp | 32 ----------- .../enums/matching/nesting_with_phantoms.exp | 32 ----------- .../enums/matching/option_default.exp | 8 --- .../enums/matching/option_enum_match.exp | 8 --- .../development/enums/matching/phantoms.exp | 56 ------------------- .../enums/matching/simple_enum_match.exp | 8 --- .../enums/matching/simple_enum_ref_match.exp | 8 --- .../enums/matching/singleton_match.exp | 8 --- .../enums/matching/tuple_specialize.exp | 8 --- .../enums/matching/unused_binding.exp | 8 --- .../enums/naming/pattern_ellipsis.exp | 16 ------ .../tests/development/enums/parser/enum.exp | 32 ----------- .../tests/development/enums/parser/match.exp | 24 -------- .../development/enums/parser/mut_match.exp | 8 --- .../enums/parser/pattern_ellipsis.exp | 8 --- .../enums/typing/mut_ref_match.exp | 8 --- .../tests/move_2024/parser/mut_match.exp | 20 +++++++ .../move/borrow_tests/factor_invalid_2.move | 2 +- .../imm_borrow_on_mut_trivial_invalid.move | 2 +- 51 files changed, 74 insertions(+), 522 deletions(-) create mode 100644 external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.exp create mode 100644 external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.move delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/expansion/pattern_ellipsis.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_binder.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_mut_ref.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_no_drop.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_ref.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_twice.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_value_wildcard.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_copy.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_drop.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_reuse.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_1.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_2.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/bind_subject.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/drop_ref.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_no_tyargs_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_poly_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/guard.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_2.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_3.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_4.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_5.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/haskell_maybe.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/macro_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/match_type.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/multi_or.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_bindings.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_either_borrow.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_defns.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_with_phantoms.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/option_default.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/option_enum_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/phantoms.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_ref_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/singleton_match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/matching/tuple_specialize.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/naming/pattern_ellipsis.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/parser/enum.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/parser/match.exp delete mode 100644 external-crates/move/crates/move-compiler/tests/development/enums/parser/pattern_ellipsis.exp create mode 100644 external-crates/move/crates/move-compiler/tests/move_2024/parser/mut_match.exp diff --git a/external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.exp b/external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.exp new file mode 100644 index 0000000000000..fc5a4436b29d4 --- /dev/null +++ b/external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.exp @@ -0,0 +1 @@ +processed 3 tasks diff --git a/external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.move b/external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.move new file mode 100644 index 0000000000000..570a452173237 --- /dev/null +++ b/external-crates/move/crates/move-compiler-transactional-tests/tests/matching/basic.move @@ -0,0 +1,51 @@ +//# init --edition development + +//# publish + +module 0x42::t { + + public enum Exp has drop { + Done, + Add, + Mul, + Num(u64), + } + + const EINVALIDEXP: u64 = 0; + + public fun evaluate(mut expressions: vector): u64 { + let mut stack = vector[]; + while (!expressions.is_empty()) { + match (expressions.pop_back()) { + Exp::Done => break, + Exp::Add => { + let e1 = stack.pop_back(); + let e2 = stack.pop_back(); + stack.push_back(e1 + e2); + }, + Exp::Mul => { + let e1 = stack.pop_back(); + let e2 = stack.pop_back(); + stack.push_back(e1 * e2); + }, + Exp::Num(number) => { + stack.push_back(number); + } + } + }; + let result = stack.pop_back(); + assert!(expressions.is_empty(), EINVALIDEXP); + assert!(stack.is_empty(), EINVALIDEXP); + result + } + + use fun evaluate as vector.evaluate; + + public fun test() { + let input = vector[Exp::Done, Exp::Add, Exp::Num(5), Exp::Num(5)]; + assert!(input.evaluate() == 10, 0); + } + +} + +//# run 0x42::t::test diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/expansion/pattern_ellipsis.exp b/external-crates/move/crates/move-compiler/tests/development/enums/expansion/pattern_ellipsis.exp deleted file mode 100644 index 47fd882f659e8..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/expansion/pattern_ellipsis.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/expansion/pattern_ellipsis.move:2:17 - │ -2 │ public enum X has drop { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/hlir/dead_code_guard.exp b/external-crates/move/crates/move-compiler/tests/development/enums/hlir/dead_code_guard.exp index 5dd14c844abf6..5521516b9328b 100644 --- a/external-crates/move/crates/move-compiler/tests/development/enums/hlir/dead_code_guard.exp +++ b/external-crates/move/crates/move-compiler/tests/development/enums/hlir/dead_code_guard.exp @@ -1,11 +1,3 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/hlir/dead_code_guard.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - warning[W09005]: dead or unreachable code ┌─ tests/development/enums/hlir/dead_code_guard.move:14:30 │ diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match.exp deleted file mode 100644 index fcd270be47989..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_binder.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_binder.exp deleted file mode 100644 index 3823eab82a630..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_binder.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match_binder.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_mut_ref.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_mut_ref.exp deleted file mode 100644 index 69f6a6cef1a21..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_mut_ref.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match_mut_ref.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_no_drop.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_no_drop.exp deleted file mode 100644 index ed649fcd552fb..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_no_drop.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match_no_drop.move:3:17 - │ -3 │ public enum ABC { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_ref.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_ref.exp deleted file mode 100644 index 5b29ca4f0d397..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_ref.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match_ref.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_twice.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_twice.exp deleted file mode 100644 index 0b2d6aa8ab43f..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_twice.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match_twice.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_value_wildcard.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_value_wildcard.exp deleted file mode 100644 index faae40695d784..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/abc_match_value_wildcard.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/abc_match_value_wildcard.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_copy.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_copy.exp deleted file mode 100644 index 9dc470c8ad1bb..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_copy.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/at_pattern_copy.move:3:17 - │ -3 │ public enum Maybe has copy, drop { - │ ^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_drop.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_drop.exp deleted file mode 100644 index abfd9e889e79d..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_drop.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/at_pattern_drop.move:3:17 - │ -3 │ public enum Maybe has drop { - │ ^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_reuse.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_reuse.exp deleted file mode 100644 index 0867f3daeeae5..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/at_pattern_reuse.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/at_pattern_reuse.move:3:17 - │ -3 │ public enum Maybe has drop { - │ ^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_1.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_1.exp deleted file mode 100644 index f1573cbd8cf4e..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_1.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/bad_guard_1.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_2.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_2.exp deleted file mode 100644 index 42dc336423c5c..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/bad_guard_2.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/bad_guard_2.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/bind_subject.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/bind_subject.exp deleted file mode 100644 index 1a94a059265a5..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/bind_subject.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/bind_subject.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/drop_ref.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/drop_ref.exp deleted file mode 100644 index 3909b64b3565f..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/drop_ref.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/drop_ref.move:3:17 - │ -3 │ public enum Temperature { - │ ^^^^^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_no_tyargs_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_no_tyargs_match.exp deleted file mode 100644 index 4343b0bd5bed9..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_no_tyargs_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/enum_no_tyargs_match.move:3:17 - │ -3 │ public enum Threes has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_poly_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_poly_match.exp deleted file mode 100644 index 8a8695722a438..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/enum_poly_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/enum_poly_match.move:3:17 - │ -3 │ public enum Threes has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard.exp deleted file mode 100644 index 379311f2a1fbd..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/guard.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack.exp deleted file mode 100644 index b4fff74b78ac7..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/guard_backtrack.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_2.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_2.exp deleted file mode 100644 index eaac4da6598ba..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_2.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/guard_backtrack_2.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_3.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_3.exp deleted file mode 100644 index 8d3e58a6c8c27..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_3.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/guard_backtrack_3.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_4.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_4.exp deleted file mode 100644 index 73bea39c0099f..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_4.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/guard_backtrack_4.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_5.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_5.exp deleted file mode 100644 index a56d54ef4f2f2..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/guard_backtrack_5.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/guard_backtrack_5.move:3:17 - │ -3 │ public enum Pair has drop { - │ ^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/haskell_maybe.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/haskell_maybe.exp deleted file mode 100644 index 61b6206300902..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/haskell_maybe.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/haskell_maybe.move:3:17 - │ -3 │ public enum Maybe has drop { - │ ^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/macro_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/macro_match.exp deleted file mode 100644 index f0e10f7166b9d..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/macro_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/macro_match.move:3:17 - │ -3 │ public enum Maybe { - │ ^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/match_type.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/match_type.exp deleted file mode 100644 index 8e3e1002c5532..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/match_type.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/match_type.move:3:17 - │ -3 │ public enum Option has drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/multi_or.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/multi_or.exp deleted file mode 100644 index 5a34b09e3f4f8..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/multi_or.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/multi_or.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_bindings.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_bindings.exp deleted file mode 100644 index 313dce06360ad..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_bindings.exp +++ /dev/null @@ -1,16 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nested_bindings.move:3:17 - │ -3 │ public enum ABC has drop { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nested_bindings.move:9:17 - │ -9 │ public enum QEither has drop { - │ ^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_either_borrow.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_either_borrow.exp deleted file mode 100644 index 3ff2ba1f2021b..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nested_either_borrow.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nested_either_borrow.move:3:17 - │ -3 │ public enum Either { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_defns.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_defns.exp deleted file mode 100644 index d503297874a07..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_defns.exp +++ /dev/null @@ -1,32 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_defns.move:2:17 - │ -2 │ public enum X { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_defns.move:9:17 - │ -9 │ public enum Y { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_defns.move:22:17 - │ -22 │ public enum PE { - │ ^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_defns.move:30:17 - │ -30 │ public enum NPE { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_with_phantoms.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_with_phantoms.exp deleted file mode 100644 index d59e967d071a2..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/nesting_with_phantoms.exp +++ /dev/null @@ -1,32 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_with_phantoms.move:2:17 - │ -2 │ public enum X { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_with_phantoms.move:9:17 - │ -9 │ public enum Y { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_with_phantoms.move:22:17 - │ -22 │ public enum PE { - │ ^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/nesting_with_phantoms.move:30:17 - │ -30 │ public enum NPE { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/option_default.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/option_default.exp deleted file mode 100644 index 31ee791eeb62e..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/option_default.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/option_default.move:3:17 - │ -3 │ public enum Option { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/option_enum_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/option_enum_match.exp deleted file mode 100644 index 71d2f7e8b836f..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/option_enum_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/option_enum_match.move:3:17 - │ -3 │ public enum Option { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/phantoms.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/phantoms.exp deleted file mode 100644 index a861eae3efc35..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/phantoms.exp +++ /dev/null @@ -1,56 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:7:17 - │ -7 │ public enum P { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:13:17 - │ -13 │ public enum Q { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:19:17 - │ -19 │ public enum R { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:25:17 - │ -25 │ public enum S { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:31:17 - │ -31 │ public enum T { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:37:17 - │ -37 │ public enum U { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/phantoms.move:43:17 - │ -43 │ public enum V { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_match.exp deleted file mode 100644 index a6dd45e349f66..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/simple_enum_match.move:3:17 - │ -3 │ public enum Box { B { x: T } } - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_ref_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_ref_match.exp deleted file mode 100644 index 28645bef74275..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/simple_enum_ref_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/simple_enum_ref_match.move:3:17 - │ -3 │ public enum Box { B { x: T } } - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/singleton_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/singleton_match.exp deleted file mode 100644 index feb6e0ac204bd..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/singleton_match.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/singleton_match.move:3:17 - │ -3 │ public enum Empty { - │ ^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/tuple_specialize.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/tuple_specialize.exp deleted file mode 100644 index a8797c6a70d8e..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/tuple_specialize.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/tuple_specialize.move:3:17 - │ -3 │ public enum Tup { - │ ^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/matching/unused_binding.exp b/external-crates/move/crates/move-compiler/tests/development/enums/matching/unused_binding.exp index 694e02de79fb7..6c1114ea5e5c1 100644 --- a/external-crates/move/crates/move-compiler/tests/development/enums/matching/unused_binding.exp +++ b/external-crates/move/crates/move-compiler/tests/development/enums/matching/unused_binding.exp @@ -1,11 +1,3 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/matching/unused_binding.move:3:17 - │ -3 │ public enum Option { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - warning[W09002]: unused variable ┌─ tests/development/enums/matching/unused_binding.move:10:26 │ diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/naming/pattern_ellipsis.exp b/external-crates/move/crates/move-compiler/tests/development/enums/naming/pattern_ellipsis.exp deleted file mode 100644 index bdeea25d9d5a5..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/naming/pattern_ellipsis.exp +++ /dev/null @@ -1,16 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/naming/pattern_ellipsis.move:2:17 - │ -2 │ public enum X has drop { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/naming/pattern_ellipsis.move:8:17 - │ -8 │ public enum Y { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/parser/enum.exp b/external-crates/move/crates/move-compiler/tests/development/enums/parser/enum.exp deleted file mode 100644 index 11b89a4a4c73e..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/parser/enum.exp +++ /dev/null @@ -1,32 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/enum.move:2:17 - │ -2 │ public enum Temperature { - │ ^^^^^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/enum.move:8:17 - │ -8 │ public enum EnumWithPhantom { - │ ^^^^^^^^^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/enum.move:12:17 - │ -12 │ public enum Action has copy, drop { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/enum.move:19:17 - │ -19 │ public enum Expression { - │ ^^^^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/parser/match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/parser/match.exp deleted file mode 100644 index d86c8b26c89f6..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/parser/match.exp +++ /dev/null @@ -1,24 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/match.move:2:17 - │ -2 │ public enum Temperature { - │ ^^^^^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/match.move:23:17 - │ -23 │ public enum Option { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/match.move:58:17 - │ -58 │ public enum Expression has drop { - │ ^^^^^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/parser/mut_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/parser/mut_match.exp index 92470b7ad2536..426569a77a823 100644 --- a/external-crates/move/crates/move-compiler/tests/development/enums/parser/mut_match.exp +++ b/external-crates/move/crates/move-compiler/tests/development/enums/parser/mut_match.exp @@ -1,11 +1,3 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/mut_match.move:2:17 - │ -2 │ public enum Option { - │ ^^^^^^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - warning[W09012]: unused 'mut' modifiers ┌─ tests/development/enums/parser/mut_match.move:11:30 │ diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/parser/pattern_ellipsis.exp b/external-crates/move/crates/move-compiler/tests/development/enums/parser/pattern_ellipsis.exp deleted file mode 100644 index 9a40da0edd5e2..0000000000000 --- a/external-crates/move/crates/move-compiler/tests/development/enums/parser/pattern_ellipsis.exp +++ /dev/null @@ -1,8 +0,0 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/parser/pattern_ellipsis.move:2:17 - │ -2 │ public enum X has drop { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - diff --git a/external-crates/move/crates/move-compiler/tests/development/enums/typing/mut_ref_match.exp b/external-crates/move/crates/move-compiler/tests/development/enums/typing/mut_ref_match.exp index f4f96341407f8..9bb6d8663c330 100644 --- a/external-crates/move/crates/move-compiler/tests/development/enums/typing/mut_ref_match.exp +++ b/external-crates/move/crates/move-compiler/tests/development/enums/typing/mut_ref_match.exp @@ -1,11 +1,3 @@ -error[E13003]: feature is under active development - ┌─ tests/development/enums/typing/mut_ref_match.move:2:17 - │ -2 │ public enum X { - │ ^ Enums are not supported in bytecode. - │ - = This feature is currently in development. - warning[W09012]: unused 'mut' modifiers ┌─ tests/development/enums/typing/mut_ref_match.move:9:22 │ diff --git a/external-crates/move/crates/move-compiler/tests/move_2024/parser/mut_match.exp b/external-crates/move/crates/move-compiler/tests/move_2024/parser/mut_match.exp new file mode 100644 index 0000000000000..6c57e8c5c7aa2 --- /dev/null +++ b/external-crates/move/crates/move-compiler/tests/move_2024/parser/mut_match.exp @@ -0,0 +1,20 @@ +warning[W09012]: unused 'mut' modifiers + ┌─ tests/move_2024/parser/mut_match.move:11:30 + │ +11 │ Option::Other { mut x } => x, + │ --- ^ The variable 'x' is never used mutably + │ │ + │ Consider removing the 'mut' declaration here + │ + = This warning can be suppressed with '#[allow(unused_let_mut)]' applied to the 'module' or module member ('const', 'fun', or 'struct') + +warning[W09012]: unused 'mut' modifiers + ┌─ tests/move_2024/parser/mut_match.move:12:33 + │ +12 │ Option::Other { x: mut y } => y, + │ --- ^ The variable 'y' is never used mutably + │ │ + │ Consider removing the 'mut' declaration here + │ + = This warning can be suppressed with '#[allow(unused_let_mut)]' applied to the 'module' or module member ('const', 'fun', or 'struct') + diff --git a/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_invalid_2.move b/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_invalid_2.move index df43dbb337feb..93b7412d5bd2f 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_invalid_2.move +++ b/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_invalid_2.move @@ -14,4 +14,4 @@ module 0x8675309::M { } } -// check: BORROWFIELD_EXISTS_MUTABLE_BORROW_ERROR +// check: FIELD_EXISTS_MUTABLE_BORROW_ERROR diff --git a/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_on_mut_trivial_invalid.move b/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_on_mut_trivial_invalid.move index 434ad624fbb74..73745f3a6855c 100644 --- a/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_on_mut_trivial_invalid.move +++ b/external-crates/move/crates/move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_on_mut_trivial_invalid.move @@ -22,4 +22,4 @@ module 0x8675309::Tester { } } -// check: BORROWFIELD_EXISTS_MUTABLE_BORROW_ERROR +// check: FIELD_EXISTS_MUTABLE_BORROW_ERROR