Skip to content

Commit 9c605e8

Browse files
Improve Atomic macro for documentation handling
1 parent 22aff7c commit 9c605e8

File tree

3 files changed

+48
-36
lines changed

3 files changed

+48
-36
lines changed

Cargo.lock

+34-19
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "aho-corasick"
1010
version = "0.6.9"
1111
source = "registry+https://github.com/rust-lang/crates.io-index"
1212
dependencies = [
13-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
13+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1414
]
1515

1616
[[package]]
@@ -965,7 +965,7 @@ name = "fwdansi"
965965
version = "1.0.1"
966966
source = "registry+https://github.com/rust-lang/crates.io-index"
967967
dependencies = [
968-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
968+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
969969
"termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
970970
]
971971

@@ -1020,7 +1020,7 @@ dependencies = [
10201020
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
10211021
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
10221022
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
1023-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1023+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
10241024
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
10251025
]
10261026

@@ -1126,7 +1126,7 @@ dependencies = [
11261126
"globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
11271127
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
11281128
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
1129-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1129+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
11301130
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
11311131
"same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
11321132
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1433,7 +1433,7 @@ dependencies = [
14331433
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
14341434
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
14351435
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
1436-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1436+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
14371437
"open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
14381438
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
14391439
"regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1461,7 +1461,7 @@ dependencies = [
14611461
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
14621462
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
14631463
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
1464-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1464+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
14651465
"open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
14661466
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
14671467
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1476,13 +1476,8 @@ dependencies = [
14761476

14771477
[[package]]
14781478
name = "memchr"
1479-
version = "2.1.1"
1479+
version = "2.2.0"
14801480
source = "registry+https://github.com/rust-lang/crates.io-index"
1481-
dependencies = [
1482-
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
1483-
"libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
1484-
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
1485-
]
14861481

14871482
[[package]]
14881483
name = "memmap"
@@ -1982,6 +1977,16 @@ dependencies = [
19821977
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
19831978
]
19841979

1980+
[[package]]
1981+
name = "pulldown-cmark"
1982+
version = "0.4.0"
1983+
source = "registry+https://github.com/rust-lang/crates.io-index"
1984+
dependencies = [
1985+
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
1986+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
1987+
"unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1988+
]
1989+
19851990
[[package]]
19861991
name = "quick-error"
19871992
version = "1.2.2"
@@ -2066,7 +2071,7 @@ name = "rand_chacha"
20662071
version = "0.1.0"
20672072
source = "registry+https://github.com/rust-lang/crates.io-index"
20682073
dependencies = [
2069-
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
2074+
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
20702075
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
20712076
]
20722077

@@ -2088,7 +2093,7 @@ name = "rand_hc"
20882093
version = "0.1.0"
20892094
source = "registry+https://github.com/rust-lang/crates.io-index"
20902095
dependencies = [
2091-
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
2096+
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
20922097
]
20932098

20942099
[[package]]
@@ -2113,7 +2118,7 @@ name = "rand_xorshift"
21132118
version = "0.1.0"
21142119
source = "registry+https://github.com/rust-lang/crates.io-index"
21152120
dependencies = [
2116-
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
2121+
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
21172122
]
21182123

21192124
[[package]]
@@ -2167,7 +2172,7 @@ version = "0.2.11"
21672172
source = "registry+https://github.com/rust-lang/crates.io-index"
21682173
dependencies = [
21692174
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
2170-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
2175+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
21712176
"regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
21722177
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
21732178
"utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2179,7 +2184,7 @@ version = "1.1.0"
21792184
source = "registry+https://github.com/rust-lang/crates.io-index"
21802185
dependencies = [
21812186
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
2182-
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
2187+
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
21832188
"regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
21842189
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
21852190
"utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3018,7 +3023,7 @@ version = "0.0.0"
30183023
dependencies = [
30193024
"minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
30203025
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
3021-
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
3026+
"pulldown-cmark 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
30223027
"tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
30233028
]
30243029

@@ -3759,6 +3764,14 @@ name = "ucd-util"
37593764
version = "0.1.3"
37603765
source = "registry+https://github.com/rust-lang/crates.io-index"
37613766

3767+
[[package]]
3768+
name = "unicase"
3769+
version = "2.3.0"
3770+
source = "registry+https://github.com/rust-lang/crates.io-index"
3771+
dependencies = [
3772+
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
3773+
]
3774+
37623775
[[package]]
37633776
name = "unicode-bidi"
37643777
version = "0.3.4"
@@ -4113,7 +4126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
41134126
"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
41144127
"checksum mdbook 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "90b5a8d7e341ceee5db3882a06078d42661ddcfa2b3687319cc5da76ec4e782f"
41154128
"checksum mdbook 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0ba0d44cb4089c741b9a91f3e5218298a40699c2f3a070a85014eed290c60819"
4116-
"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16"
4129+
"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
41174130
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
41184131
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
41194132
"checksum minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3a2898502751dcc9d66b6fff57f3cf63cc91605e83e1a33515396f5027f8e4ca"
@@ -4165,6 +4178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
41654178
"checksum proptest 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "926d0604475349f463fe44130aae73f2294b5309ab2ca0310b998bd334ef191f"
41664179
"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32"
41674180
"checksum pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15"
4181+
"checksum pulldown-cmark 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa4987312f985c300f4d68d208a9e4b646268140b6dbe83388c09652cc19ed3f"
41684182
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
41694183
"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45"
41704184
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
@@ -4276,6 +4290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
42764290
"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"
42774291
"checksum ucd-trie 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "71a9c5b1fe77426cf144cc30e49e955270f5086e31a6441dfa8b32efc09b9d77"
42784292
"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"
4293+
"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd"
42794294
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
42804295
"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25"
42814296
"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1"

src/libcore/sync/atomic.rs

+13-16
Original file line numberDiff line numberDiff line change
@@ -1134,22 +1134,19 @@ macro_rules! atomic_int {
11341134
$align:expr,
11351135
$atomic_new:expr,
11361136
$int_type:ident $atomic_type:ident $atomic_init:ident) => {
1137-
/// An integer type which can be safely shared between threads.
1138-
///
1139-
/// This type has the same in-memory representation as the underlying
1140-
/// integer type, [`
1141-
#[doc = $s_int_type]
1142-
/// `](
1143-
#[doc = $int_ref]
1144-
/// ). For more about the differences between atomic types and
1145-
/// non-atomic types as well as information about the portability of
1146-
/// this type, please see the [module-level documentation].
1147-
///
1148-
/// [module-level documentation]: index.html
1149-
#[$stable]
1150-
#[repr(C, align($align))]
1151-
pub struct $atomic_type {
1152-
v: UnsafeCell<$int_type>,
1137+
doc_comment! { concat!("An integer type which can be safely shared between threads.
1138+
1139+
This type has the same in-memory representation as the underlying integer type, [`",
1140+
$s_int_type, "`](", $int_ref, "). For more about the differences between atomic types and
1141+
non-atomic types as well as information about the portability of
1142+
this type, please see the [module-level documentation].
1143+
1144+
[module-level documentation]: index.html"),
1145+
#[$stable]
1146+
#[repr(C, align($align))]
1147+
pub struct $atomic_type {
1148+
v: UnsafeCell<$int_type>,
1149+
}
11531150
}
11541151

11551152
/// An atomic integer initialized to `0`.

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ fn clean_srcpath<F>(src_root: &Path, p: &Path, keep_filename: bool, mut f: F) wh
13541354
}
13551355

13561356
/// Attempts to find where an external crate is located, given that we're
1357-
/// rendering in to the specified source destination.
1357+
/// rendering it to the specified source destination.
13581358
fn extern_location(e: &clean::ExternalCrate, extern_url: Option<&str>, dst: &Path)
13591359
-> ExternalLocation
13601360
{

0 commit comments

Comments
 (0)