-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 4 pull requests #95393
Rollup of 4 pull requests #95393
Commits on Aug 26, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 01b9fac - Browse repository at this point
Copy the full SHA 01b9facView commit details
Commits on Feb 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ee23fd2 - Browse repository at this point
Copy the full SHA ee23fd2View commit details
Commits on Mar 16, 2022
-
Docs: make Vec::from_raw_parts documentation less strict
This is my first PR; be gentle! In https://users.rust-lang.org/t/why-does-vec-from-raw-parts-require-same-size-and-not-same-size-capacity/73036/2?u=janpaul123 it was suggested to me that I should make a PR to make the documentation of `Vec::from_raw_parts` less strict, since we don't require `T` to have the same size, just `size_of::<T>() * capacity` to be the same, since that is what results in `Layout::size` being the same in `dealloc`, which is really what matters. Also in https://users.rust-lang.org/t/why-does-vec-from-raw-parts-require-same-size-and-not-same-size-capacity/73036/8?u=janpaul123 it was suggested that it's better to use `slice::from_raw_parts`, which I think is useful advise that could also be mentioned in the docs, so I added that too. Let me know what you think! :)
Configuration menu - View commit details
-
Copy full SHA for 80340f6 - Browse repository at this point
Copy the full SHA 80340f6View commit details
Commits on Mar 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5dd7027 - Browse repository at this point
Copy the full SHA 5dd7027View commit details
Commits on Mar 28, 2022
-
Rollup merge of rust-lang#88375 - joshlf:patch-3, r=dtolnay
Clarify that ManuallyDrop<T> has same layout as T This PR implements the documentation change under discussion in rust-lang/unsafe-code-guidelines#302. It should not be approved or merged until the discussion there is resolved.
Configuration menu - View commit details
-
Copy full SHA for 9412316 - Browse repository at this point
Copy the full SHA 9412316View commit details -
Rollup merge of rust-lang#93755 - ChayimFriedman2:allow-comparing-vec…
…s-with-different-allocators, r=dtolnay Allow comparing `Vec`s with different allocators using `==` See https://stackoverflow.com/q/71021633/7884305. I did not changed the `PartialOrd` impl too because it was not generic already (didn't support `Vec<T> <=> Vec<U> where T: PartialOrd<U>`). Does it needs tests? I don't think this will hurt type inference much because the default allocator is usually not inferred (`new()` specifies it directly, and even with other allocators, you pass the allocator to `new_in()` so the compiler usually knows the type). I think this requires FCP since the impls are already stable.
Configuration menu - View commit details
-
Copy full SHA for 6ed1a67 - Browse repository at this point
Copy the full SHA 6ed1a67View commit details -
Rollup merge of rust-lang#95016 - janpaul123:patch-1, r=dtolnay
Docs: make Vec::from_raw_parts documentation less strict This is my first PR; be gentle! In https://users.rust-lang.org/t/why-does-vec-from-raw-parts-require-same-size-and-not-same-size-capacity/73036/2?u=janpaul123 it was suggested to me that I should make a PR to make the documentation of `Vec::from_raw_parts` less strict, since we don't require `T` to have the same size, just `size_of::<T>() * capacity` to be the same, since that is what results in `Layout::size` being the same in `dealloc`, which is really what matters. Also in https://users.rust-lang.org/t/why-does-vec-from-raw-parts-require-same-size-and-not-same-size-capacity/73036/8?u=janpaul123 it was suggested that it's better to use `slice::from_raw_parts`, which I think is useful advise that could also be mentioned in the docs, so I added that too. Let me know what you think! :)
Configuration menu - View commit details
-
Copy full SHA for d88c03c - Browse repository at this point
Copy the full SHA d88c03cView commit details -
Rollup merge of rust-lang#95098 - shepmaster:vec-from-array-ref, r=dt…
…olnay impl From<&[T; N]> and From<&mut [T; N]> for Vec<T> I really wanted to write: ```rust fn example(a: impl Into<Vec<u8>>) {} fn main() { example(b"raw"); } ```
Configuration menu - View commit details
-
Copy full SHA for 8bfc03f - Browse repository at this point
Copy the full SHA 8bfc03fView commit details