From 18484e28ef7b13b95dc3af0b1e34c2181e1778e5 Mon Sep 17 00:00:00 2001
From: Ryan Lahfa
Date: Wed, 17 Apr 2024 00:01:34 +0200
Subject: compiler: map `core::mem::swap` to the pure swap

In the pure functional model, `swap` is mostly about borrow checking and
should simplify to the pure swap in our backends.

Other backends than Lean are not done in this commit.

Signed-off-by: Ryan Lahfa <ryan.lahfa@inria.fr>
---
 tests/lean/External/FunsExternal_Template.lean | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'tests/lean/External/FunsExternal_Template.lean')

diff --git a/tests/lean/External/FunsExternal_Template.lean b/tests/lean/External/FunsExternal_Template.lean
index 38151dc9..f0e771f7 100644
--- a/tests/lean/External/FunsExternal_Template.lean
+++ b/tests/lean/External/FunsExternal_Template.lean
@@ -6,12 +6,6 @@ import External.Types
 open Primitives
 open external
 
-/- [core::mem::swap]:
-   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/mem/mod.rs', lines 726:0-726:42
-   Name pattern: core::mem::swap -/
-axiom core.mem.swap
-  (T : Type) : T → T → State → Result (State × (T × T))
-
 /- [core::num::nonzero::{core::num::nonzero::NonZeroU32#14}::new]:
    Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 79:16-79:57
    Name pattern: core::num::nonzero::{core::num::nonzero::NonZeroU32}::new -/
-- 
cgit v1.2.3


From 703261b6c8ad680a925ae0550117a85d9dfa40fe Mon Sep 17 00:00:00 2001
From: Son Ho
Date: Thu, 25 Apr 2024 13:42:23 +0200
Subject: Update the tests for External

---
 tests/lean/External/FunsExternal_Template.lean | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

(limited to 'tests/lean/External/FunsExternal_Template.lean')

diff --git a/tests/lean/External/FunsExternal_Template.lean b/tests/lean/External/FunsExternal_Template.lean
index f0e771f7..a6163c96 100644
--- a/tests/lean/External/FunsExternal_Template.lean
+++ b/tests/lean/External/FunsExternal_Template.lean
@@ -6,15 +6,18 @@ import External.Types
 open Primitives
 open external
 
-/- [core::num::nonzero::{core::num::nonzero::NonZeroU32#14}::new]:
-   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/num/nonzero.rs', lines 79:16-79:57
-   Name pattern: core::num::nonzero::{core::num::nonzero::NonZeroU32}::new -/
-axiom core.num.nonzero.NonZeroU32.new
-  : U32 → State → Result (State × (Option core.num.nonzero.NonZeroU32))
+/- [core::cell::{core::cell::Cell<T>#10}::get]:
+   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/cell.rs', lines 497:4-497:26
+   Name pattern: core::cell::{core::cell::Cell<@T>}::get -/
+axiom core.cell.Cell.get
+  (T : Type) (markerCopyInst : core.marker.Copy T) :
+  core.cell.Cell T → State → Result (State × T)
 
-/- [core::option::{core::option::Option<T>}::unwrap]:
-   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/option.rs', lines 932:4-932:34
-   Name pattern: core::option::{core::option::Option<@T>}::unwrap -/
-axiom core.option.Option.unwrap
-  (T : Type) : Option T → State → Result (State × T)
+/- [core::cell::{core::cell::Cell<T>#11}::get_mut]:
+   Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/core/src/cell.rs', lines 574:4-574:39
+   Name pattern: core::cell::{core::cell::Cell<@T>}::get_mut -/
+axiom core.cell.Cell.get_mut
+  (T : Type) :
+  core.cell.Cell T → State → Result (State × (T × (T → State → Result
+    (State × (core.cell.Cell T)))))
 
-- 
cgit v1.2.3

