Skip to content

Commit 3683975

Browse files
Add missing lang items in no_core tests in rustdoc
1 parent 0d907c1 commit 3683975

8 files changed

+31
-8
lines changed

Diff for: tests/rustdoc-json/primitives/primitive_impls.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
#![feature(no_core)]
1+
#![feature(no_core, lang_items)]
22
#![feature(rustc_attrs)]
33
#![feature(rustdoc_internals)]
44
#![no_core]
55
#![rustc_coherence_is_core]
66

77
//@ set impl_i32 = "$.index[*][?(@.docs=='Only core can do this')].id"
88

9+
#[lang = "sized"]
10+
trait Sized {}
11+
912
/// Only core can do this
1013
impl i32 {
1114
//@ set identity = "$.index[*][?(@.docs=='Do Nothing')].id"

Diff for: tests/rustdoc-ui/custom_code_classes_in_docs-warning3.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
// feature.
33

44
#![deny(warnings)]
5-
#![feature(no_core)]
5+
#![feature(no_core, lang_items)]
66
#![no_core]
77

8+
#[lang = "sized"]
9+
trait Sized {}
10+
811
/// ```{class="}
912
/// main;
1013
/// ```

Diff for: tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unclosed quote string `"`
2-
--> $DIR/custom_code_classes_in_docs-warning3.rs:8:1
2+
--> $DIR/custom_code_classes_in_docs-warning3.rs:11:1
33
|
44
LL | / /// ```{class="}
55
LL | | /// main;
@@ -17,7 +17,7 @@ LL | #![deny(warnings)]
1717
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(warnings)]`
1818

1919
error: unclosed quote string `"`
20-
--> $DIR/custom_code_classes_in_docs-warning3.rs:8:1
20+
--> $DIR/custom_code_classes_in_docs-warning3.rs:11:1
2121
|
2222
LL | / /// ```{class="}
2323
LL | | /// main;

Diff for: tests/rustdoc/cfg_doc_reexport.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#![feature(doc_cfg)]
2-
#![feature(no_core)]
2+
#![feature(no_core, lang_items)]
33

44
#![crate_name = "foo"]
55
#![no_core]
66

7+
#[lang = "sized"]
8+
trait Sized {}
9+
710
//@ has 'foo/index.html'
811
//@ has - '//dt/*[@class="stab portability"]' 'foobar'
912
//@ has - '//dt/*[@class="stab portability"]' 'bar'

Diff for: tests/rustdoc/cross-crate-primitive-doc.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
//@ compile-flags: --extern-html-root-url=primitive_doc=../ -Z unstable-options
33
//@ only-linux
44

5-
#![feature(no_core)]
5+
#![feature(no_core, lang_items)]
66
#![no_core]
77

8+
#[lang = "sized"]
9+
trait Sized {}
10+
811
extern crate primitive_doc;
912

1013
//@ has 'cross_crate_primitive_doc/fn.foo.html' '//a[@href="../primitive_doc/primitive.usize.html"]' 'usize'

Diff for: tests/rustdoc/intra-doc/no-doc-primitive.rs

+5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
#![rustc_coherence_is_core]
77
#![crate_type = "rlib"]
88

9+
910
//@ has no_doc_primitive/index.html
1011
//! A [`char`] and its [`char::len_utf8`].
12+
13+
#[lang = "sized"]
14+
trait Sized {}
15+
1116
impl char {
1217
pub fn len_utf8(self) -> usize {
1318
42

Diff for: tests/rustdoc/reexport-trait-from-hidden-111064-2.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// Regression test for <https://github.com/rust-lang/rust/issues/111064>.
2-
#![feature(no_core)]
2+
#![feature(no_core, lang_items)]
33
#![no_core]
44
#![crate_name = "foo"]
55

6+
#[lang = "sized"]
7+
trait Sized {}
8+
69
//@ files "foo" "['sidebar-items.js', 'all.html', 'hidden', 'index.html', 'struct.Bar.html', \
710
// 'visible']"
811
//@ files "foo/hidden" "['inner']"

Diff for: tests/rustdoc/safe-intrinsic.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#![feature(intrinsics)]
2-
#![feature(no_core)]
2+
#![feature(no_core, lang_items)]
33
#![feature(rustc_attrs)]
44

55
#![no_core]
66
#![crate_name = "foo"]
77

8+
#[lang = "sized"]
9+
trait Sized {}
10+
811
//@ has 'foo/fn.abort.html'
912
//@ has - '//pre[@class="rust item-decl"]' 'pub fn abort() -> !'
1013
#[rustc_intrinsic]

0 commit comments

Comments
 (0)