Rollup merge of #61532 - wesleywiser:const_prop_more, r=oli-obk
[const-prop] Support Rvalue::{Ref,Len} and Deref
Also fixes an ICE I found in testing.
r? @oli-obk
~~The final commit is just for a perf run. I'll remove it after that is completed.~~
This commit is contained in:
commit
de6bc12868
6 changed files with 136 additions and 30 deletions
|
|
@ -16,6 +16,12 @@ warning: attempt to divide by zero
|
|||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^
|
||||
|
||||
warning: this expression will panic at runtime
|
||||
--> $DIR/promoted_errors.rs:9:20
|
||||
|
|
||||
LL | println!("{}", 1/(1-1));
|
||||
| ^^^^^^^ attempt to divide by zero
|
||||
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors.rs:11:14
|
||||
|
|
||||
|
|
@ -34,6 +40,12 @@ warning: attempt to divide by zero
|
|||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: this expression will panic at runtime
|
||||
--> $DIR/promoted_errors.rs:14:20
|
||||
|
|
||||
LL | println!("{}", 1/(false as u32));
|
||||
| ^^^^^^^^^^^^^^^^ attempt to divide by zero
|
||||
|
||||
warning: attempt to divide by zero
|
||||
--> $DIR/promoted_errors.rs:16:14
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue