-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a naming issue at extraction and add
Box::as_mut
- Loading branch information
Showing
8 changed files
with
99 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import Lean | ||
import Aeneas.Std.Core | ||
import Aeneas.Std.Core | ||
|
||
namespace Aeneas | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS | ||
-- [as_mut] | ||
import Aeneas | ||
open Aeneas.Std Result Error | ||
set_option linter.dupNamespace false | ||
set_option linter.hashCommand false | ||
set_option linter.unusedVariables false | ||
|
||
namespace as_mut | ||
|
||
/- [as_mut::use_box_as_mut]: | ||
Source: 'tests/src/as_mut.rs', lines 2:0-4:1 -/ | ||
def use_box_as_mut {T : Type} (x : T) : Result (T × (T → T)) := | ||
ok (alloc.boxed.AsMutBoxT.as_mut x) | ||
|
||
/- [as_mut::use_as_mut]: | ||
Source: 'tests/src/as_mut.rs', lines 6:0-8:1 -/ | ||
def use_as_mut | ||
{S : Type} {T : Type} (coreconvertAsMutInst : core.convert.AsMut T S) | ||
(x : T) : | ||
Result (S × (S → T)) | ||
:= | ||
coreconvertAsMutInst.as_mut x | ||
|
||
end as_mut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@ [!lean] skip | ||
fn use_box_as_mut<T>(mut x : &mut Box<T>) -> &mut T{ | ||
x.as_mut() | ||
} | ||
|
||
fn use_as_mut<S, T : core::convert::AsMut<S>>(mut x : &mut T) -> &mut S { | ||
x.as_mut() | ||
} |