Skip to content

Commit e631df3

Browse files
committed
add spaces before newlines in rustdocs
1 parent ca55a4b commit e631df3

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

src/libcore/char.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@ import is_XID_continue = unicode::derived_property::XID_Continue;
4545

4646

4747
#[doc(
48-
brief = "Indicates whether a character is in lower case, defined\
48+
brief = "Indicates whether a character is in lower case, defined \
4949
in terms of the Unicode General Category 'Ll'."
5050
)]
5151
pure fn is_lowercase(c: char) -> bool {
5252
ret unicode::general_category::Ll(c);
5353
}
5454

5555
#[doc(
56-
brief = "Indicates whether a character is in upper case, defined\
56+
brief = "Indicates whether a character is in upper case, defined \
5757
in terms of the Unicode General Category 'Lu'."
5858
)]
5959
pure fn is_uppercase(c: char) -> bool {
6060
ret unicode::general_category::Lu(c);
6161
}
6262

6363
#[doc(
64-
brief = "Indicates whether a character is whitespace, defined in\
65-
terms of the Unicode General Categories 'Zs', 'Zl', 'Zp'\
64+
brief = "Indicates whether a character is whitespace, defined in \
65+
terms of the Unicode General Categories 'Zs', 'Zl', 'Zp' \
6666
additional 'Cc'-category control codes in the range [0x09, 0x0d]"
6767
)]
6868
pure fn is_whitespace(c: char) -> bool {
@@ -73,8 +73,8 @@ pure fn is_whitespace(c: char) -> bool {
7373
}
7474

7575
#[doc(
76-
brief = "Indicates whether a character is alphanumeric, defined\
77-
in terms of the Unicode General Categories 'Nd',\
76+
brief = "Indicates whether a character is alphanumeric, defined \
77+
in terms of the Unicode General Categories 'Nd', \
7878
'Nl', 'No' and the Derived Core Property 'Alphabetic'."
7979
)]
8080
pure fn is_alphanumeric(c: char) -> bool {
@@ -86,10 +86,10 @@ pure fn is_alphanumeric(c: char) -> bool {
8686

8787

8888
#[doc(
89-
brief = "Convert a char to the corresponding digit.\
89+
brief = "Convert a char to the corresponding digit. \
9090
Safety note: This function fails if `c` is not a valid char",
91-
return = "If `c` is between '0' and '9', the corresponding value\
92-
between 0 and 9. If `c` is 'a' or 'A', 10. If `c` is\
91+
return = "If `c` is between '0' and '9', the corresponding value \
92+
between 0 and 9. If `c` is 'a' or 'A', 10. If `c` is \
9393
'b' or 'B', 11, etc."
9494
)]
9595
pure fn to_digit(c: char) -> u8 unsafe {
@@ -100,7 +100,7 @@ pure fn to_digit(c: char) -> u8 unsafe {
100100
}
101101

102102
#[doc(
103-
brief = "Convert a char to the corresponding digit. Returns none when\
103+
brief = "Convert a char to the corresponding digit. Returns none when \
104104
character is not a valid hexadecimal digit."
105105
)]
106106
pure fn maybe_digit(c: char) -> option::t<u8> {

src/libcore/comm.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#[doc(
22
brief = "Communication between tasks",
3-
desc = "Communication between tasks is facilitated by ports (in the\
4-
receiving task), and channels (in the sending task). Any\
5-
number of channels may feed into a single port.\
6-
Ports and channels may only transmit values of unique\
7-
types; that is, values that are statically guaranteed to\
8-
be accessed by a single 'owner' at a time. Unique types\
9-
include scalars, vectors, strings, and records, tags,\
10-
tuples and unique boxes (~T) thereof. Most notably,\
11-
shared boxes (@T) may not be transmitted across channels.\
12-
Example:\
13-
let p = comm::port();\
14-
task::spawn(comm::chan(p), fn (c: chan<str>) {\
15-
comm::send(c, \"Hello, World\");\
16-
});\
3+
desc = "Communication between tasks is facilitated by ports (in the \
4+
receiving task), and channels (in the sending task). Any \
5+
number of channels may feed into a single port. \
6+
Ports and channels may only transmit values of unique \
7+
types; that is, values that are statically guaranteed to \
8+
be accessed by a single 'owner' at a time. Unique types \
9+
include scalars, vectors, strings, and records, tags, \
10+
tuples and unique boxes (~T) thereof. Most notably, \
11+
shared boxes (@T) may not be transmitted across channels. \
12+
Example: \
13+
let p = comm::port(); \
14+
task::spawn(comm::chan(p), fn (c: chan&lt;str>) { \
15+
comm::send(c, \"Hello, World\"); \
16+
}); \
1717
io::println(comm::recv(p));"
1818
)];
1919

@@ -82,18 +82,18 @@ resource port_ptr<T: send>(po: *rustrt::rust_port) {
8282
}
8383

8484
#[doc(
85-
brief = "A communication endpoint that can receive messages.\
85+
brief = "A communication endpoint that can receive messages. \
8686
Ports receive messages from channels.",
87-
desc = "Each port has a unique per-task identity and may not\
88-
be replicated or transmitted. If a port value is\
89-
copied, both copies refer to the same port.\
87+
desc = "Each port has a unique per-task identity and may not \
88+
be replicated or transmitted. If a port value is \
89+
copied, both copies refer to the same port. \
9090
Ports may be associated with multiple &lt;chan>s."
9191
)]
9292
tag port<T: send> { port_t(@port_ptr<T>); }
9393

9494
#[doc(
95-
brief = "Sends data over a channel. The sent data is moved\
96-
into the channel, whereupon the caller loses\
95+
brief = "Sends data over a channel. The sent data is moved \
96+
into the channel, whereupon the caller loses \
9797
access to it."
9898
)]
9999
fn send<T: send>(ch: chan<T>, -data: T) {
@@ -114,8 +114,8 @@ fn port<T: send>() -> port<T> {
114114
}
115115

116116
#[doc(
117-
brief = "Receive from a port.\
118-
If no data is available on the port then the task will\
117+
brief = "Receive from a port. \
118+
If no data is available on the port then the task will \
119119
block until data becomes available."
120120
)]
121121
fn recv<T: send>(p: port<T>) -> T { recv_(***p) }

src/libcore/ctypes.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,24 @@ type ulong = uint;
5252
type ulonglong = u64;
5353

5454
#[doc(
55-
brief = "A signed integer with the same size as a pointer.\
56-
This is guaranteed to always be the same type as a\
55+
brief = "A signed integer with the same size as a pointer. \
56+
This is guaranteed to always be the same type as a \
5757
Rust `int`."
5858
)]
5959
type intptr_t = uint; // FIXME: int
6060

6161
#[doc(
62-
brief = "An unsigned integer with the same size as a pointer.\
63-
This is guaranteed to always be the same type as a Rust\
62+
brief = "An unsigned integer with the same size as a pointer. \
63+
This is guaranteed to always be the same type as a Rust \
6464
`uint`."
6565
)]
6666
type uintptr_t = uint;
6767
type uint32_t = u32;
6868

6969
#[doc(
7070
brief = "A type, a pointer to which can be used as C `void *`.",
71-
desc = "The void type cannot be constructed or destructured,\
72-
but using pointers to this type when interoperating\
71+
desc = "The void type cannot be constructed or destructured, \
72+
but using pointers to this type when interoperating \
7373
with C void pointers can help in documentation."
7474
)]
7575
tag void {
@@ -116,8 +116,8 @@ type fd_t = i32; // not actually a C type, but should be.
116116
type pid_t = i32;
117117

118118
#[doc(
119-
brief = "An unsigned integer with the same size as a C enum.\
120-
enum is implementation-defined, but is 32-bits in\
119+
brief = "An unsigned integer with the same size as a C enum. \
120+
enum is implementation-defined, but is 32-bits in \
121121
practice"
122122
)]
123123
type enum = u32;

0 commit comments

Comments
 (0)