summaryrefslogtreecommitdiff
path: root/tests/features/test_match_ref.zc
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-25 15:12:12 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-25 15:12:12 +0000
commit7d1944ab9d2307f2736afe8520436872db1c7617 (patch)
tree7380a4f148f9ce0b70ed9f02cfa5e8561c783a7a /tests/features/test_match_ref.zc
parent8b720543f538862796fec0ff6b7ea12cb140bf0f (diff)
'let' it be
Diffstat (limited to 'tests/features/test_match_ref.zc')
-rw-r--r--tests/features/test_match_ref.zc10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/features/test_match_ref.zc b/tests/features/test_match_ref.zc
index 0442dc7..45ab0f4 100644
--- a/tests/features/test_match_ref.zc
+++ b/tests/features/test_match_ref.zc
@@ -5,7 +5,7 @@ enum MyOption<T> {
}
test "match_ref_int" {
- var r = MyOption<int>::Some(42);
+ let r = MyOption<int>::Some(42);
match r {
MyOption::Some(ref i) => {
// i is int*
@@ -21,9 +21,9 @@ struct Mover {
}
test "match_ref_mover" {
- var m = Mover { val: 100 };
+ let m = Mover { val: 100 };
// MyOption<Mover> instantiation
- var opt = MyOption<Mover>::Some(m);
+ let opt = MyOption<Mover>::Some(m);
match opt {
MyOption::Some(ref x) => {
@@ -50,9 +50,9 @@ enum Test {
}
test "match ref binding concrete" {
- var t = Test::ONE(Hello{ world: 123 });
+ let t = Test::ONE(Hello{ world: 123 });
- var val = 0;
+ let val = 0;
match t {
Test::ONE(ref o) => {
// o should be Hello*