-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
170 additions
and
10 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
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 |
---|---|---|
@@ -1,9 +1,138 @@ | ||
error: Unsupported statement kind: intrinsic | ||
--> tests/ui/issue-91-enum-to-discriminant-cast.rs:16:13 | ||
| | ||
16 | let _ = x as isize; | ||
| ^^^^^^^^^^ | ||
# Final LLBC before serialization: | ||
|
||
enum test_crate::Foo = | ||
| A() | ||
| B() | ||
|
||
|
||
trait core::clone::Clone<Self> | ||
{ | ||
fn clone : core::clone::Clone::clone | ||
fn clone_from : core::clone::Clone::clone_from | ||
} | ||
|
||
trait core::marker::Copy<Self> | ||
{ | ||
parent_clause_0 : [@TraitClause0]: core::clone::Clone<Self> | ||
} | ||
|
||
fn test_crate::{impl core::clone::Clone for test_crate::Foo}#1::clone<'_0>(@1: &'_0 (test_crate::Foo)) -> test_crate::Foo | ||
{ | ||
let @0: test_crate::Foo; // return | ||
let self@1: &'_ (test_crate::Foo); // arg #1 | ||
|
||
@0 := copy (*(self@1)) | ||
return | ||
} | ||
|
||
impl test_crate::{impl core::clone::Clone for test_crate::Foo}#1 : core::clone::Clone<test_crate::Foo> | ||
{ | ||
fn clone = test_crate::{impl core::clone::Clone for test_crate::Foo}#1::clone | ||
} | ||
|
||
impl test_crate::{impl core::marker::Copy for test_crate::Foo} : core::marker::Copy<test_crate::Foo> | ||
{ | ||
parent_clause0 = test_crate::{impl core::clone::Clone for test_crate::Foo}#1 | ||
} | ||
|
||
enum test_crate::Ordering = | ||
| Less() | ||
| Equal() | ||
| Greater() | ||
|
||
|
||
fn test_crate::main() | ||
{ | ||
let @0: (); // return | ||
let x@1: test_crate::Foo; // local | ||
let @2: isize; // anonymous local | ||
let @3: test_crate::Foo; // anonymous local | ||
let @4: isize; // anonymous local | ||
let @5: u8; // anonymous local | ||
let @6: bool; // anonymous local | ||
let @7: u8; // anonymous local | ||
let @8: test_crate::Foo; // anonymous local | ||
let @9: isize; // anonymous local | ||
let @10: u8; // anonymous local | ||
let @11: bool; // anonymous local | ||
let x@12: test_crate::Ordering; // local | ||
let @13: isize; // anonymous local | ||
let @14: test_crate::Ordering; // anonymous local | ||
let @15: isize; // anonymous local | ||
let @16: u8; // anonymous local | ||
let @17: bool; // anonymous local | ||
let @18: bool; // anonymous local | ||
let @19: bool; // anonymous local | ||
let @20: (); // anonymous local | ||
|
||
x@1 := test_crate::Foo::A { } | ||
@fake_read(x@1) | ||
@3 := copy (x@1) | ||
match @3 { | ||
0 => { | ||
@4 := const (0 : isize) | ||
}, | ||
1 => { | ||
@4 := const (1 : isize) | ||
} | ||
} | ||
@5 := cast<isize, u8>(copy (@4)) | ||
@6 := copy (@5) <= const (1 : u8) | ||
assert(move (@6) == true) | ||
@2 := cast<isize, isize>(move (@4)) | ||
drop @3 | ||
@fake_read(@2) | ||
drop @2 | ||
@8 := copy (x@1) | ||
match @8 { | ||
0 => { | ||
@9 := const (0 : isize) | ||
}, | ||
1 => { | ||
@9 := const (1 : isize) | ||
} | ||
} | ||
@10 := cast<isize, u8>(copy (@9)) | ||
@11 := copy (@10) <= const (1 : u8) | ||
assert(move (@11) == true) | ||
@7 := cast<isize, u8>(move (@9)) | ||
drop @8 | ||
@fake_read(@7) | ||
drop @7 | ||
x@12 := test_crate::Ordering::Greater { } | ||
@fake_read(x@12) | ||
@14 := move (x@12) | ||
match @14 { | ||
0 => { | ||
@15 := const (-1 : isize) | ||
}, | ||
1 => { | ||
@15 := const (0 : isize) | ||
}, | ||
2 => { | ||
@15 := const (1 : isize) | ||
} | ||
} | ||
@16 := cast<isize, u8>(copy (@15)) | ||
@17 := copy (@16) >= const (255 : u8) | ||
@18 := copy (@16) <= const (1 : u8) | ||
@19 := move (@17) | move (@18) | ||
assert(move (@19) == true) | ||
@13 := cast<isize, isize>(move (@15)) | ||
drop @14 | ||
@fake_read(@13) | ||
drop @13 | ||
@20 := () | ||
@0 := move (@20) | ||
drop x@12 | ||
drop x@1 | ||
@0 := () | ||
return | ||
} | ||
|
||
fn core::clone::Clone::clone<'_0, Self>(@1: &'_0 (Self)) -> Self | ||
|
||
fn core::clone::Clone::clone_from<'_0, '_1, Self>(@1: &'_0 mut (Self), @2: &'_1 (Self)) | ||
|
||
|
||
error: aborting due to 1 previous error | ||
|
||
Error: Charon driver exited with code 101 |
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,4 +1,3 @@ | ||
//@ known-failure | ||
#[derive(Copy, Clone)] | ||
enum Foo { | ||
A, | ||
|
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