Skip to content

Commit 0cbe1cc

Browse files
committed
try to work around rustdoc bug, and other rustdoc adjustments
1 parent 590c1c9 commit 0cbe1cc

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

library/core/src/num/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::{fmt, intrinsics, ptr, ub_checks};
3131
issue = "none"
3232
)]
3333
pub unsafe trait ZeroablePrimitive: Sized + Copy + private::Sealed {
34-
#[doc(hidden)]
34+
/// A type like `Self` but with a niche that includes zero.
3535
type NonZeroInner: Sized + Copy;
3636
}
3737

tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ where
2020
//@ has - '//h3[@class="code-header"]' 'impl<B> Send for Switch<B>where <B as Signal>::Item: Send'
2121
//@ has - '//h3[@class="code-header"]' 'impl<B> Sync for Switch<B>where <B as Signal>::Item: Sync'
2222
//@ count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
23-
//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 6
23+
//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 7
24+
// The number here will need updating when new auto traits are added: ^
2425
pub struct Switch<B: Signal> {
2526
pub inner: <B as Signal2>::Item2,
2627
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#![crate_name = "foo"]
2-
#![feature(negative_impls, freeze_impls, freeze)]
2+
#![feature(negative_impls, freeze_impls, freeze, unsafe_unpin)]
33

44
pub struct Foo;
55

66
//@ has foo/struct.Foo.html
77
//@ !hasraw - 'Auto Trait Implementations'
8+
// Manually un-implement all auto traits for Foo:
89
impl !Send for Foo {}
910
impl !Sync for Foo {}
1011
impl !std::marker::Freeze for Foo {}
12+
impl !std::marker::UnsafeUnpin for Foo {}
1113
impl !std::marker::Unpin for Foo {}
1214
impl !std::panic::RefUnwindSafe for Foo {}
1315
impl !std::panic::UnwindSafe for Foo {}

tests/rustdoc-html/synthetic_auto/basic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//@ has - '//h3[@class="code-header"]' 'impl<T> Send for Foo<T>where T: Send'
33
//@ has - '//h3[@class="code-header"]' 'impl<T> Sync for Foo<T>where T: Sync'
44
//@ count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
5-
//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 6
5+
//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 7
6+
// The number here will need updating when new auto traits are added: ^
67
pub struct Foo<T> {
78
field: T,
89
}

tests/rustdoc-html/synthetic_auto/manual.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// 'impl<T> Send for Foo<T>'
77
//
88
//@ count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
9-
//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
9+
//@ count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 6
10+
// The number here will need updating when new auto traits are added: ^
1011
pub struct Foo<T> {
1112
field: T,
1213
}

0 commit comments

Comments
 (0)