From dfed028e788702a313ad49754e5d7ec64ffa61cf Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Mon, 3 Mar 2025 19:59:12 +0100 Subject: [PATCH] Always allow rustdoc-json tests to contain long lines The rustdoc-json test syntax often requires very long lines, so the checks for long lines aren't really useful. --- src/tools/tidy/src/style.rs | 21 +++++++++++++++---- .../rustdoc-json/enums/discriminant/limits.rs | 1 - .../discriminant/num_underscore_and_suffix.rs | 2 -- .../only_some_have_discriminant.rs | 2 -- .../rustdoc-json/enums/discriminant/struct.rs | 2 -- .../rustdoc-json/enums/discriminant/tuple.rs | 2 -- tests/rustdoc-json/enums/kind.rs | 2 -- tests/rustdoc-json/fn_pointer/abi.rs | 2 -- tests/rustdoc-json/fn_pointer/generics.rs | 2 -- tests/rustdoc-json/fn_pointer/qualifiers.rs | 2 -- tests/rustdoc-json/fns/abi.rs | 2 -- tests/rustdoc-json/fns/async_return.rs | 1 - tests/rustdoc-json/fns/generic_args.rs | 2 -- tests/rustdoc-json/fns/generic_returns.rs | 2 -- tests/rustdoc-json/fns/generics.rs | 2 -- .../generic-associated-types/gats.rs | 2 -- .../rustdoc-json/impl-trait-in-assoc-type.rs | 1 - tests/rustdoc-json/lifetime/longest.rs | 2 -- tests/rustdoc-json/lifetime/outlives.rs | 2 -- .../lifetime/outlives_in_param.rs | 2 -- .../lifetime/outlives_in_where.rs | 2 -- tests/rustdoc-json/methods/abi.rs | 2 -- tests/rustdoc-json/non_lifetime_binders.rs | 2 -- tests/rustdoc-json/path_name.rs | 1 - .../reexport/doc_inline_external_crate.rs | 1 - .../reexport/export_extern_crate_as_self.rs | 2 -- .../reexport/private_twice_one_inline.rs | 1 - .../reexport/private_two_names.rs | 2 -- .../same_type_reexported_more_than_once.rs | 2 -- tests/rustdoc-json/return_private.rs | 1 - tests/rustdoc-json/statics/extern.rs | 1 - tests/rustdoc-json/structs/with_primitives.rs | 2 -- tests/rustdoc-json/trait_alias.rs | 1 - .../rustdoc-json/traits/private_supertrait.rs | 2 -- tests/rustdoc-json/traits/self.rs | 2 -- tests/rustdoc-json/traits/supertrait.rs | 2 -- tests/rustdoc-json/traits/trait_alias.rs | 1 - tests/rustdoc-json/type/dyn.rs | 1 - tests/rustdoc-json/type/fn_lifetime.rs | 2 -- tests/rustdoc-json/type/generic_default.rs | 2 -- tests/rustdoc-json/type/hrtb.rs | 2 -- .../type/inherent_associated_type.rs | 1 - .../type/inherent_associated_type_bound.rs | 1 - .../inherent_associated_type_projections.rs | 1 - 44 files changed, 17 insertions(+), 76 deletions(-) diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 21b513629ed8d..205d6720718a6 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -72,12 +72,14 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[ "//@ normalize-stderr", ]; +const LINELENGTH_CHECK: &str = "linelength"; + // If you edit this, also edit where it gets used in `check` (calling `contains_ignore_directives`) const CONFIGURABLE_CHECKS: [&str; 11] = [ "cr", "undocumented-unsafe", "tab", - "linelength", + LINELENGTH_CHECK, "filelength", "end-whitespace", "trailing-newlines", @@ -250,14 +252,24 @@ enum Directive { // Use a fixed size array in the return type to catch mistakes with changing `CONFIGURABLE_CHECKS` // without changing the code in `check` easier. fn contains_ignore_directives( + path_str: &str, can_contain: bool, contents: &str, checks: [&str; N], ) -> [Directive; N] { - if !can_contain { + // The rustdoc-json test syntax often requires very long lines, so the checks + // for long lines aren't really useful. + let always_ignore_linelength = path_str.contains("rustdoc-json"); + + if !can_contain && !always_ignore_linelength { return [Directive::Deny; N]; } + checks.map(|check| { + if check == LINELENGTH_CHECK && always_ignore_linelength { + return Directive::Ignore(false); + } + // Update `can_contain` when changing this if contents.contains(&format!("// ignore-tidy-{check}")) || contents.contains(&format!("# ignore-tidy-{check}")) @@ -367,6 +379,7 @@ pub fn check(path: &Path, bad: &mut bool) { walk(path, skip, &mut |entry, contents| { let file = entry.path(); + let path_str = file.to_string_lossy(); let filename = file.file_name().unwrap().to_string_lossy(); let is_css_file = filename.ends_with(".css"); @@ -422,7 +435,7 @@ pub fn check(path: &Path, bad: &mut bool) { mut skip_copyright, mut skip_dbg, mut skip_odd_backticks, - ] = contains_ignore_directives(can_contain, &contents, CONFIGURABLE_CHECKS); + ] = contains_ignore_directives(&path_str, can_contain, &contents, CONFIGURABLE_CHECKS); let mut leading_new_lines = false; let mut trailing_new_lines = 0; let mut lines = 0; @@ -502,7 +515,7 @@ pub fn check(path: &Path, bad: &mut bool) { let contains_potential_directive = possible_line_start && (line.contains("-tidy") || line.contains("tidy-")); let has_recognized_ignore_directive = - contains_ignore_directives(can_contain, line, CONFIGURABLE_CHECKS) + contains_ignore_directives(&path_str, can_contain, line, CONFIGURABLE_CHECKS) .into_iter() .any(|directive| matches!(directive, Directive::Ignore(_))); let has_alphabetical_directive = line.contains("tidy-alphabetical-start") diff --git a/tests/rustdoc-json/enums/discriminant/limits.rs b/tests/rustdoc-json/enums/discriminant/limits.rs index a023c9fbf6ef5..7508490d6661e 100644 --- a/tests/rustdoc-json/enums/discriminant/limits.rs +++ b/tests/rustdoc-json/enums/discriminant/limits.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(repr128)] #![allow(incomplete_features)] diff --git a/tests/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs b/tests/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs index f16a74d638b57..6f66495bed256 100644 --- a/tests/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs +++ b/tests/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #[repr(u32)] pub enum Foo { //@ is "$.index[*][?(@.name=='Basic')].inner.variant.discriminant.value" '"0"' diff --git a/tests/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs b/tests/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs index 522545d34d021..8e7985f07f41c 100644 --- a/tests/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs +++ b/tests/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - pub enum Foo { //@ is "$.index[*][?(@.name=='Has')].inner.variant.discriminant" '{"expr":"0", "value":"0"}' Has = 0, diff --git a/tests/rustdoc-json/enums/discriminant/struct.rs b/tests/rustdoc-json/enums/discriminant/struct.rs index 24d5f5b08c203..82437f5ef03bb 100644 --- a/tests/rustdoc-json/enums/discriminant/struct.rs +++ b/tests/rustdoc-json/enums/discriminant/struct.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #[repr(i32)] //@ is "$.index[*][?(@.name=='Foo')].attrs" '["#[attr=\"Repr([ReprInt(SignedInt(I32))])\")]\n"]' pub enum Foo { diff --git a/tests/rustdoc-json/enums/discriminant/tuple.rs b/tests/rustdoc-json/enums/discriminant/tuple.rs index a50ae8b9189f6..25bba07e8f796 100644 --- a/tests/rustdoc-json/enums/discriminant/tuple.rs +++ b/tests/rustdoc-json/enums/discriminant/tuple.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #[repr(u32)] //@ is "$.index[*][?(@.name=='Foo')].attrs" '["#[attr=\"Repr([ReprInt(UnsignedInt(U32))])\")]\n"]' pub enum Foo { diff --git a/tests/rustdoc-json/enums/kind.rs b/tests/rustdoc-json/enums/kind.rs index 2e0fb3101a31f..517a53828b78a 100644 --- a/tests/rustdoc-json/enums/kind.rs +++ b/tests/rustdoc-json/enums/kind.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - pub enum Foo { //@ set Unit = "$.index[*][?(@.name=='Unit')].id" //@ is "$.index[*][?(@.name=='Unit')].inner.variant.kind" '"plain"' diff --git a/tests/rustdoc-json/fn_pointer/abi.rs b/tests/rustdoc-json/fn_pointer/abi.rs index 03fbb3b795d0b..13a967bd35e2e 100644 --- a/tests/rustdoc-json/fn_pointer/abi.rs +++ b/tests/rustdoc-json/fn_pointer/abi.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(abi_vectorcall)] //@ is "$.index[*][?(@.name=='AbiRust')].inner.type_alias.type.function_pointer.header.abi" \"Rust\" diff --git a/tests/rustdoc-json/fn_pointer/generics.rs b/tests/rustdoc-json/fn_pointer/generics.rs index 7d64e490a2220..c974b472297c3 100644 --- a/tests/rustdoc-json/fn_pointer/generics.rs +++ b/tests/rustdoc-json/fn_pointer/generics.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.sig.inputs[*]" 1 //@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.sig.inputs[0][0]" '"val"' //@ is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.sig.inputs[0][1].borrowed_ref.lifetime" \"\'c\" diff --git a/tests/rustdoc-json/fn_pointer/qualifiers.rs b/tests/rustdoc-json/fn_pointer/qualifiers.rs index 6f03cf58522e4..398e31f72db06 100644 --- a/tests/rustdoc-json/fn_pointer/qualifiers.rs +++ b/tests/rustdoc-json/fn_pointer/qualifiers.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.is_unsafe" false //@ is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.is_const" false //@ is "$.index[*][?(@.name=='FnPointer')].inner.type_alias.type.function_pointer.header.is_async" false diff --git a/tests/rustdoc-json/fns/abi.rs b/tests/rustdoc-json/fns/abi.rs index 2f6413cee6f6b..68957f7995214 100644 --- a/tests/rustdoc-json/fns/abi.rs +++ b/tests/rustdoc-json/fns/abi.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(abi_vectorcall)] //@ is "$.index[*][?(@.name=='abi_rust')].inner.function.header.abi" \"Rust\" diff --git a/tests/rustdoc-json/fns/async_return.rs b/tests/rustdoc-json/fns/async_return.rs index ff88fa99c61b5..ddfd4ccf90d05 100644 --- a/tests/rustdoc-json/fns/async_return.rs +++ b/tests/rustdoc-json/fns/async_return.rs @@ -1,5 +1,4 @@ //@ edition:2021 -// ignore-tidy-linelength // Regression test for diff --git a/tests/rustdoc-json/fns/generic_args.rs b/tests/rustdoc-json/fns/generic_args.rs index b5412446ab42a..6a7124976f8b9 100644 --- a/tests/rustdoc-json/fns/generic_args.rs +++ b/tests/rustdoc-json/fns/generic_args.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ set foo = "$.index[*][?(@.name=='Foo')].id" pub trait Foo {} diff --git a/tests/rustdoc-json/fns/generic_returns.rs b/tests/rustdoc-json/fns/generic_returns.rs index 2f23801fc3f8f..90e17525c4460 100644 --- a/tests/rustdoc-json/fns/generic_returns.rs +++ b/tests/rustdoc-json/fns/generic_returns.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ count "$.index[*][?(@.name=='generic_returns')].inner.module.items[*]" 2 //@ set foo = "$.index[*][?(@.name=='Foo')].id" diff --git a/tests/rustdoc-json/fns/generics.rs b/tests/rustdoc-json/fns/generics.rs index f2064fd1e93df..b953094b5de61 100644 --- a/tests/rustdoc-json/fns/generics.rs +++ b/tests/rustdoc-json/fns/generics.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ set wham_id = "$.index[*][?(@.name=='Wham')].id" pub trait Wham {} diff --git a/tests/rustdoc-json/generic-associated-types/gats.rs b/tests/rustdoc-json/generic-associated-types/gats.rs index fdf605e928715..d1172b35fda49 100644 --- a/tests/rustdoc-json/generic-associated-types/gats.rs +++ b/tests/rustdoc-json/generic-associated-types/gats.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - pub trait Display {} pub trait LendingIterator { diff --git a/tests/rustdoc-json/impl-trait-in-assoc-type.rs b/tests/rustdoc-json/impl-trait-in-assoc-type.rs index 14ea29507692b..fc12fc87e8da1 100644 --- a/tests/rustdoc-json/impl-trait-in-assoc-type.rs +++ b/tests/rustdoc-json/impl-trait-in-assoc-type.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(impl_trait_in_assoc_type)] pub struct AlwaysTrue; diff --git a/tests/rustdoc-json/lifetime/longest.rs b/tests/rustdoc-json/lifetime/longest.rs index 8ac60be0fefdb..2d4e098d696b7 100644 --- a/tests/rustdoc-json/lifetime/longest.rs +++ b/tests/rustdoc-json/lifetime/longest.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].name" \"\'a\" //@ is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}' //@ is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}' diff --git a/tests/rustdoc-json/lifetime/outlives.rs b/tests/rustdoc-json/lifetime/outlives.rs index 99d14296f9998..257e43985ac34 100644 --- a/tests/rustdoc-json/lifetime/outlives.rs +++ b/tests/rustdoc-json/lifetime/outlives.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ count "$.index[*][?(@.name=='foo')].inner.function.generics.params[*]" 3 //@ is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates" [] //@ is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].name" \"\'a\" diff --git a/tests/rustdoc-json/lifetime/outlives_in_param.rs b/tests/rustdoc-json/lifetime/outlives_in_param.rs index 3eee6d9ea46f4..55ff525054157 100644 --- a/tests/rustdoc-json/lifetime/outlives_in_param.rs +++ b/tests/rustdoc-json/lifetime/outlives_in_param.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ count '$.index[*][?(@.name=="outlives")].inner.function.generics.params[*]' 2 //@ is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[0].name' \"\'a\" //@ is '$.index[*][?(@.name=="outlives")].inner.function.generics.params[0].kind.lifetime.outlives' [] diff --git a/tests/rustdoc-json/lifetime/outlives_in_where.rs b/tests/rustdoc-json/lifetime/outlives_in_where.rs index a8f88be01daaf..5158ff118a07a 100644 --- a/tests/rustdoc-json/lifetime/outlives_in_where.rs +++ b/tests/rustdoc-json/lifetime/outlives_in_where.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ is '$.index[*][?(@.name=="on_lifetimes")].inner.function.generics.where_predicates' '[{"lifetime_predicate": {"lifetime": "'\''all", "outlives": ["'\''a", "'\''b", "'\''c"]}}]' pub fn on_lifetimes<'a, 'b, 'c, 'all>() where diff --git a/tests/rustdoc-json/methods/abi.rs b/tests/rustdoc-json/methods/abi.rs index 6d33dfca373c7..dac02a6ce3caf 100644 --- a/tests/rustdoc-json/methods/abi.rs +++ b/tests/rustdoc-json/methods/abi.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(abi_vectorcall)] //@ has "$.index[*][?(@.name=='Foo')]" diff --git a/tests/rustdoc-json/non_lifetime_binders.rs b/tests/rustdoc-json/non_lifetime_binders.rs index 8443141fecd50..7c518a8f5a7b2 100644 --- a/tests/rustdoc-json/non_lifetime_binders.rs +++ b/tests/rustdoc-json/non_lifetime_binders.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - #![feature(non_lifetime_binders)] #![allow(incomplete_features)] diff --git a/tests/rustdoc-json/path_name.rs b/tests/rustdoc-json/path_name.rs index 67843dfc8ff39..a1b3ae294fa94 100644 --- a/tests/rustdoc-json/path_name.rs +++ b/tests/rustdoc-json/path_name.rs @@ -3,7 +3,6 @@ // See https://github.com/rust-lang/rust/issues/135600 // and https://github.com/rust-lang/rust/pull/134880#issuecomment-2596386111 // -// ignore-tidy-linelength //@ aux-build: defines_and_reexports.rs extern crate defines_and_reexports; diff --git a/tests/rustdoc-json/reexport/doc_inline_external_crate.rs b/tests/rustdoc-json/reexport/doc_inline_external_crate.rs index 512c741798b96..4debd395496be 100644 --- a/tests/rustdoc-json/reexport/doc_inline_external_crate.rs +++ b/tests/rustdoc-json/reexport/doc_inline_external_crate.rs @@ -1,6 +1,5 @@ // Regression Test for https://github.com/rust-lang/rust/issues/110138 //@ aux-build: enum_with_discriminant.rs -// ignore-tidy-linelength #[doc(inline)] pub extern crate enum_with_discriminant; diff --git a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs index 6e9b504481698..4efacd283ef78 100644 --- a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs +++ b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs @@ -2,7 +2,5 @@ #![crate_name = "export_extern_crate_as_self"] -// ignore-tidy-linelength - //@ is "$.index[*][?(@.inner.module)].name" \"export_extern_crate_as_self\" pub extern crate self as export_extern_crate_as_self; // Must be the same name as the crate already has diff --git a/tests/rustdoc-json/reexport/private_twice_one_inline.rs b/tests/rustdoc-json/reexport/private_twice_one_inline.rs index 87b97e65c0ac2..fdf8cda103bff 100644 --- a/tests/rustdoc-json/reexport/private_twice_one_inline.rs +++ b/tests/rustdoc-json/reexport/private_twice_one_inline.rs @@ -1,5 +1,4 @@ //@ aux-build:pub-struct.rs -// ignore-tidy-linelength // Test for the ICE in https://github.com/rust-lang/rust/issues/83057 // An external type re-exported with different attributes shouldn't cause an error diff --git a/tests/rustdoc-json/reexport/private_two_names.rs b/tests/rustdoc-json/reexport/private_two_names.rs index 1ed54f15fdc36..049100d7f497f 100644 --- a/tests/rustdoc-json/reexport/private_two_names.rs +++ b/tests/rustdoc-json/reexport/private_two_names.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Test for the ICE in https://github.com/rust-lang/rust/issues/83720 // A pub-in-private type re-exported under two different names shouldn't cause an error diff --git a/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs b/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs index 27e2827d08ddb..f313171afa59b 100644 --- a/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs +++ b/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // Regression test for . #![no_std] diff --git a/tests/rustdoc-json/return_private.rs b/tests/rustdoc-json/return_private.rs index bfcbed8904009..214fda14acada 100644 --- a/tests/rustdoc-json/return_private.rs +++ b/tests/rustdoc-json/return_private.rs @@ -1,5 +1,4 @@ // Regression test for . -// ignore-tidy-linelength mod secret { //@ set struct_secret = "$.index[*][?(@.name == 'Secret' && @.inner.struct)].id" diff --git a/tests/rustdoc-json/statics/extern.rs b/tests/rustdoc-json/statics/extern.rs index d38fdf1cd1cdd..9e0265da8e2ea 100644 --- a/tests/rustdoc-json/statics/extern.rs +++ b/tests/rustdoc-json/statics/extern.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength //@ edition: 2021 extern "C" { diff --git a/tests/rustdoc-json/structs/with_primitives.rs b/tests/rustdoc-json/structs/with_primitives.rs index 7202ab9af9c28..fe99292456d64 100644 --- a/tests/rustdoc-json/structs/with_primitives.rs +++ b/tests/rustdoc-json/structs/with_primitives.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ is "$.index[*][?(@.name=='WithPrimitives')].visibility" \"public\" //@ has "$.index[*][?(@.name=='WithPrimitives')].inner.struct" //@ is "$.index[*][?(@.name=='WithPrimitives')].inner.struct.generics.params[0].name" \"\'a\" diff --git a/tests/rustdoc-json/trait_alias.rs b/tests/rustdoc-json/trait_alias.rs index 3ae5fad8accd7..d9ef256b106fe 100644 --- a/tests/rustdoc-json/trait_alias.rs +++ b/tests/rustdoc-json/trait_alias.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(trait_alias)] //@ set StrLike = "$.index[*][?(@.name=='StrLike')].id" diff --git a/tests/rustdoc-json/traits/private_supertrait.rs b/tests/rustdoc-json/traits/private_supertrait.rs index d31b6ca4ad86e..ce0642278e084 100644 --- a/tests/rustdoc-json/traits/private_supertrait.rs +++ b/tests/rustdoc-json/traits/private_supertrait.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ !has "$.index[*][?(@.name == 'sealed')]" mod sealed { //@ set sealed_id = "$.index[*][?(@.name=='Sealed')].id" diff --git a/tests/rustdoc-json/traits/self.rs b/tests/rustdoc-json/traits/self.rs index 060bc37f2d5ea..efd9efd556fae 100644 --- a/tests/rustdoc-json/traits/self.rs +++ b/tests/rustdoc-json/traits/self.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - pub struct Foo; // Check that Self is represented uniformly between inherent impls, trait impls, diff --git a/tests/rustdoc-json/traits/supertrait.rs b/tests/rustdoc-json/traits/supertrait.rs index e8fe82ab9cd4d..4b6199d4b26f2 100644 --- a/tests/rustdoc-json/traits/supertrait.rs +++ b/tests/rustdoc-json/traits/supertrait.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ set loud_id = "$.index[*][?(@.name=='Loud')].id" pub trait Loud {} diff --git a/tests/rustdoc-json/traits/trait_alias.rs b/tests/rustdoc-json/traits/trait_alias.rs index 17c83ddc353ce..137b8947e2393 100644 --- a/tests/rustdoc-json/traits/trait_alias.rs +++ b/tests/rustdoc-json/traits/trait_alias.rs @@ -1,5 +1,4 @@ // Regression test for -// ignore-tidy-linelength #![feature(trait_alias)] diff --git a/tests/rustdoc-json/type/dyn.rs b/tests/rustdoc-json/type/dyn.rs index f990a2cb53a7f..d8686d4e2fb1d 100644 --- a/tests/rustdoc-json/type/dyn.rs +++ b/tests/rustdoc-json/type/dyn.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength use std::fmt::Debug; //@ count "$.index[*][?(@.name=='dyn')].inner.module.items[*]" 3 diff --git a/tests/rustdoc-json/type/fn_lifetime.rs b/tests/rustdoc-json/type/fn_lifetime.rs index 7fa12dad54e9b..aaa716bf11fda 100644 --- a/tests/rustdoc-json/type/fn_lifetime.rs +++ b/tests/rustdoc-json/type/fn_lifetime.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ has "$.index[*][?(@.name=='GenericFn')].inner.type_alias" //@ ismany "$.index[*][?(@.name=='GenericFn')].inner.type_alias.generics.params[*].name" \"\'a\" diff --git a/tests/rustdoc-json/type/generic_default.rs b/tests/rustdoc-json/type/generic_default.rs index 7eaa299af5c7e..2d2ce9cd10332 100644 --- a/tests/rustdoc-json/type/generic_default.rs +++ b/tests/rustdoc-json/type/generic_default.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ set result = "$.index[*][?(@.name=='Result')].id" pub enum Result { Ok(T), diff --git a/tests/rustdoc-json/type/hrtb.rs b/tests/rustdoc-json/type/hrtb.rs index e71d9fc1e1e93..08b35b90a2b10 100644 --- a/tests/rustdoc-json/type/hrtb.rs +++ b/tests/rustdoc-json/type/hrtb.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - //@ is "$.index[*][?(@.name=='genfn')].inner.function.generics.where_predicates[0].bound_predicate.type" '{"generic": "F"}' //@ is "$.index[*][?(@.name=='genfn')].inner.function.generics.where_predicates[0].bound_predicate.generic_params" '[{"kind": {"lifetime": {"outlives": []}},"name": "'\''a"},{"kind": {"lifetime": {"outlives": []}},"name": "'\''b"}]' pub fn genfn(f: F) diff --git a/tests/rustdoc-json/type/inherent_associated_type.rs b/tests/rustdoc-json/type/inherent_associated_type.rs index b8ce11fc6e196..e26f8f7c651bd 100644 --- a/tests/rustdoc-json/type/inherent_associated_type.rs +++ b/tests/rustdoc-json/type/inherent_associated_type.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/rustdoc-json/type/inherent_associated_type_bound.rs b/tests/rustdoc-json/type/inherent_associated_type_bound.rs index cb008291b7226..22c9c9c1149a8 100644 --- a/tests/rustdoc-json/type/inherent_associated_type_bound.rs +++ b/tests/rustdoc-json/type/inherent_associated_type_bound.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/rustdoc-json/type/inherent_associated_type_projections.rs b/tests/rustdoc-json/type/inherent_associated_type_projections.rs index e73e86d5817fe..501694dce8b6d 100644 --- a/tests/rustdoc-json/type/inherent_associated_type_projections.rs +++ b/tests/rustdoc-json/type/inherent_associated_type_projections.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(inherent_associated_types)] #![allow(incomplete_features)]