forked from rust-lang/rust
-
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.
[const-prop] Handle MIR Rvalue::Aggregates
- Loading branch information
1 parent
c8f7e18
commit a2e3ed5
Showing
13 changed files
with
75 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// compile-flags: -O | ||
|
||
fn main() { | ||
let x = (0, 1, 2).1 + 0; | ||
} | ||
|
||
// END RUST SOURCE | ||
// START rustc.main.ConstProp.before.mir | ||
// bb0: { | ||
// ... | ||
// _3 = (const 0i32, const 1i32, const 2i32); | ||
// _2 = (_3.1: i32); | ||
// _1 = Add(move _2, const 0i32); | ||
// ... | ||
// } | ||
// END rustc.main.ConstProp.before.mir | ||
// START rustc.main.ConstProp.after.mir | ||
// bb0: { | ||
// ... | ||
// _3 = (const 0i32, const 1i32, const 2i32); | ||
// _2 = const 1i32; | ||
// _1 = Add(move _2, const 0i32); | ||
// ... | ||
// } | ||
// END rustc.main.ConstProp.after.mir |
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,5 +1,7 @@ | ||
fn main() { | ||
[1][0u64 as usize]; | ||
[1][1.5 as usize]; //~ ERROR index out of bounds | ||
//~| ERROR this expression will panic at runtime | ||
[1][1u64 as usize]; //~ ERROR index out of bounds | ||
//~| ERROR this expression will panic at runtime | ||
} |
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