rust/compiler/rustc_session/src
bors 88197214b8 Auto merge of #75573 - Aaron1011:feature/const-mutation-lint, r=oli-obk
Add CONST_ITEM_MUTATION lint

Fixes #74053
Fixes #55721

This PR adds a new lint `CONST_ITEM_MUTATION`.
Given an item `const FOO: SomeType = ..`, this lint fires on:

* Attempting to write directly to a field (`FOO.field = some_val`) or
  array entry (`FOO.array_field[0] = val`)
* Taking a mutable reference to the `const` item (`&mut FOO`), including
  through an autoderef `FOO.some_mut_self_method()`

The lint message explains that since each use of a constant creates a
new temporary, the original `const` item will not be modified.
2020-09-10 05:54:26 +00:00
..
lint Auto merge of #75573 - Aaron1011:feature/const-mutation-lint, r=oli-obk 2020-09-10 05:54:26 +00:00
cgu_reuse_tracker.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
code_stats.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
config.rs Auto merge of #76004 - richkadel:llvm-coverage-map-gen-6b.5, r=tmandry 2020-09-04 01:31:07 +00:00
filesearch.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib.rs datastructures: replace once_cell crate with an impl from std 2020-08-30 20:06:14 +01:00
lint.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
options.rs Rollup merge of #76500 - richkadel:mir-graphviz-dark, r=tmandry 2020-09-09 21:02:35 -07:00
output.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
parse.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
search_paths.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
session.rs Auto merge of #75138 - jumbatm:session-diagnostic-derive, r=oli-obk 2020-09-08 00:58:43 +00:00
utils.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00