Rollup merge of #60457 - wesleywiser:const_prop_refactoring, r=oli-obk
Const prop refactoring This is rebased on top of #60428 so only the top commit is new. This is the refactoring to remove the `mir` field from `ConstPropagator` which is necessary before we can begin to actually propagate constants. r? @oli-obk
This commit is contained in:
commit
3fe5fac96d
3 changed files with 81 additions and 56 deletions
|
|
@ -13,4 +13,5 @@ const FOO: u8 = [5u8][1];
|
|||
fn main() {
|
||||
black_box((FOO, FOO));
|
||||
//~^ ERROR erroneous constant used
|
||||
//~| ERROR erroneous constant
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,11 +13,17 @@ LL | #![warn(const_err)]
|
|||
| ^^^^^^^^^
|
||||
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/const-err.rs:14:15
|
||||
--> $DIR/const-err.rs:14:16
|
||||
|
|
||||
LL | black_box((FOO, FOO));
|
||||
| ^^^^^^^^^^ referenced constant has errors
|
||||
| ^^^ referenced constant has errors
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0080]: erroneous constant used
|
||||
--> $DIR/const-err.rs:14:21
|
||||
|
|
||||
LL | black_box((FOO, FOO));
|
||||
| ^^^ referenced constant has errors
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue