Skip to content

Commit

Permalink
Rollup merge of rust-lang#77675 - Anthuang:tidy-line-length, r=Mark-S…
Browse files Browse the repository at this point in the history
…imulacrum

Tidy should not check line lengths in tests

Tidy will not check line lengths in tests even without the `// ignore-tidy-linelength` annotations. This PR also removes all the annotations which are now unnecessary.

Closes: rust-lang#77548
  • Loading branch information
Dylan-DPC committed Nov 19, 2020
2 parents 8256379 + 2c22c05 commit 3034209
Show file tree
Hide file tree
Showing 242 changed files with 1,444 additions and 1,669 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager
// compile-flags:-Zinline-in-all-cgus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager

#![deny(dead_code)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager
// compile-flags:-Zinline-in-all-cgus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager -Zinline-in-all-cgus -Zmir-opt-level=0

#![deny(dead_code)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// ignoring this test until MIR codegen has taken over completely
// ignore-test

// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager

#![deny(dead_code)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager
// compile-flags:-Zinline-in-all-cgus

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager

#![deny(dead_code)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager
// compile-flags:-Zinline-in-all-cgus

Expand Down
1 change: 0 additions & 1 deletion src/test/codegen-units/item-collection/tuple-drop-glue.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags:-Zprint-mono-items=eager
// compile-flags:-Zinline-in-all-cgus

Expand Down
2 changes: 0 additions & 2 deletions src/test/codegen-units/partitioning/extern-drop-glue.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen-units/partitioning/extern-generic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/inlining-from-extern-crate
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen-units/partitioning/local-drop-glue.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining-but-not-all
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen-units/partitioning/local-inlining.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-transitive-inlining
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// much sense at the moment.
// ignore-test

// ignore-tidy-linelength
// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/methods-are-with-self-type
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen-units/partitioning/shared-generics.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// no-prefer-dynamic
// NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
// prevent drop-glue from participating in share-generics.
Expand Down
2 changes: 0 additions & 2 deletions src/test/codegen-units/partitioning/vtable-through-const.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/vtable-through-const
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/align-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/align-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/async-fn-debug-msvc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// - The generator types and variants are marked artificial
// - Captured vars from the source are not marked artificial
//
// ignore-tidy-linelength
// compile-flags: -C debuginfo=2 --edition=2018
// only-msvc

Expand Down
11 changes: 5 additions & 6 deletions src/test/codegen/async-fn-debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// - The generator types and variants are marked artificial
// - Captured vars from the source are not marked artificial
//
// ignore-tidy-linelength
// compile-flags: -C debuginfo=2 --edition=2018
// ignore-msvc

Expand All @@ -22,21 +21,21 @@ async fn async_fn_test() {
// CHECK-SAME: flags: DIFlagArtificial
// CHECK-SAME: discriminator: [[DISC:![0-9]*]]
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "0", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 11,
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 10,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "Unresumed", scope: [[GEN]],
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "1", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 15,
// CHECK-SAME: file: [[FILE]], line: 14,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "2", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 15,
// CHECK-SAME: file: [[FILE]], line: 14,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "3", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 12,
// CHECK-SAME: file: [[FILE]], line: 11,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "4", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 14,
// CHECK-SAME: file: [[FILE]], line: 13,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[GEN]],
// CHECK-SAME: flags: DIFlagArtificial
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/c-variadic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// ignore-wasm32-bare compiled with panic=abort by default
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

#![crate_type = "lib"]
#![feature(c_variadic)]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/consts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/enum-debug-clike.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// This tests that debug info for "c-like" enums is properly emitted.
// This is ignored for the fallback mode on MSVC due to problems with PDB.

// ignore-tidy-linelength
// ignore-msvc

// compile-flags: -g -C no-prepopulate-passes
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/enum-debug-niche-2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// This tests that optimized enum debug info accurately reflects the enum layout.
// This is ignored for the fallback mode on MSVC due to problems with PDB.

// ignore-tidy-linelength
// ignore-msvc

// compile-flags: -g -C no-prepopulate-passes
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/function-arguments.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

#![crate_type = "lib"]
#![feature(rustc_attrs)]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/gdb_debug_script_load.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// ignore-windows
// ignore-macos
// ignore-wasm
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/generator-debug-msvc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// - The generator types and variants are marked artificial
// - Captured vars from the source are not marked artificial
//
// ignore-tidy-linelength
// compile-flags: -C debuginfo=2
// only-msvc

Expand Down
11 changes: 5 additions & 6 deletions src/test/codegen/generator-debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// - The generator types and variants are marked artificial
// - Captured vars from the source are not marked artificial
//
// ignore-tidy-linelength
// compile-flags: -C debuginfo=2 --edition=2018
// ignore-msvc

Expand All @@ -26,21 +25,21 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
// CHECK-SAME: flags: DIFlagArtificial
// CHECK-SAME: discriminator: [[DISC:![0-9]*]]
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "0", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 14,
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 13,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "Unresumed", scope: [[GEN]],
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "1", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 18,
// CHECK-SAME: file: [[FILE]], line: 17,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "2", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 18,
// CHECK-SAME: file: [[FILE]], line: 17,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "3", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 15,
// CHECK-SAME: file: [[FILE]], line: 14,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "4", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 17,
// CHECK-SAME: file: [[FILE]], line: 16,
// CHECK-SAME: flags: DIFlagArtificial
// CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[GEN]],
// CHECK-SAME: flags: DIFlagArtificial
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/inline-debuginfo.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![crate_type="rlib"]
// compile-flags: -Copt-level=3 -g
// ignore-tidy-linelength

#[no_mangle]
#[inline(always)]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/instrument-mcount.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags: -Z instrument-mcount

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/issue-44056-macos-tls-align.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// only-macos
// no-system-llvm
// compile-flags: -O
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/packed.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags: -C no-prepopulate-passes

#![crate_type = "lib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// compile-flags: -g --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src

#[inline]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags: -g --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/remap_path_prefix/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore-windows
// ignore-tidy-linelength

// compile-flags: -g -C no-prepopulate-passes --remap-path-prefix={{cwd}}=/the/cwd --remap-path-prefix={{src-base}}=/the/src
// aux-build:remap_path_prefix_aux.rs
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/repeat-trusted-len.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -O
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/repr-transparent-aggregates-1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

// min-system-llvm-version: 9.0
// ignore-arm
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags: -C no-prepopulate-passes
// only-riscv64
// only-linux
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/riscv-abi/riscv64-lp64d-abi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags: -C no-prepopulate-passes
// only-riscv64
// only-linux
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// compile-flags: -C no-prepopulate-passes
// only-riscv64
// only-linux
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// compile-flags: -C no-prepopulate-passes

#![crate_type = "lib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// compile-flags: -C no-prepopulate-passes

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/stores.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// compile-flags: -C no-prepopulate-passes
// ignore-tidy-linelength

#![crate_type = "lib"]

Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/target-cpu-on-functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// "target-cpu" attribute in LLVM.

// no-prefer-dynamic
// ignore-tidy-linelength
// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals

#![crate_type = "staticlib"]
Expand Down
1 change: 0 additions & 1 deletion src/test/codegen/tune-cpu-on-functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// "tune-cpu" attribute in LLVM.

// no-prefer-dynamic
// ignore-tidy-linelength
// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic

#![crate_type = "staticlib"]
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/two-panic-runtimes.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// error-pattern:cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
// ignore-tidy-linelength
// aux-build:panic-runtime-unwind.rs
// aux-build:panic-runtime-unwind2.rs
// aux-build:panic-runtime-lang-items.rs
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/unwind-tables-panic-required.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// when they are required.
//
// compile-flags: -C panic=unwind -C force-unwind-tables=no
// ignore-tidy-linelength
//
// error-pattern: panic=unwind requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`.

Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/unwind-tables-target-required.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//
// only-x86_64-windows-msvc
// compile-flags: -C force-unwind-tables=no
// ignore-tidy-linelength
//
// error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`.

Expand Down
2 changes: 0 additions & 2 deletions src/test/debuginfo/borrowed-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// Require a gdb or lldb that can read DW_TAG_variant_part.
// min-gdb-version: 8.2
// rust-lldb
Expand Down
2 changes: 0 additions & 2 deletions src/test/debuginfo/boxed-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore-tidy-linelength

// min-lldb-version: 310

// compile-flags:-g
Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/by-value-non-immediate-argument.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
// min-lldb-version: 310

Expand Down
1 change: 0 additions & 1 deletion src/test/debuginfo/c-style-enum-in-composite.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore-tidy-linelength
// min-lldb-version: 310

// compile-flags:-g
Expand Down
Loading

0 comments on commit 3034209

Please sign in to comment.