-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove rejected type ascription patterns from generated f*.
- Loading branch information
1 parent
de59826
commit 92e7d33
Showing
7 changed files
with
102 additions
and
31 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
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
41 changes: 41 additions & 0 deletions
41
test-harness/src/snapshots/toolchain__patterns into-fstar.snap
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,41 @@ | ||
--- | ||
source: test-harness/src/harness.rs | ||
expression: snapshot | ||
info: | ||
kind: | ||
Translate: | ||
backend: fstar | ||
info: | ||
name: patterns | ||
manifest: patterns/Cargo.toml | ||
description: ~ | ||
spec: | ||
optional: false | ||
broken: false | ||
issue_id: ~ | ||
positive: true | ||
snapshot: | ||
stderr: true | ||
stdout: true | ||
include_flag: ~ | ||
backend_options: ~ | ||
--- | ||
exit = 0 | ||
stderr = 'Finished `dev` profile [unoptimized + debuginfo] target(s) in XXs' | ||
|
||
[stdout] | ||
diagnostics = [] | ||
|
||
[stdout.files] | ||
"Patterns.fst" = ''' | ||
module Patterns | ||
#set-options "--fuel 0 --ifuel 1 --z3rlimit 15" | ||
open Core | ||
open FStar.Mul | ||
|
||
type t_Other = | Other : i32 -> t_Other | ||
|
||
type t_Test = | Test_C1 : t_Other -> t_Test | ||
|
||
let impl__test (self: t_Test) : i32 = match self with | Test_C1 c -> c._0 | ||
''' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,9 @@ | ||
[package] | ||
name = "patterns" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
||
[package.metadata.hax-tests] | ||
into."fstar" = { issue_id = "1170" } |
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,15 @@ | ||
#![allow(dead_code)] | ||
|
||
struct Other<'a>(&'a i32); | ||
|
||
enum Test<'a> { | ||
C1(Other<'a>), | ||
} | ||
|
||
impl<'a> Test<'a> { | ||
fn test(&self) -> i32 { | ||
match self { | ||
Self::C1(c) => *c.0, | ||
} | ||
} | ||
} |