fix error when a dangling ref in a ManuallyDrop is used in a pattern#159707
Conversation
|
@bors try |
This comment has been minimized.
This comment has been minimized.
remove StructuralPartialEq from MaybeDangling and ManuallyDrop
This comment has been minimized.
This comment has been minimized.
c73f4ac to
83c3709
Compare
This comment has been minimized.
This comment has been minimized.
|
Ah, we have a test specifically checking that it can be used in a match.^^ Still seems worth taking back if we can. |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
Apparently this has worked since Rust 1.31 so... actually it's probably not worth trying to take this back. We should just give a better error message for this case. @craterbot cancel |
|
🗑️ Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
@RalfJung I think this is potentially still worth to try to take back; using |
|
I feel like a breaking change for something that worked for >5 years should have a stronger motivation than that. |
83c3709 to
c22fbbe
Compare
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
…r=WaffleLapkin fix error when a dangling ref in a ManuallyDrop is used in a pattern Fixes rust-lang#159701 Cc @rust-lang/wg-const-eval
…uwer Rollup of 12 pull requests Successful merges: - #159712 (Subtree sync for rustc_codegen_cranelift) - #155697 (Stabilize c-variadic function definitions) - #159285 (Simplify `apply_effects_in_range`) - #159596 (unify the AST repr of type const and const RHS) - #159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes) - #159659 (Move `Limit` out of `rustc_hir`) - #159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern) - #158479 (Reject static item as direct const generic arg) - #158738 (next_trait_solver: Recover from GCE const exprs) - #159451 (Remove config cloning in compiletest) - #159646 (Increase depth for float infer var fallback hack) - #159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
…uwer Rollup of 11 pull requests Successful merges: - #159712 (Subtree sync for rustc_codegen_cranelift) - #155697 (Stabilize c-variadic function definitions) - #159285 (Simplify `apply_effects_in_range`) - #159596 (unify the AST repr of type const and const RHS) - #159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes) - #159659 (Move `Limit` out of `rustc_hir`) - #159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern) - #158738 (next_trait_solver: Recover from GCE const exprs) - #159451 (Remove config cloning in compiletest) - #159646 (Increase depth for float infer var fallback hack) - #159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
Rollup merge of #159707 - RalfJung:dangling-ref-in-pattern, r=WaffleLapkin fix error when a dangling ref in a ManuallyDrop is used in a pattern Fixes #159701 Cc @rust-lang/wg-const-eval
…uwer Rollup of 11 pull requests Successful merges: - rust-lang/rust#159712 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#155697 (Stabilize c-variadic function definitions) - rust-lang/rust#159285 (Simplify `apply_effects_in_range`) - rust-lang/rust#159596 (unify the AST repr of type const and const RHS) - rust-lang/rust#159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes) - rust-lang/rust#159659 (Move `Limit` out of `rustc_hir`) - rust-lang/rust#159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern) - rust-lang/rust#158738 (next_trait_solver: Recover from GCE const exprs) - rust-lang/rust#159451 (Remove config cloning in compiletest) - rust-lang/rust#159646 (Increase depth for float infer var fallback hack) - rust-lang/rust#159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
…uwer Rollup of 11 pull requests Successful merges: - rust-lang/rust#159712 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#155697 (Stabilize c-variadic function definitions) - rust-lang/rust#159285 (Simplify `apply_effects_in_range`) - rust-lang/rust#159596 (unify the AST repr of type const and const RHS) - rust-lang/rust#159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes) - rust-lang/rust#159659 (Move `Limit` out of `rustc_hir`) - rust-lang/rust#159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern) - rust-lang/rust#158738 (next_trait_solver: Recover from GCE const exprs) - rust-lang/rust#159451 (Remove config cloning in compiletest) - rust-lang/rust#159646 (Increase depth for float infer var fallback hack) - rust-lang/rust#159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
Fixes #159701
Cc @rust-lang/wg-const-eval