-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 5 pull requests #60672
Rollup of 5 pull requests #60672
Commits on May 7, 2019
-
Add a
cast
method to raw pointers.This is similar to `NonNull::cast`. Compared to the `as` operator (which has a wide range of meanings depending on the input and output types), a call to this method: * Can only go from a raw pointer to a raw pointer * Cannot change the pointer’s `const`ness … even when the pointed types are inferred based on context.
Configuration menu - View commit details
-
Copy full SHA for d5e8190 - Browse repository at this point
Copy the full SHA d5e8190View commit details
Commits on May 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for cf0f2b0 - Browse repository at this point
Copy the full SHA cf0f2b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee6d315 - Browse repository at this point
Copy the full SHA ee6d315View commit details
Commits on May 9, 2019
-
Inline some Cursor calls for slices
(Partially) brings back rust-lang#33921
Configuration menu - View commit details
-
Copy full SHA for b9c4301 - Browse repository at this point
Copy the full SHA b9c4301View commit details -
Configuration menu - View commit details
-
Copy full SHA for 028e78d - Browse repository at this point
Copy the full SHA 028e78dView commit details -
Rollup merge of rust-lang#60601 - SimonSapin:cast, r=Kimundi
Add a `cast` method to raw pointers. This is similar to `NonNull::cast`. Compared to the `as` operator (which has a wide range of meanings depending on the input and output types), a call to this method: * Can only go from a raw pointer to a raw pointer * Cannot change the pointer’s `const`ness … even when the pointed types are inferred based on context.
Configuration menu - View commit details
-
Copy full SHA for 8fd5587 - Browse repository at this point
Copy the full SHA 8fd5587View commit details -
Rollup merge of rust-lang#60638 - RalfJung:pin, r=sanxiyn
pin: make the to-module link more visible Cc @gnzlbg
Configuration menu - View commit details
-
Copy full SHA for a74313b - Browse repository at this point
Copy the full SHA a74313bView commit details -
Rollup merge of rust-lang#60647 - petrochenkov:nospace, r=michaelwoer…
…ister cleanup: Remove `DefIndexAddressSpace` The scheme with two address spaces for `DefIndex` was needed in the past, but apparently not needed anymore (after removing `DefId`s from locals and `HirId`-ification).
Configuration menu - View commit details
-
Copy full SHA for 26a7544 - Browse repository at this point
Copy the full SHA 26a7544View commit details -
Rollup merge of rust-lang#60656 - petertodd:2019-inline-cursor-over-s…
…lice, r=sfackler Inline some Cursor calls for slices (Partially) brings back rust-lang#33921 I've noticed in some serialization code I was writing that writes to slices produce much, much, worse code than you'd expect even with optimizations turned on. For example, you'd expect something like this to be zero cost: ``` use std::io::{self, Cursor, Write}; pub fn serialize((a, b): (u64, u64)) -> [u8;8+8] { let mut r = [0u8;16]; { let mut w = Cursor::new(&mut r[..]); w.write(&a.to_le_bytes()).unwrap(); w.write(&b.to_le_bytes()).unwrap(); } r } ``` ...but it compiles down to [dozens of instructions](https://rust.godbolt.org/z/bdwDzb) because the `slice_write()` calls aren't inlined, which in turn means `unwrap()` can't be optimized away, and so on. To be clear, this pull-req isn't sufficient by itself: if we want to go down that path we also need to add `#[inline]`'s to the default implementations for functions like `write_all()` in the `Write` trait and so on, or implement them separately in the `Cursor` impls. But I figured I'd start a conversation about what tradeoffs we're expecting here.
Configuration menu - View commit details
-
Copy full SHA for 671dd09 - Browse repository at this point
Copy the full SHA 671dd09View commit details -
Rollup merge of rust-lang#60657 - JohnTitor:stabilize-array, r=SimonS…
…apin Stabilize and re-export core::array in std Fixes rust-lang#60014
Configuration menu - View commit details
-
Copy full SHA for e40f9a6 - Browse repository at this point
Copy the full SHA e40f9a6View commit details