Skip to content

Commit 7984074

Browse files
author
Nick Hamann
committed
Convert #[lang=".."] to #[lang = ".."] for docs too.
1 parent a1898f8 commit 7984074

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/doc/reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ makes it possible to declare these operations. For example, the `str` module
20282028
in the Rust standard library defines the string equality function:
20292029

20302030
```{.ignore}
2031-
#[lang="str_eq"]
2031+
#[lang = "str_eq"]
20322032
pub fn eq_slice(a: &str, b: &str) -> bool {
20332033
// details elided
20342034
}

src/doc/trpl/lang-items.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The `rustc` compiler has certain pluggable operations, that is,
88
functionality that isn't hard-coded into the language, but is
99
implemented in libraries, with a special marker to tell the compiler
10-
it exists. The marker is the attribute `#[lang="..."]` and there are
10+
it exists. The marker is the attribute `#[lang = "..."]` and there are
1111
various different values of `...`, i.e. various different 'lang
1212
items'.
1313

@@ -28,7 +28,7 @@ extern {
2828
#[lang = "owned_box"]
2929
pub struct Box<T>(*mut T);
3030
31-
#[lang="exchange_malloc"]
31+
#[lang = "exchange_malloc"]
3232
unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
3333
let p = libc::malloc(size as libc::size_t) as *mut u8;
3434
@@ -39,7 +39,7 @@ unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
3939
4040
p
4141
}
42-
#[lang="exchange_free"]
42+
#[lang = "exchange_free"]
4343
unsafe fn deallocate(ptr: *mut u8, _size: usize, _align: usize) {
4444
libc::free(ptr as *mut libc::c_void)
4545
}

0 commit comments

Comments
 (0)