rust/compiler
Jonas Schievink 6522868664
Rollup merge of #77251 - dtolnay:drop, r=Aaron1011
Bypass const_item_mutation if const's type has Drop impl

Follow-up to #75573. This PR disables the const_item_mutation lint in cases that the const has a Drop impl which observes the mutation.

```rust
struct Log { msg: &'static str }
const LOG: Log = Log { msg: "" };
impl Drop for Log {
    fn drop(&mut self) { println!("{}", self.msg); }
}

LOG.msg = "wow";  // prints "wow"
```

r? @Aaron1011
2020-10-03 00:31:12 +02:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast
rustc_ast_lowering
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_builtin_macros
rustc_codegen_llvm
rustc_codegen_ssa
rustc_data_structures
rustc_driver
rustc_error_codes Auto merge of #77354 - ecstatic-morse:const-checking-moar-errors, r=oli-obk 2020-10-01 07:38:47 +00:00
rustc_errors
rustc_expand
rustc_feature Rollup merge of #76851 - fusion-engineering-forks:fixme-nonzero, r=petrochenkov 2020-10-02 08:25:10 +09:00
rustc_fs_util
rustc_graphviz
rustc_hir
rustc_hir_pretty
rustc_incremental
rustc_index
rustc_infer
rustc_interface Add -Zprecise-enum-drop-elaboration 2020-10-01 11:31:43 -07:00
rustc_lexer
rustc_lint
rustc_llvm
rustc_macros
rustc_metadata
rustc_middle Auto merge of #77354 - ecstatic-morse:const-checking-moar-errors, r=oli-obk 2020-10-01 07:38:47 +00:00
rustc_mir Rollup merge of #77251 - dtolnay:drop, r=Aaron1011 2020-10-03 00:31:12 +02:00
rustc_mir_build
rustc_parse Rollup merge of #77444 - estebank:pat-field-label, r=davidtwco 2020-10-02 20:27:16 +02:00
rustc_parse_format
rustc_passes Rollup merge of #76811 - GuillaumeGomez:doc-alias-name-restriction, r=oli-obk,ollie27 2020-10-02 20:27:03 +02:00
rustc_plugin_impl
rustc_privacy
rustc_query_system
rustc_resolve resolve: prohibit anon const non-static lifetimes 2020-10-02 13:54:25 +01:00
rustc_save_analysis
rustc_serialize
rustc_session Add -Zprecise-enum-drop-elaboration 2020-10-01 11:31:43 -07:00
rustc_span
rustc_symbol_mangling
rustc_target
rustc_trait_selection
rustc_traits
rustc_ty
rustc_typeck