Uh oh!
There was an error while loading. Please reload this page.
Simplify ConstValue::ScalarPair - #57442
Conversation
| /// Needed for pattern matching code related to slices and strings. | ||
| ScalarPair(Scalar, Scalar), | ||
| /// Used only for slices and strings (`&[T]`, `&str`, `*const [T]`, `*mut str`, `Box<str>`, ...) | ||
| Slice(Scalar, u64), |
There was a problem hiding this comment.
I like this name change; ScalarPair felt a little bit cryptic.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RalfJung
commented
Jan 9, 2019
Nice! r=me with the comment fixed. |
oli-obk
commented
Jan 9, 2019
@bors r=RalfJung |
bors
commented
Jan 9, 2019
📌 Commit 3fba811 has been approved by |
oli-obk
commented
Jan 9, 2019
@bors r=RalfJung |
bors
commented
Jan 9, 2019
📌 Commit 3177a6f has been approved by |
bors
commented
Jan 10, 2019
⌛ Testing commit 3177a6f with merge e0f0935a9bb44cbac7917ae2d2a6e7936cb60f17... |
bors
commented
Jan 10, 2019
💔 Test failed - status-appveyor |
RalfJung
commented
Jan 10, 2019
Log is empty. Probably spurious. Cc @rust-lang/infra: same as #57351 (comment) |
RalfJung
commented
Jan 10, 2019
@bors retry |
Simplify `ConstValue::ScalarPair` While looking at rust-lang#57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time. r? @RalfJung
Centril
commented
Jan 13, 2019
@bors r- Failed in rollup, #57554 (comment) |
oli-obk
commented
Jan 14, 2019
@bors r=RalfJung |
bors
commented
Jan 14, 2019
📌 Commit d7f57d4 has been approved by |
oli-obk
commented
Jan 27, 2019
@bors r=RalfJung |
bors
commented
Jan 27, 2019
📌 Commit fe50b4e has been approved by |
Simplify `ConstValue::ScalarPair` While looking at rust-lang#57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time. r? @RalfJung
bors
commented
Jan 28, 2019
⌛ Testing commit fe50b4e with merge d2bdef561cf118a8795ec962ee501dc17d097c76... |
bors
commented
Jan 28, 2019
💔 Test failed - status-appveyor |
Centril
commented
Jan 28, 2019
@bors retry |
rust-highfive
commented
Jan 28, 2019
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
commented
Jan 28, 2019
bors
commented
Jan 28, 2019
☀️ Test successful - checks-travis, status-appveyor |
rasendubi
left a comment
There was a problem hiding this comment.
Also, rustc-guide refers to ScalarPair in const-eval and miri chapters.
| @@ -22,22 +22,28 @@ pub enum ConstValue<'tcx> { | |||
| /// Not using the enum `Value` to encode that this must not be `Undef` | |||
There was a problem hiding this comment.
The comment above needs an update as there is no more ScalarPair
/// Represents a constant value in Rust. Scalar and ScalarPair are optimizations which
/// matches the LocalValue optimizations for easy conversions between Value and ConstValue.
While looking at #57432 I realized that some of our types for representing constants are very big. This reduces
LazyConstto 3/4th of its original size and simplifies some code around slices at the same time.r? @RalfJung