-
Notifications
You must be signed in to change notification settings - Fork 17
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
3 changed files
with
29 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Final LLBC before serialization: | ||
|
||
global test_crate::SLICE { | ||
let @0: Array<(), 4 : usize>; // return | ||
let @1: (); // anonymous local | ||
|
||
@1 := () | ||
@0 := @ArrayRepeat<'_, (), 4 : usize>(move (@1)) | ||
drop @1 | ||
return | ||
} | ||
|
||
fn test_crate::four() -> usize | ||
|
||
|
||
|
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,7 @@ | ||
// Translating this needs the evaluatable MIR of `fn four()`, which steals its `mir_built` body. | ||
// There's no simple ordering of the translation of items that can avoid all stealing. | ||
static SLICE: [(); four()] = [(); 4]; | ||
|
||
const fn four() -> usize { | ||
2 + 2 | ||
} |