Skip to content

Commit d5ef9f9

Browse files
committed
formatting fixes
1 parent d078252 commit d5ef9f9

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

src/doc/unstable-book/src/language-features/optin-builtin-traits.md

+17-19
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,42 @@ The tracking issue for this feature is [#13231]
66

77
----
88

9-
The `optin_builtin_traits` feature gate allows you to define _auto traits_.
9+
The `optin_builtin_traits` feature gate allows you to define auto traits.
1010

1111
Auto traits, like [`Send`] or [`Sync`] in the standard library, are marker traits
1212
that are automatically implemented for every type, unless the type, or a type it contains,
13-
has explictly opted out via a _negative impl_.
13+
has explictly opted out via a negative impl.
1414

1515
[`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html
1616
[`Sync`]: https://doc.rust-lang.org/std/marker/trait.Sync.html
1717

18-
```rust, ignore
18+
```rust,ignore
1919
impl !Type for Trait
2020
```
2121

2222
Example:
2323

2424
```rust
25-
#![feature(optin_builtin_traits)]
25+
#![feature(optin_builtin_traits)]
2626

27-
trait Valid {}
27+
trait Valid {}
2828

29-
impl Valid for .. {}
29+
impl Valid for .. {}
3030

31-
struct True;
32-
struct False;
31+
struct True;
32+
struct False;
3333

34-
impl !Valid for False {}
34+
impl !Valid for False {}
3535

36-
struct MaybeValid<T>(T);
36+
struct MaybeValid<T>(T);
3737

38-
fn must_be_valid<T: Valid>(_t: T) {
38+
fn must_be_valid<T: Valid>(_t: T) { }
3939

40-
}
41-
42-
fn main() {
43-
//works
44-
must_be_valid( MaybeValid(True) );
40+
fn main() {
41+
// works
42+
must_be_valid( MaybeValid(True) );
4543

46-
// compiler error - trait bound not satisfied
47-
// must_be_valid( MaybeValid(False) );
48-
}
44+
// compiler error - trait bound not satisfied
45+
// must_be_valid( MaybeValid(False) );
46+
}
4947
```

src/doc/unstable-book/src/language-features/unboxed-closures.md

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

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

5-
See Also: [`fn_traits`](library-features/fn-traits.md)
5+
See Also: [`fn_traits`](library-features/fn-traits.html)
66

77
[#29625]: https://github.com/rust-lang/rust/issues/29625
88

@@ -17,7 +17,7 @@ exactly one (non self) argument, a tuple representing the argument list.
1717
```rust
1818
#![feature(unboxed_closures)]
1919

20-
extern "rust-call" fn add_args(args: (u32, u32)) {
20+
extern "rust-call" fn add_args(args: (u32, u32)) -> u32 {
2121
args.0 + args.1
2222
}
2323

src/doc/unstable-book/src/library-features/fn-traits.md

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

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

5-
See Also: [`unboxed_closures`](language-features/unboxed_closures.md)
5+
See Also: [`unboxed_closures`](language-features/unboxed-closures.html)
66

77
[#29625]: https://github.com/rust-lang/rust/issues/29625
88

0 commit comments

Comments
 (0)