Skip to content

Commit 12920f4

Browse files
authored
Rollup merge of rust-lang#69561 - JohnTitor:clean-up-unstable-book, r=Mark-Simulacrum
Clean up unstable book - rust-lang#58402's feature was renamed to `tidy_test_never_used_anywhere_else` and it is now used for tidy only - `read_initializer` link is wrong and the doc should be auto-generated so removed - Add dummy doc for `link_cfg` - Stop generating `compiler_builtins_lib` doc in favor of b8ccc0f - Make `rustc_attrs` tracking issue "None"
2 parents 60c38ee + c55df37 commit 12920f4

18 files changed

+20
-58
lines changed

src/doc/unstable-book/src/language-features/const-in-array-repeat-expressions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The tracking issue for this feature is: [#49147]
44

5-
[#44109]: https://github.com/rust-lang/rust/issues/49147
5+
[#49147]: https://github.com/rust-lang/rust/issues/49147
66

77
------------------------
88

src/doc/unstable-book/src/language-features/impl-trait-in-bindings.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# `impl_trait_in_bindings`
22

3-
The tracking issue for this feature is: [#34511]
3+
The tracking issue for this feature is: [#63065]
44

5-
[#34511]: https://github.com/rust-lang/rust/issues/34511
5+
[#63065]: https://github.com/rust-lang/rust/issues/63065
66

77
------------------------
88

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# `link_cfg`
2+
3+
This feature is internal to the Rust compiler and is not intended for general use.
4+
5+
------------------------

src/doc/unstable-book/src/language-features/trait-alias.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The tracking issue for this feature is: [#41517]
44

5-
[#41417]: https://github.com/rust-lang/rust/issues/41517
5+
[#41517]: https://github.com/rust-lang/rust/issues/41517
66

77
------------------------
88

src/doc/unstable-book/src/language-features/transparent-unions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The tracking issue for this feature is [#60405]
44

5-
[60405]: https://github.com/rust-lang/rust/issues/60405
5+
[#60405]: https://github.com/rust-lang/rust/issues/60405
66

77
----
88

src/doc/unstable-book/src/library-features/read-initializer.md

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# `tidy_test_never_used_anywhere_else`
2+
3+
This feature is internal to the Rust compiler and is not intended for general use.
4+
5+
------------------------

src/librustc_feature/active.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ declare_features! (
9999

100100
// no-tracking-issue-start
101101

102+
/// Allows using `rustc_*` attributes (RFC 572).
103+
(active, rustc_attrs, "1.0.0", None, None),
104+
102105
/// Allows using compiler's own crates.
103106
(active, rustc_private, "1.0.0", Some(27812), None),
104107

@@ -128,9 +131,6 @@ declare_features! (
128131
/// Allows using `#[link_name="llvm.*"]`.
129132
(active, link_llvm_intrinsics, "1.0.0", Some(29602), None),
130133

131-
/// Allows using `rustc_*` attributes (RFC 572).
132-
(active, rustc_attrs, "1.0.0", Some(29642), None),
133-
134134
/// Allows using the `box $expr` syntax.
135135
(active, box_syntax, "1.0.0", Some(49733), None),
136136

src/test/ui/consts/min_const_fn/allow_const_fn_ptr_feature_gate.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: internal implementation detail
44
LL | #[rustc_allow_const_fn_ptr]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error: aborting due to previous error

src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr

-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit test
44
LL | #[rustc_variance]
55
| ^^^^^^^^^^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable
@@ -13,7 +12,6 @@ error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests a
1312
LL | #[rustc_error]
1413
| ^^^^^^^^^^^^^^
1514
|
16-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
1715
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
1816

1917
error[E0658]: the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to enable niche optimizations in libcore and will never be stable
@@ -22,7 +20,6 @@ error[E0658]: the `#[rustc_nonnull_optimization_guaranteed]` attribute is just u
2220
LL | #[rustc_nonnull_optimization_guaranteed]
2321
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2422
|
25-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
2623
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
2724

2825
error: aborting due to 3 previous errors

src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr

-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rust
44
LL | #[rustc::unknown]
55
| ^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error: expected attribute, found macro `rustc::unknown`
@@ -19,7 +18,6 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rust
1918
LL | #[unknown::rustc]
2019
| ^^^^^
2120
|
22-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
2321
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
2422

2523
error: expected attribute, found macro `unknown::rustc`
@@ -34,7 +32,6 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rust
3432
LL | #[rustc_unknown]
3533
| ^^^^^^^^^^^^^
3634
|
37-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
3835
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
3936

4037
error: cannot find attribute `rustc_unknown` in this scope
@@ -49,7 +46,6 @@ error[E0658]: the `#[rustc_dummy]` attribute is just used for rustc unit tests a
4946
LL | #[rustc_dummy]
5047
| ^^^^^^^^^^^^^^
5148
|
52-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
5349
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
5450

5551
error: aborting due to 7 previous errors

src/test/ui/on-unimplemented/feature-gate-on-unimplemented.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: this is an internal attribute that will never be stable
44
LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error: aborting due to previous error

src/test/ui/proc-macro/expand-to-unstable-2.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rust
44
LL | #[derive(Unstable)]
55
| ^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
109

src/test/ui/reserved/reserved-attr-on-macro.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rust
44
LL | #[rustc_attribute_should_be_reserved]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error: cannot determine resolution for the macro `foo`

src/test/ui/suggestions/attribute-typos.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rust
44
LL | #[rustc_err]
55
| ^^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error: cannot find attribute `rustc_err` in this scope

src/test/ui/tool-attributes/diagnostic_item.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0658]: diagnostic items compiler internal support for linting
44
LL | #[rustc_diagnostic_item = "foomp"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
87
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
98

109
error: aborting due to previous error

src/tools/tidy/src/features.rs

-14
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,6 @@ pub struct CollectedFeatures {
6363
pub fn collect_lib_features(base_src_path: &Path) -> Features {
6464
let mut lib_features = Features::new();
6565

66-
// This library feature is defined in the `compiler_builtins` crate, which
67-
// has been moved out-of-tree. Now it can no longer be auto-discovered by
68-
// `tidy`, because we need to filter out its (submodule) directory. Manually
69-
// add it to the set of known library features so we can still generate docs.
70-
lib_features.insert(
71-
"compiler_builtins_lib".to_owned(),
72-
Feature {
73-
level: Status::Unstable,
74-
since: None,
75-
has_gate_test: false,
76-
tracking_issue: None,
77-
},
78-
);
79-
8066
map_lib_features(base_src_path, &mut |res, _, _| {
8167
if let Ok((name, feature)) = res {
8268
lib_features.insert(name.to_owned(), feature);

src/tools/tidy/src/unstable_book.rs

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::features::{CollectedFeatures, Feature, Features, Status};
1+
use crate::features::{CollectedFeatures, Features, Status};
22
use std::collections::BTreeSet;
33
use std::fs;
44
use std::path::{Path, PathBuf};
@@ -73,26 +73,12 @@ fn collect_unstable_book_lib_features_section_file_names(base_src_path: &Path) -
7373

7474
pub fn check(path: &Path, features: CollectedFeatures, bad: &mut bool) {
7575
let lang_features = features.lang;
76-
let mut lib_features = features
76+
let lib_features = features
7777
.lib
7878
.into_iter()
7979
.filter(|&(ref name, _)| !lang_features.contains_key(name))
8080
.collect::<Features>();
8181

82-
// This library feature is defined in the `compiler_builtins` crate, which
83-
// has been moved out-of-tree. Now it can no longer be auto-discovered by
84-
// `tidy`, because we need to filter out its (submodule) directory. Manually
85-
// add it to the set of known library features so we can still generate docs.
86-
lib_features.insert(
87-
"compiler_builtins_lib".to_owned(),
88-
Feature {
89-
level: Status::Unstable,
90-
since: None,
91-
has_gate_test: false,
92-
tracking_issue: None,
93-
},
94-
);
95-
9682
// Library features
9783
let unstable_lib_feature_names = collect_unstable_feature_names(&lib_features);
9884
let unstable_book_lib_features_section_file_names =

0 commit comments

Comments
 (0)