-
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 9 pull requests #70174
Rollup of 9 pull requests #70174
Commits on Mar 11, 2020
-
Compute the correct layout for variants of uninhabited enums and read…
…d a long lost assertion This reverts part of commit 9712fa4.
Configuration menu - View commit details
-
Copy full SHA for cdc7304 - Browse repository at this point
Copy the full SHA cdc7304View commit details -
Co-Authored-By: Ralf Jung <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ec88ffa - Browse repository at this point
Copy the full SHA ec88ffaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74608c7 - Browse repository at this point
Copy the full SHA 74608c7View commit details
Commits on Mar 12, 2020
-
codegen/mir: support polymorphic
InstanceDef
sThis commit modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bee1513 - Browse repository at this point
Copy the full SHA bee1513View commit details
Commits on Mar 19, 2020
-
Add regression test for TAIT lifetime inference (issue rust-lang#55099)
Fixes rust-lang#55099 The minimized reproducer in issue rust-lang#55099 now compiles successfully. This commit adds a regression test for it.
Configuration menu - View commit details
-
Copy full SHA for fda913b - Browse repository at this point
Copy the full SHA fda913bView commit details -
patch is required to avoid compiler errors by building src/libpanic_unwind/hermit.rs
Configuration menu - View commit details
-
Copy full SHA for 410cd7a - Browse repository at this point
Copy the full SHA 410cd7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c38ecf - Browse repository at this point
Copy the full SHA 2c38ecfView commit details -
Configuration menu - View commit details
-
Copy full SHA for be06f67 - Browse repository at this point
Copy the full SHA be06f67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f16118 - Browse repository at this point
Copy the full SHA 6f16118View commit details -
Clarify the relationship between
forget()
andManuallyDrop
.As discussed on reddit, this commit addresses two issues with the documentation of `mem::forget()`: * The documentation of `mem::forget()` can confuse the reader because of the discrepancy between usage examples that show correct usage and the accompanying text which speaks of the possibility of double-free. The text that says "if the panic occurs before `mem::forget` was called" refers to a variant of the second example that was never shown, modified to use `mem::forget` instead of `ManuallyDrop`. Ideally the documentation should show both variants, so it's clear what it's talking about. Also, the double free could be fixed just by placing `mem::forget(v)` before the construction of `s`. Since the lifetimes of `s` and `v` wouldn't overlap, there would be no point where panic could cause a double free. This could be mentioned, and contrasted against the more robust fix of using `ManuallyDrop`. * This sentence seems unjustified: "For some types, operations such as passing ownership (to a funcion like `mem::forget`) requires them to actually be fully owned right now [...]". Unlike C++, Rust has no move constructors, its moves are (possibly elided) bitwise copies. Even if you pass an invalid object to `mem::forget`, no harm should come to pass because `mem::forget` consumes the object and exists solely to prevent drop, so there no one left to observe the invalid state state.
Configuration menu - View commit details
-
Copy full SHA for 8e0398c - Browse repository at this point
Copy the full SHA 8e0398cView commit details -
Restore (and reword) the warning against passing invalid values to me…
…m::forget. As pointed out by Ralf Jung, dangling references and boxes are undefined behavior as per https://doc.rust-lang.org/reference/behavior-considered-undefined.html and the Miri checker.
Configuration menu - View commit details
-
Copy full SHA for 2a08b0e - Browse repository at this point
Copy the full SHA 2a08b0eView commit details -
Minor re-wordings and typo fixes.
Co-Authored-By: Ralf Jung <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7554341 - Browse repository at this point
Copy the full SHA 7554341View commit details -
Don't hard-code the vector length in the examples.
Co-Authored-By: lzutao <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2bebe8d - Browse repository at this point
Copy the full SHA 2bebe8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89ef59a - Browse repository at this point
Copy the full SHA 89ef59aView commit details
Commits on Mar 20, 2020
-
Rollup merge of rust-lang#69618 - hniksic:mem-forget-doc-fix, r=RalfJung
Clarify the relationship between `forget()` and `ManuallyDrop`. As discussed on reddit, this commit addresses two issues with the documentation of `mem::forget()`: * The documentation of `mem::forget()` can confuse the reader because of the discrepancy between usage examples that show correct usage and the accompanying text which speaks of the possibility of double-free. The text that says "if the panic occurs before `mem::forget` was called" refers to a variant of the second example that was never shown, modified to use `mem::forget` instead of `ManuallyDrop`. Ideally the documentation should show both variants, so it's clear what it's talking about. Also, the double free could be fixed just by placing `mem::forget(v)` before the construction of `s`. Since the lifetimes of `s` and `v` wouldn't overlap, there would be no point where panic could cause a double free. This could be mentioned, and contrasted against the more robust fix of using `ManuallyDrop`. * This sentence seems unjustified: "For some types, operations such as passing ownership (to a funcion like `mem::forget`) requires them to actually be fully owned right now [...]". Unlike C++, Rust has no move constructors, its moves are (possibly elided) bitwise copies. Even if you pass an invalid object to `mem::forget`, no harm should come to pass because `mem::forget` consumes the object and exists solely to prevent drop, so there no one left to observe the invalid state state.
Configuration menu - View commit details
-
Copy full SHA for 5d39517 - Browse repository at this point
Copy the full SHA 5d39517View commit details -
Rollup merge of rust-lang#69768 - oli-obk:union_field_ice, r=eddyb,Ra…
…lfJung Compute the correct layout for variants of uninhabited enums r? @eddyb cc @RalfJung fixes rust-lang#69191 cc rust-lang#69763
Configuration menu - View commit details
-
Copy full SHA for 3554f2d - Browse repository at this point
Copy the full SHA 3554f2dView commit details -
Rollup merge of rust-lang#69935 - davidtwco:issue-69925, r=eddyb
codegen/mir: support polymorphic `InstanceDef`s cc rust-lang#69925 This PR modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s. r? @eddyb cc @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 9dc6994 - Browse repository at this point
Copy the full SHA 9dc6994View commit details -
Rollup merge of rust-lang#70103 - GuillaumeGomez:cleanup-e0437, r=Dyl…
…an-DPC Clean up E0437 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 532133b - Browse repository at this point
Copy the full SHA 532133bView commit details -
Rollup merge of rust-lang#70131 - Aaron1011:fix/issue-55099-test, r=n…
…ikomatsakis Add regression test for TAIT lifetime inference (issue rust-lang#55099) Fixes rust-lang#55099 The minimized reproducer in issue rust-lang#55099 now compiles successfully. This commit adds a regression test for it.
Configuration menu - View commit details
-
Copy full SHA for 2f77d5f - Browse repository at this point
Copy the full SHA 2f77d5fView commit details -
Rollup merge of rust-lang#70133 - hermitcore:libpanic_unwind, r=nikom…
…atsakis remove unused imports patch is required to avoid compiler errors by building src/libpanic_unwind/hermit.rs
Configuration menu - View commit details
-
Copy full SHA for 8615a36 - Browse repository at this point
Copy the full SHA 8615a36View commit details -
Rollup merge of rust-lang#70145 - lzutao:patch-1, r=Dylan-DPC
doc: Add quote to .init_array The current formatting is not good without quotes: ![without-quote](https://i.imgur.com/RkIm4cr.png)
Configuration menu - View commit details
-
Copy full SHA for d6ebf21 - Browse repository at this point
Copy the full SHA d6ebf21View commit details -
Rollup merge of rust-lang#70146 - GuillaumeGomez:cleanup-e0438, r=Dyl…
…an-DPC Clean up e0438 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 8965f63 - Browse repository at this point
Copy the full SHA 8965f63View commit details -
Rollup merge of rust-lang#70150 - rust-lang:accept-felixes-typo, r=Ma…
…rk-Simulacrum triagebot.toml: accept cleanup-crew r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 43c7a50 - Browse repository at this point
Copy the full SHA 43c7a50View commit details