Skip to content

Commit 17991f3

Browse files
committed
rustdoc: remove rust logo from non-Rust crates
1 parent 7a19a72 commit 17991f3

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

alloc/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
not(no_sync),
7979
target_has_atomic = "ptr"
8080
))]
81+
#![cfg_attr(not(bootstrap), doc(rust_logo))]
82+
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
8183
#![no_std]
8284
#![needs_allocator]
8385
// Lints:

core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
test(no_crate_inject, attr(deny(warnings))),
6969
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
7070
)]
71+
#![cfg_attr(not(bootstrap), doc(rust_logo))]
7172
#![doc(cfg_hide(
7273
not(test),
7374
any(not(feature = "miri-test-libstd"), test, doctest),

proc_macro/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
test(no_crate_inject, attr(deny(warnings))),
1818
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
1919
)]
20+
#![cfg_attr(not(bootstrap), doc(rust_logo))]
21+
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
2022
// This library is copied into rust-analyzer to allow loading rustc compiled proc macros.
2123
// Please avoid unstable features where possible to minimize the amount of changes necessary
2224
// to make it compile with rust-analyzer on stable.

std/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
test(no_crate_inject, attr(deny(warnings))),
228228
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
229229
)]
230+
#![cfg_attr(not(bootstrap), doc(rust_logo))]
230231
#![doc(cfg_hide(
231232
not(test),
232233
not(any(test, bootstrap)),

test/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#![unstable(feature = "test", issue = "50297")]
1818
#![doc(test(attr(deny(warnings))))]
19+
#![cfg_attr(not(bootstrap), doc(rust_logo))]
20+
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
1921
#![feature(internal_output_capture)]
2022
#![feature(staged_api)]
2123
#![feature(process_exitcode_internals)]

0 commit comments

Comments
 (0)