Skip to content

Rollup of 5 pull requests #70404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Mar 25, 2020
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
513ea64
add missing visit_consts
lcnr Mar 23, 2020
bda976d
add missing const super folds
lcnr Mar 23, 2020
d7ecc8c
query normalize_generic_arg_after_erasing_regions
lcnr Mar 23, 2020
03bb3bd
Add long error explanation for E0710 #61137
bishtpawan Mar 24, 2020
cd9921e
Refactor changes
bishtpawan Mar 24, 2020
10226da
Update tools_lints
bishtpawan Mar 24, 2020
6c4d5d9
improve normalize cycle error
lcnr Mar 24, 2020
1509160
Add explanation for inner attribute
bishtpawan Mar 24, 2020
b31707e
Remove unknown lint from deny attribute
bishtpawan Mar 24, 2020
11763d4
update mir opt test
lcnr Mar 24, 2020
212e6ce
Implement Fuse with Option
cuviper Mar 22, 2020
bedc358
fix type name typo in doc comments
JOE1994 Mar 25, 2020
5c65568
update tool_lints
bishtpawan Mar 25, 2020
5be304b
miri: simplify shift operator overflow checking
RalfJung Mar 17, 2020
1ddbdc6
use checked casts and arithmetic in Miri engine
RalfJung Mar 21, 2020
9de6008
make bit_width return u64, consistently with other sizes in the compiler
RalfJung Mar 21, 2020
cd15b65
avoid double-cast in mplace_field
RalfJung Mar 21, 2020
d7e2650
miri: avoid a bunch of casts by offering usized-based field indexing
RalfJung Mar 21, 2020
f16b491
remove unnecessary cast
RalfJung Mar 21, 2020
0bc108a
make Size::from* methods generic in the integer type they accept
RalfJung Mar 22, 2020
afcb634
use Size addition instead of checked int addition
RalfJung Mar 24, 2020
1d67ca0
add helper method for ptr ops on Scalar; reduce unnecessary large ope…
RalfJung Mar 24, 2020
b7db732
go back to infix ops for Size
RalfJung Mar 24, 2020
7400955
add usize methods for Size getters
RalfJung Mar 24, 2020
f8e3da5
run test only on 64bit
lcnr Mar 25, 2020
4f429c0
impl TrustedRandomAccess for Fuse without FusedIterator
cuviper Mar 25, 2020
97f0a9e
Rollup merge of #70226 - RalfJung:checked, r=oli-obk
Dylan-DPC Mar 25, 2020
1154023
Rollup merge of #70319 - lcnr:issue63695, r=eddyb
Dylan-DPC Mar 25, 2020
3586ab6
Rollup merge of #70352 - bishtpawan:doc/61137-add-long-error-code-e07…
Dylan-DPC Mar 25, 2020
530c320
Rollup merge of #70366 - cuviper:option-fuse, r=dtolnay
Dylan-DPC Mar 25, 2020
9a9cb2d
Rollup merge of #70379 - JOE1994:patch-2, r=petrochenkov
Dylan-DPC Mar 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary cast
  • Loading branch information
RalfJung committed Mar 25, 2020
commit f16b4910150f841d57c92aed6fa089f387da0d92
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
// Turn the wide MPlace into a string (must already be dereferenced!)
pub fn read_str(&self, mplace: MPlaceTy<'tcx, M::PointerTag>) -> InterpResult<'tcx, &str> {
let len = mplace.len(self)?;
let bytes = self.memory.read_bytes(mplace.ptr, Size::from_bytes(u64::from(len)))?;
let bytes = self.memory.read_bytes(mplace.ptr, Size::from_bytes(len))?;
let str = ::std::str::from_utf8(bytes)
.map_err(|err| err_ub_format!("this string is not valid UTF-8: {}", err))?;
Ok(str)
Expand Down