Skip to content

Commit 2cba458

Browse files
committed
rustdoc: const {Meta,}Sized in non-minicore tests
As before, but adding constness.
1 parent 07f8e23 commit 2cba458

15 files changed

+46
-5
lines changed

tests/rustdoc-json/impls/auto.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#![feature(no_core, auto_traits, lang_items, arbitrary_self_types)]
2+
#![feature(const_trait_impl)]
23
#![no_core]
34

45
#[lang = "pointee_sized"]
56
pub trait PointeeSized {}
67

78
#[lang = "meta_sized"]
9+
#[const_trait]
810
pub trait MetaSized: PointeeSized {}
911

1012
#[lang = "sized"]
13+
#[const_trait]
1114
pub trait Sized: MetaSized {}
1215

1316
#[lang = "legacy_receiver"]
@@ -21,8 +24,8 @@ impl Foo {
2124
}
2225

2326
// Testing spans, so all tests below code
24-
//@ is "$.index[?(@.docs=='has span')].span.begin" "[19, 0]"
25-
//@ is "$.index[?(@.docs=='has span')].span.end" "[21, 1]"
27+
//@ is "$.index[?(@.docs=='has span')].span.begin" "[22, 0]"
28+
//@ is "$.index[?(@.docs=='has span')].span.end" "[24, 1]"
2629
// FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
2730
// is "$.index[?(@.inner.impl.is_synthetic==true)].span" null
2831
pub struct Foo;

tests/rustdoc-json/primitives/primitive_impls.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(no_core, lang_items)]
2+
#![feature(const_trait_impl)]
23
#![feature(rustc_attrs)]
34
#![feature(rustdoc_internals)]
45
#![no_core]
@@ -10,9 +11,11 @@
1011
pub trait PointeeSized {}
1112

1213
#[lang = "meta_sized"]
14+
#[const_trait]
1315
pub trait MetaSized: PointeeSized {}
1416

1517
#[lang = "sized"]
18+
#[const_trait]
1619
pub trait Sized: MetaSized {}
1720

1821
/// Only core can do this

tests/rustdoc-ui/custom_code_classes_in_docs-warning3.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33

44
#![deny(warnings)]
55
#![feature(no_core, lang_items)]
6+
#![feature(const_trait_impl)]
67
#![no_core]
78

89
#[lang = "pointee_sized"]
910
pub trait PointeeSized {}
1011

1112
#[lang = "meta_sized"]
13+
#[const_trait]
1214
pub trait MetaSized: PointeeSized {}
1315

1416
#[lang = "sized"]
17+
#[const_trait]
1518
pub trait Sized: MetaSized {}
1619

1720
/// ```{class="}

tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr

Lines changed: 2 additions & 2 deletions
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:17:1
2+
--> $DIR/custom_code_classes_in_docs-warning3.rs:20: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:17:1
20+
--> $DIR/custom_code_classes_in_docs-warning3.rs:20:1
2121
|
2222
LL | / /// ```{class="}
2323
LL | | /// main;

tests/rustdoc-ui/target-feature-stability.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
#![crate_type = "lib"]
1313
#![feature(no_core, lang_items)]
1414
#![feature(arm_target_feature)]
15+
#![feature(const_trait_impl)]
1516
#![no_core]
1617

1718
#[lang = "pointee_sized"]
1819
pub trait PointeeSized {}
1920

2021
#[lang = "meta_sized"]
22+
#[const_trait]
2123
pub trait MetaSized: PointeeSized {}
2224

2325
#[lang = "sized"]
26+
#[const_trait]
2427
pub trait Sized: MetaSized {}
2528

2629
// `fp-armv8` is "forbidden" on aarch64 as we tie it to `neon`.

tests/rustdoc/cfg_doc_reexport.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(doc_cfg)]
22
#![feature(no_core, lang_items)]
3+
#![feature(const_trait_impl)]
34

45
#![crate_name = "foo"]
56
#![no_core]
@@ -8,9 +9,11 @@
89
pub trait PointeeSized {}
910

1011
#[lang = "meta_sized"]
12+
#[const_trait]
1113
pub trait MetaSized: PointeeSized {}
1214

1315
#[lang = "sized"]
16+
#[const_trait]
1417
pub trait Sized: MetaSized {}
1518

1619
//@ has 'foo/index.html'

tests/rustdoc/cross-crate-primitive-doc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
//@ only-linux
44

55
#![feature(no_core, lang_items)]
6+
#![feature(const_trait_impl)]
67
#![no_core]
78

89
#[lang = "pointee_sized"]
910
pub trait PointeeSized {}
1011

1112
#[lang = "meta_sized"]
13+
#[const_trait]
1214
pub trait MetaSized: PointeeSized {}
1315

1416
#[lang = "sized"]
17+
#[const_trait]
1518
pub trait Sized: MetaSized {}
1619

1720
extern crate primitive_doc;

tests/rustdoc/file-creation-111249.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
// https://github.com/rust-lang/rust/issues/111249
22
#![crate_name = "foo"]
33
#![feature(no_core)]
4-
#![feature(lang_items)]
4+
#![feature(const_trait_impl, lang_items)]
55
#![no_core]
66

77
#[lang = "pointee_sized"]
88
pub trait PointeeSized {}
99

1010
#[lang = "meta_sized"]
11+
#[const_trait]
1112
pub trait MetaSized: PointeeSized {}
1213

1314
#[lang = "sized"]
15+
#[const_trait]
1416
pub trait Sized: MetaSized {}
1517

1618
//@ files "foo" "['all.html', 'visible', 'index.html', 'sidebar-items.js', 'hidden', \

tests/rustdoc/intra-doc/auxiliary/my-core.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(no_core, lang_items, rustdoc_internals, rustc_attrs)]
2+
#![feature(const_trait_impl)]
23
#![no_core]
34
#![rustc_coherence_is_core]
45
#![crate_type="rlib"]
@@ -17,9 +18,11 @@ impl char {
1718
pub trait PointeeSized {}
1819

1920
#[lang = "meta_sized"]
21+
#[const_trait]
2022
pub trait MetaSized: PointeeSized {}
2123

2224
#[lang = "sized"]
25+
#[const_trait]
2326
pub trait Sized: MetaSized {}
2427

2528
#[lang = "clone"]

tests/rustdoc/intra-doc/no-doc-primitive.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![deny(rustdoc::broken_intra_doc_links)]
44
#![feature(no_core, lang_items, rustc_attrs)]
5+
#![feature(const_trait_impl)]
56
#![no_core]
67
#![rustc_coherence_is_core]
78
#![crate_type = "rlib"]
@@ -14,9 +15,11 @@
1415
pub trait PointeeSized {}
1516

1617
#[lang = "meta_sized"]
18+
#[const_trait]
1719
pub trait MetaSized: PointeeSized {}
1820

1921
#[lang = "sized"]
22+
#[const_trait]
2023
pub trait Sized: MetaSized {}
2124

2225
impl char {

0 commit comments

Comments
 (0)