Skip to content

Commit 3ef8d2d

Browse files
Update tests for rustc_doc_primitive
1 parent f40aa59 commit 3ef8d2d

29 files changed

+57
-56
lines changed

tests/rustdoc-json/impls/local_for_local_primitive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(no_core)]
2-
#![feature(rustdoc_internals)]
2+
#![feature(rustc_attrs)]
33
#![no_core]
44

55
// @set Local = "$.index[*][?(@.name=='Local')].id"
@@ -16,6 +16,6 @@ impl Local for bool {}
1616

1717
// FIXME(#101695): Test bool's `impls` include "Local for bool"
1818
// @has "$.index[*][?(@.name=='bool')]"
19-
#[doc(primitive = "bool")]
19+
#[rustc_doc_primitive = "bool"]
2020
/// Boolean docs
2121
mod prim_bool {}

tests/rustdoc-json/primitives/local_primitive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
//! Link to [i32][prim@i32] [i64][prim@i64]
1010
11-
#[doc(primitive = "i32")]
11+
#[rustc_doc_primitive = "i32"]
1212
mod prim_i32 {}
1313

1414
// @set local_i32 = "$.index[*][?(@.name=='i32')].id"

tests/rustdoc-json/primitives/primitive_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub trait Trait {}
2525
impl Trait for i32 {}
2626

2727
/// i32
28-
#[doc(primitive = "i32")]
28+
#[rustc_doc_primitive = "i32"]
2929
mod prim_i32 {}
3030

3131
// @set i32 = "$.index[*][?(@.docs=='i32')].id"

tests/rustdoc-json/primitives/primitive_overloading.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
// Regression test for <https://github.com/rust-lang/rust/issues/98006>.
44

5-
#![feature(rustdoc_internals)]
5+
#![feature(rustc_attrs)]
66
#![feature(no_core)]
77

88
#![no_core]
99

1010
// @has "$.index[*][?(@.name=='usize')]"
1111
// @has "$.index[*][?(@.name=='prim')]"
1212

13-
#[doc(primitive = "usize")]
13+
#[rustc_doc_primitive = "usize"]
1414
/// This is the built-in type `usize`.
1515
mod prim {
1616
}

tests/rustdoc-json/primitives/use_primitive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// edition:2018
22

3-
#![feature(rustdoc_internals)]
3+
#![feature(rustc_attrs)]
44

5-
#[doc(primitive = "usize")]
5+
#[rustc_doc_primitive = "usize"]
66
mod usize {}
77

88
// @set local_crate_id = "$.index[*][?(@.name=='use_primitive')].crate_id"

tests/rustdoc-ui/coverage/exotic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// check-pass
33

44
#![feature(rustdoc_internals)]
5+
#![feature(rustc_attrs)]
56

67
//! the features only used in std also have entries in the table, so make sure those get pulled out
78
//! properly as well
89
910
/// woo, check it out, we can write our own primitive docs lol
10-
#[doc(primitive="unit")]
11+
#[rustc_doc_primitive = "unit"]
1112
mod prim_unit {}
1213

1314
/// keywords? sure, pile them on

tests/rustdoc/auto-impl-primitive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#![feature(rustdoc_internals)]
1+
#![feature(rustc_attrs)]
22

33
#![crate_name = "foo"]
44

55
pub use std::fs::File;
66

77
// @has 'foo/primitive.i16.html' '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementation'
8-
#[doc(primitive = "i16")]
8+
#[rustc_doc_primitive = "i16"]
99
/// I love poneys!
1010
mod prim {}

tests/rustdoc/auxiliary/issue-15318.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// compile-flags: -Cmetadata=aux
33
#![crate_type = "rlib"]
44
#![doc(html_root_url = "http://example.com/")]
5+
#![feature(rustc_attrs)]
56
#![feature(lang_items)]
67
#![no_std]
78

@@ -12,5 +13,5 @@ fn foo() {}
1213
fn bar(_: &core::panic::PanicInfo) -> ! { loop {} }
1314

1415
/// dox
15-
#[doc(primitive = "pointer")]
16+
#[rustc_doc_primitive = "pointer"]
1617
pub mod ptr {}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// compile-flags: --crate-type lib --edition 2018
22

3+
#![feature(rustc_attrs)]
34
#![feature(no_core)]
45
#![no_core]
56

6-
#[doc(primitive = "usize")]
7+
#[rustc_doc_primitive = "usize"]
78
/// This is the built-in type `usize`.
89
mod usize {
910
}

tests/rustdoc/check-source-code-urls-to-def.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// aux-build:source_code.rs
33
// build-aux-docs
44

5-
#![feature(rustdoc_internals)]
5+
#![feature(rustc_attrs)]
66

77
#![crate_name = "foo"]
88

@@ -65,5 +65,5 @@ pub fn foo4() {
6565
}
6666

6767
// @has - '//pre[@class="rust"]//a[@href="../../foo/primitive.bool.html"]' 'bool'
68-
#[doc(primitive = "bool")]
68+
#[rustc_doc_primitive = "bool"]
6969
mod whatever {}

0 commit comments

Comments
 (0)