Skip to content

Commit 39a42c3

Browse files
committed
Mark #[allow(large_assignments)] for existing large moves
1 parent f06b7c5 commit 39a42c3

File tree

20 files changed

+26
-6
lines changed

20 files changed

+26
-6
lines changed

compiler/rustc_interface/src/passes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ pub fn create_global_ctxt<'tcx>(
716716

717717
sess.time("setup_global_ctxt", || {
718718
gcx_cell.get_or_init(move || {
719+
#[allow(large_assignments)]
719720
TyCtxt::create_global_ctxt(
720721
sess,
721722
crate_types,

compiler/rustc_interface/src/queries.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub struct Queries<'tcx> {
9393

9494
impl<'tcx> Queries<'tcx> {
9595
pub fn new(compiler: &'tcx Compiler) -> Queries<'tcx> {
96+
#[allow(large_assignments)]
9697
Queries {
9798
compiler,
9899
gcx_cell: OnceLock::new(),

compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(rustc::bad_opt_access)]
1+
#![allow(rustc::bad_opt_access, large_assignments)]
22
use crate::interface::parse_cfgspecs;
33

44
use rustc_data_structures::fx::FxHashSet;

compiler/rustc_interface/src/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub fn create_session(
126126
sess.parse_sess.config = cfg;
127127
sess.parse_sess.check_config = check_cfg;
128128

129+
#[allow(large_assignments)]
129130
(sess, codegen_backend)
130131
}
131132

compiler/rustc_middle/src/ty/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ impl<'tcx> TyCtxt<'tcx> {
713713
let common_lifetimes = CommonLifetimes::new(&interners);
714714
let common_consts = CommonConsts::new(&interners, &common_types);
715715

716+
#[allow(large_assignments)]
716717
GlobalCtxt {
717718
sess: s,
718719
crate_types,

compiler/rustc_query_impl/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ pub fn query_system<'tcx>(
209209
on_disk_cache: Option<OnDiskCache<'tcx>>,
210210
incremental: bool,
211211
) -> QuerySystem<'tcx> {
212+
#[allow(large_assignments)]
212213
QuerySystem {
213214
states: Default::default(),
214215
arenas: Default::default(),

compiler/rustc_session/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ fn default_emitter(
13121312
}
13131313

13141314
// JUSTIFICATION: literally session construction
1315-
#[allow(rustc::bad_opt_access)]
1315+
#[allow(rustc::bad_opt_access, large_assignments)]
13161316
pub fn build_session(
13171317
handler: &EarlyErrorHandler,
13181318
sopts: config::Options,

compiler/rustc_target/src/spec/apple/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(large_assignments)]
2+
13
use crate::spec::{
24
aarch64_apple_darwin, aarch64_apple_ios_sim, aarch64_apple_watchos_sim, i686_apple_darwin,
35
x86_64_apple_darwin, x86_64_apple_ios, x86_64_apple_tvos, x86_64_apple_watchos_sim,

library/alloc/benches/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#![feature(strict_provenance)]
99
#![feature(test)]
1010
#![deny(fuzzy_provenance_casts)]
11+
#![allow(large_assignments)]
1112

1213
extern crate test;
1314

library/alloc/benches/vec_deque.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(large_assignments)]
2+
13
use core::iter::Iterator;
24
use std::{
35
collections::{vec_deque, VecDeque},

library/alloc/src/boxed.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
837837
///
838838
/// ```
839839
/// #![feature(new_uninit)]
840+
/// #![allow(large_assignments)]
840841
///
841842
/// let big_box = Box::<[usize; 1024]>::new_uninit();
842843
///

library/core/benches/array.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(large_assignments)]
2+
13
use test::black_box;
24
use test::Bencher;
35

library/core/benches/iter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(large_assignments)]
2+
13
use core::borrow::Borrow;
24
use core::iter::*;
35
use core::mem;

library/core/src/mem/maybe_uninit.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ use crate::slice;
9797
/// unnecessary moves.
9898
///
9999
/// ```
100+
/// ##![allow(large_assignments)]
100101
/// use std::mem::MaybeUninit;
101102
///
102103
/// unsafe fn make_vec(out: *mut Vec<i32>) {
@@ -117,6 +118,7 @@ use crate::slice;
117118
/// `MaybeUninit<T>` can be used to initialize a large array element-by-element:
118119
///
119120
/// ```
121+
/// ##![allow(large_assignments)]
120122
/// use std::mem::{self, MaybeUninit};
121123
///
122124
/// let data = {
@@ -145,6 +147,7 @@ use crate::slice;
145147
/// be found in low-level datastructures.
146148
///
147149
/// ```
150+
/// ##![allow(large_assignments)]
148151
/// use std::mem::MaybeUninit;
149152
///
150153
/// // Create an uninitialized array of `MaybeUninit`. The `assume_init` is

tests/ui/limits/huge-array.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(large_assignments)]
12
// build-fail
23

34
fn generic<T: Copy>(t: T) {

tests/ui/limits/huge-array.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: values of the type `[[u8; 1518599999]; 1518600000]` are too big for the current architecture
2-
--> $DIR/huge-array.rs:4:9
2+
--> $DIR/huge-array.rs:5:9
33
|
44
LL | let s: [T; 1518600000] = [t; 1518600000];
55
| ^

tests/ui/print_type_sizes/async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// build-pass
44
// ignore-pass
55

6-
#![allow(dropping_copy_types)]
6+
#![allow(dropping_copy_types, large_assignments)]
77

88
async fn wait() {}
99

tests/ui/print_type_sizes/generator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// build-pass
33
// ignore-pass
44

5+
#![allow(large_assignments)]
56
#![feature(generators, generator_trait)]
67

78
use std::ops::Generator;

tests/ui/print_type_sizes/generator.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
print-type-size type: `[generator@$DIR/generator.rs:10:5: 10:14]`: 8193 bytes, alignment: 1 bytes
1+
print-type-size type: `[generator@$DIR/generator.rs:11:5: 11:14]`: 8193 bytes, alignment: 1 bytes
22
print-type-size discriminant: 1 bytes
33
print-type-size variant `Unresumed`: 8192 bytes
44
print-type-size upvar `.array`: 8192 bytes

tests/ui/structs-enums/align-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
#![allow(dead_code, unused_allocation)]
2+
#![allow(dead_code, unused_allocation, large_assignments)]
33

44
use std::mem;
55

0 commit comments

Comments
 (0)