Skip to content

Commit f784fa7

Browse files
committed
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.
1 parent 187d1af commit f784fa7

40 files changed

+9
-126
lines changed

tests/rustdoc-json/doc_hidden_failure.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// Regression test for <https://github.com/rust-lang/rust/issues/98007>.
22

3-
#![feature(no_core)]
4-
#![no_core]
5-
63
mod auto {
74
mod action_row {
85
pub struct ActionRowBuilder;

tests/rustdoc-json/enums/use_glob.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// Regression test for <https://github.com/rust-lang/rust/issues/104942>
22

3-
#![feature(no_core)]
4-
#![no_core]
5-
63
// @set Color = "$.index[*][?(@.name == 'Color')].id"
74
pub enum Color {
85
Red,

tests/rustdoc-json/enums/use_variant.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(no_core)]
2-
#![no_core]
3-
41
// @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id"
52
pub enum AlwaysNone {
63
// @set None = "$.index[*][?(@.name == 'None')].id"

tests/rustdoc-json/fn_pointer/generics.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// ignore-tidy-linelength
22

3-
#![feature(no_core)]
4-
#![no_core]
5-
63
// @count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[*]" 1
74
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][0]" '"val"'
85
// @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][1].borrowed_ref.lifetime" \"\'c\"

tests/rustdoc-json/fns/extern_c_variadic.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(no_core)]
2-
#![no_core]
3-
41
extern "C" {
52
// @is "$.index[*][?(@.name == 'not_variadic')].inner.function.decl.c_variadic" false
63
pub fn not_variadic(_: i32);

tests/rustdoc-json/fns/generic_args.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// ignore-tidy-linelength
22

3-
#![feature(no_core)]
4-
#![no_core]
5-
63
// @set foo = "$.index[*][?(@.name=='Foo')].id"
74
pub trait Foo {}
85

tests/rustdoc-json/fns/generic_returns.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// ignore-tidy-linelength
22

3-
#![feature(no_core)]
4-
#![no_core]
5-
63
// @count "$.index[*][?(@.name=='generic_returns')].inner.module.items[*]" 2
74

85
// @set foo = "$.index[*][?(@.name=='Foo')].id"

tests/rustdoc-json/fns/generics.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// ignore-tidy-linelength
22

3-
#![feature(no_core)]
4-
#![no_core]
5-
63
// @set wham_id = "$.index[*][?(@.name=='Wham')].id"
74
pub trait Wham {}
85

tests/rustdoc-json/glob_import.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// This is a regression test for <https://github.com/rust-lang/rust/issues/98003>.
22

3-
#![feature(no_core)]
43
#![no_std]
5-
#![no_core]
64

75
// @has "$.index[*][?(@.name=='glob')]"
86
// @has "$.index[*][?(@.inner.import)].inner.import.name" \"*\"
97

10-
118
mod m1 {
129
pub fn f() {}
1310
}
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(no_core)]
2-
#![no_core]
3-
41
pub struct Foo;
52

63
/// impl Foo priv
@@ -9,18 +6,16 @@ impl Foo {
96
}
107
// @!has '$.index[*][?(@.docs=="impl Foo priv")]'
118

12-
139
/// impl Foo pub
1410
impl Foo {
1511
pub fn qux() {}
1612
}
1713
// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
1814

19-
2015
/// impl Foo hidden
2116
impl Foo {
2217
#[doc(hidden)]
23-
pub fn __quazl(){}
18+
pub fn __quazl() {}
2419
}
2520
// FIXME(#111564): Is this the right behaviour?
2621
// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'

0 commit comments

Comments
 (0)