This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 9f87deb
committed
Auto merge of rust-lang#115684 - Enselic:large_assignments-default, r=<try>
Set default `move_size_limit` to 4kB for `large_assignments` lint on nightly
Only enable it by default in the nightly compiler. The limit can be changed on a per-crate basis with:
#![feature(large_assignments)]
#![move_size_limit = "8192"]
or with
-Zmove-size-limit=8192
Does the _"enable the lint by default with a 4k threshold"_ step in rust-lang#83518.
TODO:
- [ ] Figure out how to write a test that tests that the stable compiler still has a default move_size_limit of 0. I suspect it is easy once you know the trick, but I haven't been able to figure out the trick yet.
- [ ] I found a bug where the lint is duplicated unnecessarily when generic instantiations are involved. See FIXME in the test. We should file an issue about it so we don't forget it. Or at least write a row in the tracking issue.
- [ ] The compiler seems very slow after this change. Might be tricky to fix..
r? `@oli-obk` who is E-mentor.File tree
27 files changed
+213
-20
lines changed- compiler
- rustc_interface/src
- rustc_middle/src
- middle
- ty
- rustc_query_impl/src
- rustc_session/src
- rustc_target/src/spec/apple
- library
- alloc
- benches
- src
- core
- benches
- src
- convert
- mem
- tests/ui
- async-await
- limits
- print_type_sizes
- structs-enums
27 files changed
+213
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
1321 | | - | |
| 1321 | + | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
0 commit comments