forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bevyengine#7 from robtfm/4-using-imported-consts-i…
…n-let-statements-can-fail rescope imported constants
- Loading branch information
Showing
6 changed files
with
105 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#define_import_path bind | ||
|
||
#import consts | ||
|
||
let y: u32 = 2u; | ||
|
||
var<private> arr: array<u32, consts::X>; |
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,3 @@ | ||
#define_import_path consts | ||
|
||
let X: u32 = 1u; |
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,6 @@ | ||
#import consts | ||
#import bind | ||
|
||
fn main() -> f32 { | ||
return f32(bind::arr[0]); | ||
} |
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,13 @@ | ||
let _naga_oil__mod__MNXW443UOM__member__X: u32 = 1u; | ||
|
||
let _naga_oil__mod__MJUW4ZA__member__y: u32 = 2u; | ||
|
||
let _naga_oil__mod__MJUW4ZA__member___naga_oil__mod__MNXW443UOM__member__X: u32 = 1u; | ||
|
||
var<private> _naga_oil__mod__MJUW4ZA__member__arr: array<u32,_naga_oil__mod__MJUW4ZA__member___naga_oil__mod__MNXW443UOM__member__X>; | ||
|
||
fn main() -> f32 { | ||
let _e6: u32 = _naga_oil__mod__MJUW4ZA__member__arr[0]; | ||
return f32(_e6); | ||
} | ||
|