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:
Mazdak Farrokhzad 2019-06-07 16:48:03 +02:00 committed by GitHub
commit de6bc12868
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 136 additions and 30 deletions

View file

@ -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
|