about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlona Enraght-Moony <code@alona.page>2023-11-07 16:36:55 +0000
committerAlona Enraght-Moony <code@alona.page>2023-11-07 16:36:55 +0000
commitf784fa7bd980916c235f5bd9bdbcf9389ea261f4 (patch)
treef892a79f309b79db1bedf09c00186f4b0953c485
parent187d1afa9dc17d06e65f5e817e2bd1d9ae33830a (diff)
downloadrust-f784fa7bd980916c235f5bd9bdbcf9389ea261f4.tar.gz
rust-f784fa7bd980916c235f5bd9bdbcf9389ea261f4.zip
tests/rustdoc-json: Remove some needless uses of `#![no_core]`.
Done by removing all uses of `#![no_core]`, and the reverting the ones
that failed. More involved ones are in a later commit.
-rw-r--r--tests/rustdoc-json/doc_hidden_failure.rs3
-rw-r--r--tests/rustdoc-json/enums/use_glob.rs3
-rw-r--r--tests/rustdoc-json/enums/use_variant.rs3
-rw-r--r--tests/rustdoc-json/fn_pointer/generics.rs3
-rw-r--r--tests/rustdoc-json/fns/extern_c_variadic.rs3
-rw-r--r--tests/rustdoc-json/fns/generic_args.rs3
-rw-r--r--tests/rustdoc-json/fns/generic_returns.rs3
-rw-r--r--tests/rustdoc-json/fns/generics.rs3
-rw-r--r--tests/rustdoc-json/glob_import.rs3
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility.rs7
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs6
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility_show_private.rs6
-rw-r--r--tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs3
-rw-r--r--tests/rustdoc-json/impls/local_for_local_primitive.rs2
-rw-r--r--tests/rustdoc-json/lifetime/longest.rs9
-rw-r--r--tests/rustdoc-json/lifetime/outlives.rs3
-rw-r--r--tests/rustdoc-json/methods/abi.rs2
-rw-r--r--tests/rustdoc-json/primitives/primitive_overloading.rs6
-rw-r--r--tests/rustdoc-json/reexport/export_extern_crate_as_self.rs3
-rw-r--r--tests/rustdoc-json/reexport/glob_collision.rs3
-rw-r--r--tests/rustdoc-json/reexport/glob_extern.rs3
-rw-r--r--tests/rustdoc-json/reexport/glob_private.rs3
-rw-r--r--tests/rustdoc-json/reexport/in_root_and_mod.rs3
-rw-r--r--tests/rustdoc-json/reexport/in_root_and_mod_pub.rs3
-rw-r--r--tests/rustdoc-json/reexport/macro.rs3
-rw-r--r--tests/rustdoc-json/reexport/mod_not_included.rs3
-rw-r--r--tests/rustdoc-json/reexport/private_twice_one_inline.rs4
-rw-r--r--tests/rustdoc-json/reexport/private_two_names.rs3
-rw-r--r--tests/rustdoc-json/reexport/pub_use_doc_hidden.rs3
-rw-r--r--tests/rustdoc-json/reexport/rename_private.rs3
-rw-r--r--tests/rustdoc-json/reexport/rename_public.rs3
-rw-r--r--tests/rustdoc-json/reexport/same_name_different_types.rs3
-rw-r--r--tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs2
-rw-r--r--tests/rustdoc-json/reexport/simple_private.rs2
-rw-r--r--tests/rustdoc-json/reexport/simple_public.rs3
-rw-r--r--tests/rustdoc-json/return_private.rs3
-rw-r--r--tests/rustdoc-json/stripped_modules.rs3
-rw-r--r--tests/rustdoc-json/traits/private_supertrait.rs4
-rw-r--r--tests/rustdoc-json/traits/supertrait.rs2
-rw-r--r--tests/rustdoc-json/type/inherent_associated_type.rs2
40 files changed, 9 insertions, 126 deletions
diff --git a/tests/rustdoc-json/doc_hidden_failure.rs b/tests/rustdoc-json/doc_hidden_failure.rs
index 0d2c6b2209b..e2ce66c99e4 100644
--- a/tests/rustdoc-json/doc_hidden_failure.rs
+++ b/tests/rustdoc-json/doc_hidden_failure.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/98007>.
 
-#![feature(no_core)]
-#![no_core]
-
 mod auto {
     mod action_row {
         pub struct ActionRowBuilder;
diff --git a/tests/rustdoc-json/enums/use_glob.rs b/tests/rustdoc-json/enums/use_glob.rs
index 49990ec5331..bec89530b05 100644
--- a/tests/rustdoc-json/enums/use_glob.rs
+++ b/tests/rustdoc-json/enums/use_glob.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/104942>
 
-#![feature(no_core)]
-#![no_core]
-
 // @set Color = "$.index[*][?(@.name == 'Color')].id"
 pub enum Color {
     Red,
diff --git a/tests/rustdoc-json/enums/use_variant.rs b/tests/rustdoc-json/enums/use_variant.rs
index 8190e1cbe81..c7e0c21f1ef 100644
--- a/tests/rustdoc-json/enums/use_variant.rs
+++ b/tests/rustdoc-json/enums/use_variant.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 // @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id"
 pub enum AlwaysNone {
     // @set None = "$.index[*][?(@.name == 'None')].id"
diff --git a/tests/rustdoc-json/fn_pointer/generics.rs b/tests/rustdoc-json/fn_pointer/generics.rs
index 3b82561ec7d..8b3a8c0a74e 100644
--- a/tests/rustdoc-json/fn_pointer/generics.rs
+++ b/tests/rustdoc-json/fn_pointer/generics.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[*]" 1
 // @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][0]" '"val"'
 // @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][1].borrowed_ref.lifetime" \"\'c\"
diff --git a/tests/rustdoc-json/fns/extern_c_variadic.rs b/tests/rustdoc-json/fns/extern_c_variadic.rs
index d6ea343b991..eef9ae99eb0 100644
--- a/tests/rustdoc-json/fns/extern_c_variadic.rs
+++ b/tests/rustdoc-json/fns/extern_c_variadic.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 extern "C" {
     // @is "$.index[*][?(@.name == 'not_variadic')].inner.function.decl.c_variadic" false
     pub fn not_variadic(_: i32);
diff --git a/tests/rustdoc-json/fns/generic_args.rs b/tests/rustdoc-json/fns/generic_args.rs
index 539d17f831e..2f6cf3bf65a 100644
--- a/tests/rustdoc-json/fns/generic_args.rs
+++ b/tests/rustdoc-json/fns/generic_args.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @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 27d842066f4..8e82efef4be 100644
--- a/tests/rustdoc-json/fns/generic_returns.rs
+++ b/tests/rustdoc-json/fns/generic_returns.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @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 5239a6f21f5..44dc6d854aa 100644
--- a/tests/rustdoc-json/fns/generics.rs
+++ b/tests/rustdoc-json/fns/generics.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @set wham_id = "$.index[*][?(@.name=='Wham')].id"
 pub trait Wham {}
 
diff --git a/tests/rustdoc-json/glob_import.rs b/tests/rustdoc-json/glob_import.rs
index f37ce0abb41..7de1ed78f2f 100644
--- a/tests/rustdoc-json/glob_import.rs
+++ b/tests/rustdoc-json/glob_import.rs
@@ -1,13 +1,10 @@
 // This is a regression test for <https://github.com/rust-lang/rust/issues/98003>.
 
-#![feature(no_core)]
 #![no_std]
-#![no_core]
 
 // @has "$.index[*][?(@.name=='glob')]"
 // @has "$.index[*][?(@.inner.import)].inner.import.name" \"*\"
 
-
 mod m1 {
     pub fn f() {}
 }
diff --git a/tests/rustdoc-json/impls/impl_item_visibility.rs b/tests/rustdoc-json/impls/impl_item_visibility.rs
index efa54d91dca..d3c15cd23e4 100644
--- a/tests/rustdoc-json/impls/impl_item_visibility.rs
+++ b/tests/rustdoc-json/impls/impl_item_visibility.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 pub struct Foo;
 
 /// impl Foo priv
@@ -9,18 +6,16 @@ impl Foo {
 }
 // @!has '$.index[*][?(@.docs=="impl Foo priv")]'
 
-
 /// impl Foo pub
 impl Foo {
     pub fn qux() {}
 }
 // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
 
-
 /// impl Foo hidden
 impl Foo {
     #[doc(hidden)]
-    pub fn __quazl(){}
+    pub fn __quazl() {}
 }
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
index 3c6fefc4ca2..fa3a36df856 100644
--- a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
+++ b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
@@ -1,6 +1,4 @@
 // compile-flags: --document-hidden-items
-#![feature(no_core)]
-#![no_core]
 
 pub struct Foo;
 
@@ -11,18 +9,16 @@ impl Foo {
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
 
-
 /// impl Foo pub
 impl Foo {
     pub fn qux() {}
 }
 // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
 
-
 /// impl Foo hidden
 impl Foo {
     #[doc(hidden)]
-    pub fn __quazl(){}
+    pub fn __quazl() {}
 }
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
index b98d1e4167c..7c68a2412f3 100644
--- a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
+++ b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
@@ -1,6 +1,4 @@
 // compile-flags: --document-private-items
-#![feature(no_core)]
-#![no_core]
 
 pub struct Foo;
 
@@ -10,18 +8,16 @@ impl Foo {
 }
 // @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
 
-
 /// impl Foo pub
 impl Foo {
     pub fn qux() {}
 }
 // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
 
-
 /// impl Foo hidden
 impl Foo {
     #[doc(hidden)]
-    pub fn __quazl(){}
+    pub fn __quazl() {}
 }
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs
index fcd27ca4b7c..836f1fe87da 100644
--- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs
+++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs
@@ -1,8 +1,5 @@
 // compile-flags: --document-hidden-items
 
-#![feature(no_core)]
-#![no_core]
-
 // @has "$.index[*][?(@.name == 'HiddenPubStruct')]"
 // @has "$.index[*][?(@.inner.impl)]"
 // @has "$.index[*][?(@.name=='PubTrait')]"
diff --git a/tests/rustdoc-json/impls/local_for_local_primitive.rs b/tests/rustdoc-json/impls/local_for_local_primitive.rs
index 769dd3f0a2c..acc3a879fe1 100644
--- a/tests/rustdoc-json/impls/local_for_local_primitive.rs
+++ b/tests/rustdoc-json/impls/local_for_local_primitive.rs
@@ -1,6 +1,4 @@
-#![feature(no_core)]
 #![feature(rustc_attrs)]
-#![no_core]
 
 // @set Local = "$.index[*][?(@.name=='Local')].id"
 pub trait Local {}
diff --git a/tests/rustdoc-json/lifetime/longest.rs b/tests/rustdoc-json/lifetime/longest.rs
index dc28258a8b6..419b0b4fcab 100644
--- a/tests/rustdoc-json/lifetime/longest.rs
+++ b/tests/rustdoc-json/lifetime/longest.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @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": []}}'
@@ -26,5 +23,9 @@
 // @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\"
 
 pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str {
-    if l.len() > r.len() { l } else { r }
+    if l.len() > r.len() {
+        l
+    } else {
+        r
+    }
 }
diff --git a/tests/rustdoc-json/lifetime/outlives.rs b/tests/rustdoc-json/lifetime/outlives.rs
index 6e105b382b0..549e4c200dc 100644
--- a/tests/rustdoc-json/lifetime/outlives.rs
+++ b/tests/rustdoc-json/lifetime/outlives.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @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/methods/abi.rs b/tests/rustdoc-json/methods/abi.rs
index b8279298c1e..917e9e0790c 100644
--- a/tests/rustdoc-json/methods/abi.rs
+++ b/tests/rustdoc-json/methods/abi.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 
 #![feature(abi_vectorcall)]
-#![feature(no_core)]
-#![no_core]
 
 // @has "$.index[*][?(@.name=='Foo')]"
 pub struct Foo;
diff --git a/tests/rustdoc-json/primitives/primitive_overloading.rs b/tests/rustdoc-json/primitives/primitive_overloading.rs
index 81e0acdc6e9..50e23fc06d3 100644
--- a/tests/rustdoc-json/primitives/primitive_overloading.rs
+++ b/tests/rustdoc-json/primitives/primitive_overloading.rs
@@ -3,14 +3,10 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/98006>.
 
 #![feature(rustc_attrs)]
-#![feature(no_core)]
-
-#![no_core]
 
 // @has "$.index[*][?(@.name=='usize')]"
 // @has "$.index[*][?(@.name=='prim')]"
 
 #[rustc_doc_primitive = "usize"]
 /// This is the built-in type `usize`.
-mod prim {
-}
+mod prim {}
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 37ca279b352..a8f5500d629 100644
--- a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs
+++ b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs
@@ -1,8 +1,5 @@
 //! Regression test for <https://github.com/rust-lang/rust/issues/100531>
 
-#![feature(no_core)]
-#![no_core]
-
 #![crate_name = "export_extern_crate_as_self"]
 
 // ignore-tidy-linelength
diff --git a/tests/rustdoc-json/reexport/glob_collision.rs b/tests/rustdoc-json/reexport/glob_collision.rs
index dee35ba78dc..9a75f4c0cf3 100644
--- a/tests/rustdoc-json/reexport/glob_collision.rs
+++ b/tests/rustdoc-json/reexport/glob_collision.rs
@@ -1,8 +1,5 @@
 // Regression test for https://github.com/rust-lang/rust/issues/100973
 
-#![feature(no_core)]
-#![no_core]
-
 // @set m1 = "$.index[*][?(@.name == 'm1' && @.inner.module)].id"
 // @is "$.index[*][?(@.name == 'm1')].inner.module.items" []
 // @is "$.index[*][?(@.name == 'm1')].inner.module.is_stripped" true
diff --git a/tests/rustdoc-json/reexport/glob_extern.rs b/tests/rustdoc-json/reexport/glob_extern.rs
index 78edfaf0aa8..ed0c4a420d4 100644
--- a/tests/rustdoc-json/reexport/glob_extern.rs
+++ b/tests/rustdoc-json/reexport/glob_extern.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
 mod mod1 {
     extern "C" {
diff --git a/tests/rustdoc-json/reexport/glob_private.rs b/tests/rustdoc-json/reexport/glob_private.rs
index ae4e87d23bc..11ea5aa3522 100644
--- a/tests/rustdoc-json/reexport/glob_private.rs
+++ b/tests/rustdoc-json/reexport/glob_private.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
 mod mod1 {
     // @is "$.index[*][?(@.name=='mod2')].inner.module.is_stripped" "true"
diff --git a/tests/rustdoc-json/reexport/in_root_and_mod.rs b/tests/rustdoc-json/reexport/in_root_and_mod.rs
index f81445bd48d..a4133e2f0c7 100644
--- a/tests/rustdoc-json/reexport/in_root_and_mod.rs
+++ b/tests/rustdoc-json/reexport/in_root_and_mod.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 // @!has "$.index[*][?(@.name=='foo')]"
 mod foo {
     // @has "$.index[*][?(@.name=='Foo')]"
diff --git a/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs b/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs
index c5c41b25f7e..37f7b26fc85 100644
--- a/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs
+++ b/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 pub mod foo {
     // @set bar_id = "$.index[*][?(@.name=='Bar')].id"
     // @ismany "$.index[*][?(@.name=='foo')].inner.module.items[*]" $bar_id
diff --git a/tests/rustdoc-json/reexport/macro.rs b/tests/rustdoc-json/reexport/macro.rs
index ac0632b98a9..be09cb47629 100644
--- a/tests/rustdoc-json/reexport/macro.rs
+++ b/tests/rustdoc-json/reexport/macro.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @set repro_id = "$.index[*][?(@.name=='repro')].id"
 #[macro_export]
 macro_rules! repro {
diff --git a/tests/rustdoc-json/reexport/mod_not_included.rs b/tests/rustdoc-json/reexport/mod_not_included.rs
index 1c49f213d1a..bc072be81a3 100644
--- a/tests/rustdoc-json/reexport/mod_not_included.rs
+++ b/tests/rustdoc-json/reexport/mod_not_included.rs
@@ -1,8 +1,5 @@
 // Regression test for https://github.com/rust-lang/rust/issues/101103
 
-#![feature(no_core)]
-#![no_core]
-
 mod m1 {
     pub fn x() {}
 }
diff --git a/tests/rustdoc-json/reexport/private_twice_one_inline.rs b/tests/rustdoc-json/reexport/private_twice_one_inline.rs
index 8c8152bd16c..d7b76623557 100644
--- a/tests/rustdoc-json/reexport/private_twice_one_inline.rs
+++ b/tests/rustdoc-json/reexport/private_twice_one_inline.rs
@@ -4,12 +4,8 @@
 // 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
 
-#![no_core]
-#![feature(no_core)]
-
 extern crate pub_struct as foo;
 #[doc(inline)]
-
 // @set crate_use_id = "$.index[*][?(@.docs=='Hack A')].id"
 // @set foo_id = "$.index[*][?(@.docs=='Hack A')].inner.import.id"
 /// Hack A
diff --git a/tests/rustdoc-json/reexport/private_two_names.rs b/tests/rustdoc-json/reexport/private_two_names.rs
index cdcbf2a2bc8..e6f037eb4b3 100644
--- a/tests/rustdoc-json/reexport/private_two_names.rs
+++ b/tests/rustdoc-json/reexport/private_two_names.rs
@@ -3,9 +3,6 @@
 // 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
 
-#![no_core]
-#![feature(no_core)]
-
 // @!has "$.index[*][?(@.name=='style')]"
 mod style {
     // @set color_struct_id = "$.index[*][?(@.inner.struct && @.name=='Color')].id"
diff --git a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
index a2a25d08448..46c3da4c15b 100644
--- a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
+++ b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/106379>
 
-#![feature(no_core)]
-#![no_core]
-
 mod repeat_n {
     #[doc(hidden)]
     pub struct RepeatN {}
diff --git a/tests/rustdoc-json/reexport/rename_private.rs b/tests/rustdoc-json/reexport/rename_private.rs
index 9114460231d..3924282a49e 100644
--- a/tests/rustdoc-json/reexport/rename_private.rs
+++ b/tests/rustdoc-json/reexport/rename_private.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @!has "$.index[*][?(@.name=='inner')]"
 mod inner {
     // @has "$.index[*][?(@.name=='Public')]"
diff --git a/tests/rustdoc-json/reexport/rename_public.rs b/tests/rustdoc-json/reexport/rename_public.rs
index d0fd314bd8c..63693787448 100644
--- a/tests/rustdoc-json/reexport/rename_public.rs
+++ b/tests/rustdoc-json/reexport/rename_public.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @set inner_id = "$.index[*][?(@.name=='inner')].id"
 pub mod inner {
     // @set public_id = "$.index[*][?(@.name=='Public')].id"
diff --git a/tests/rustdoc-json/reexport/same_name_different_types.rs b/tests/rustdoc-json/reexport/same_name_different_types.rs
index 6a765b73301..42ba6c40019 100644
--- a/tests/rustdoc-json/reexport/same_name_different_types.rs
+++ b/tests/rustdoc-json/reexport/same_name_different_types.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/107677>.
 
-#![feature(no_core)]
-#![no_core]
-
 pub mod nested {
     // @set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id"
 
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 a00547dc348..1e1710e1c08 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
@@ -2,9 +2,7 @@
 
 // Regression test for <https://github.com/rust-lang/rust/issues/97432>.
 
-#![feature(no_core)]
 #![no_std]
-#![no_core]
 
 mod inner {
     // @set trait_id = "$.index[*][?(@.name=='Trait')].id"
diff --git a/tests/rustdoc-json/reexport/simple_private.rs b/tests/rustdoc-json/reexport/simple_private.rs
index 462efee51bf..2ca8c7fa6be 100644
--- a/tests/rustdoc-json/reexport/simple_private.rs
+++ b/tests/rustdoc-json/reexport/simple_private.rs
@@ -1,6 +1,4 @@
 // edition:2018
-#![no_core]
-#![feature(no_core)]
 
 // @!has "$.index[*][?(@.name=='inner')]"
 mod inner {
diff --git a/tests/rustdoc-json/reexport/simple_public.rs b/tests/rustdoc-json/reexport/simple_public.rs
index 1373f96f87f..04611eeb95c 100644
--- a/tests/rustdoc-json/reexport/simple_public.rs
+++ b/tests/rustdoc-json/reexport/simple_public.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @set inner_id = "$.index[*][?(@.name=='inner')].id"
 pub mod inner {
 
diff --git a/tests/rustdoc-json/return_private.rs b/tests/rustdoc-json/return_private.rs
index 0ce81b5e59f..a9301b3fe4f 100644
--- a/tests/rustdoc-json/return_private.rs
+++ b/tests/rustdoc-json/return_private.rs
@@ -1,9 +1,6 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/96161>.
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 mod secret {
     pub struct Secret;
 }
diff --git a/tests/rustdoc-json/stripped_modules.rs b/tests/rustdoc-json/stripped_modules.rs
index d2664b49e9c..d5ab1173d92 100644
--- a/tests/rustdoc-json/stripped_modules.rs
+++ b/tests/rustdoc-json/stripped_modules.rs
@@ -1,6 +1,3 @@
-#![no_core]
-#![feature(no_core)]
-
 // @!has "$.index[*][?(@.name=='no_pub_inner')]"
 mod no_pub_inner {
     fn priv_inner() {}
diff --git a/tests/rustdoc-json/traits/private_supertrait.rs b/tests/rustdoc-json/traits/private_supertrait.rs
index 49238e5e88b..67b5a858ab7 100644
--- a/tests/rustdoc-json/traits/private_supertrait.rs
+++ b/tests/rustdoc-json/traits/private_supertrait.rs
@@ -1,9 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
-
 // @!has "$.index[*][?(@.name == 'sealed')]"
 mod sealed {
     // @set sealed_id = "$.index[*][?(@.name=='Sealed')].id"
diff --git a/tests/rustdoc-json/traits/supertrait.rs b/tests/rustdoc-json/traits/supertrait.rs
index 2123ac40427..6504467291d 100644
--- a/tests/rustdoc-json/traits/supertrait.rs
+++ b/tests/rustdoc-json/traits/supertrait.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
 #![feature(lang_items)]
-#![no_core]
 
 // @set loud_id = "$.index[*][?(@.name=='Loud')].id"
 pub trait Loud {}
diff --git a/tests/rustdoc-json/type/inherent_associated_type.rs b/tests/rustdoc-json/type/inherent_associated_type.rs
index 64c6c53ce47..f8603147951 100644
--- a/tests/rustdoc-json/type/inherent_associated_type.rs
+++ b/tests/rustdoc-json/type/inherent_associated_type.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 #![feature(inherent_associated_types)]
-#![feature(no_core)]
 #![allow(incomplete_features)]
-#![no_core]
 
 // @set OwnerMetadata = '$.index[*][?(@.name=="OwnerMetadata")].id'
 pub struct OwnerMetadata;