rust/compiler
Matthias Krüger a0724d72b0
Rollup merge of #89988 - tmiasko:unpromote-const-drop, r=oli-obk
Do not promote values with const drop that need to be dropped

Changes from #88558 allowed using `~const Drop` in constants by
introducing a new `NeedsNonConstDrop` qualif.

The new qualif was also used for promotion purposes, and allowed
promotion to happen for values that needs to be dropped but which
do have a const drop impl.

Since for promoted the drop implementation is never executed,
this lead to observable change in behaviour. For example:

```rust

struct Panic();

impl const Drop for Panic {
    fn drop(&mut self) {
        panic!();
    }
}

fn main() {
    let _ = &Panic();
}
```

Restore the use of `NeedsDrop` qualif during promotion to avoid the issue.
2021-10-19 05:40:54 +02:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser 2021-10-18 08:13:30 +02:00
rustc_ast_lowering Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_ast_passes Some "parenthesis" and "parentheses" fixes 2021-10-17 12:04:01 +02:00
rustc_ast_pretty Some "parenthesis" and "parentheses" fixes 2021-10-17 12:04:01 +02:00
rustc_attr Correct typo 2021-10-16 13:36:05 -07:00
rustc_borrowck Auto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726 2021-10-18 23:02:53 +00:00
rustc_builtin_macros rustc_span: Ident::invalid -> Ident::empty 2021-10-17 23:20:30 +03:00
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm
rustc_codegen_ssa
rustc_const_eval Do not promote values with const drop that need to be dropped 2021-10-18 21:56:57 +02:00
rustc_data_structures
rustc_driver Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_error_codes Member constraints already covered all of E0482 already, so that error never occurred anymore 2021-10-18 15:50:56 +00:00
rustc_errors emitter: current substitution can be multi-line 2021-10-15 15:30:43 +00:00
rustc_expand rustc_span: Ident::invalid -> Ident::empty 2021-10-17 23:20:30 +03:00
rustc_feature
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_hir_pretty Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_incremental
rustc_index
rustc_infer Auto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726 2021-10-18 23:02:53 +00:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #89987 - pierwill:fix-85526-docs-hidden-assoc, r=GuillaumeGomez 2021-10-18 08:13:28 +02:00
rustc_lint_defs
rustc_llvm RustWrapper: adapt for an LLVM API change 2021-10-18 09:48:47 +02:00
rustc_macros
rustc_metadata Auto merge of #89514 - davidtwco:polymorphize-shims-and-predicates, r=lcnr 2021-10-17 12:33:12 +00:00
rustc_middle Rollup merge of #89988 - tmiasko:unpromote-const-drop, r=oli-obk 2021-10-19 05:40:54 +02:00
rustc_mir_build
rustc_mir_dataflow
rustc_mir_transform Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_monomorphize Auto merge of #89514 - davidtwco:polymorphize-shims-and-predicates, r=lcnr 2021-10-17 12:33:12 +00:00
rustc_parse Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser 2021-10-18 08:13:30 +02:00
rustc_parse_format
rustc_passes
rustc_plugin_impl
rustc_privacy
rustc_query_impl
rustc_query_system Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_resolve Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_save_analysis
rustc_serialize
rustc_session
rustc_span Rollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank 2021-10-19 05:40:53 +02:00
rustc_symbol_mangling
rustc_target HermitCore's kernel itself doesn't support TLS 2021-10-16 09:41:59 +02:00
rustc_trait_selection Auto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726 2021-10-18 23:02:53 +00:00
rustc_traits Move some outlives bounds things from rustc_trait_selection to rustc_typeck 2021-10-15 12:14:19 -04:00
rustc_ty_utils
rustc_type_ir
rustc_typeck Auto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726 2021-10-18 23:02:53 +00:00