Skip to content

Commit e10129a

Browse files
committed
Fix style issues from CI
1 parent d10ef05 commit e10129a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/abi.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ r[abi.compatibility.integer]
2222
Two [integer types] are *abi compatible* if they have the same size and the same signednes
2323

2424
> [!NOTE]
25-
> In particular, `usize` is *abi compatible* with `uN`, and `isize` is *abi compatible* with `iN` where `N` is the target_pointer_width.
25+
> In particular, `usize` is *abi compatible* with `uN`, and `isize` is *abi compatible* with `iN` where `N` is the target_pointer_width.
2626
> Two integer types with different signedness, such as `u8` and `i8` are not *abi compatible*.
2727
2828
```rust
@@ -44,7 +44,7 @@ fn main(){
4444
```
4545

4646
r[abi.compatibility.char]
47-
The type [`char`] is *abi compatible* with the type [`u32`][integer types].
47+
The type [`char`] is *abi compatible* with the type [`u32`][integer types].
4848

4949
```rust
5050
fn foo(x: char) -> u32{
@@ -60,17 +60,17 @@ fn main(){
6060
```
6161

6262
r[abi.compatibility.pointer]
63-
Two [pointer types], `*mut T` and `*const U`, are *abi compatible* if the *metadata type*s of `T` and `U` are the same type.
63+
Two [pointer types], `*mut T` and `*const U`, are *abi compatible* if the *metadata type*s of `T` and `U` are the same type.
6464

6565
> [!NOTE]
66-
> [`core::marker::Sized`] types have a *metadata type* of `()`.
66+
> [`core::marker::Sized`] types have a *metadata type* of `()`.
6767
6868
> [!NOTE]
6969
> With transitivity, this applies regardless of the mutability of either pointer type
7070
7171
```rust
7272
unsafe fn foo(x: *mut i32){
73-
unsafe{x.write(5);}
73+
unsafe{x.write(5);}
7474
}
7575

7676
fn main(){
@@ -90,7 +90,7 @@ The types [`&T`], [`&mut T`], [`alloc::boxed::Box<T>`], and [`core::ptr::NonNull
9090
9191
```rust
9292
fn foo(x: &mut i32){
93-
*x = 5;
93+
*x = 5;
9494
}
9595

9696
fn main(){
@@ -198,12 +198,12 @@ static FOO: u32 = 0;
198198
```
199199

200200
r[abi.used.application]
201-
A `static` item with the `used` attribute is an *exported item*.
201+
A `static` item with the `used` attribute is an *exported item*.
202202

203203
> [!NOTE]
204204
> *exported items* will generally appear in the output when linking a library crate, and will generally be available when linking a binary crate as a global symbol.
205205
> The `used` attribute does not give the `static` item a *linkage name*, and thus does not disable name mangling. It may be used to place data into a given section that is referenced by the linker via the input section, without regard to the name of the symbol.
206-
> Due to toolchain limitations, it is not guaranteed that a `#[used]` static will appear in the final output when linking a binary, or when linking an rlib/staticlib crate into a `dylib` or `cdylib`.
206+
> Due to toolchain limitations, it is not guaranteed that a `#[used]` static will appear in the final output when linking a binary, or when linking an rlib/staticlib crate into a `dylib` or `cdylib`.
207207
208208
``` rust
209209
// foo.rs
@@ -245,7 +245,7 @@ $ nm -C foo.o
245245
0000000000000000 T foo::quux
246246
```
247247

248-
## Symbol naming
248+
## Symbol naming
249249

250250
r[abi.symbol-name]
251251

@@ -255,7 +255,7 @@ MetaItemExportName := "export_name" "=" ([STRING_LITERAL] | [RAW_STRING_LITERAL]
255255
```
256256

257257
r[abi.symbol-name.names]
258-
The *`no_mangle` attribute* and the *`export_name` attribute* shall only be applied to a `static` or `fn` item. The *`export_name` attribute* shall not be applied to an item declared within an [`extern` block].
258+
The *`no_mangle` attribute* and the *`export_name` attribute* shall only be applied to a `static` or `fn` item. The *`export_name` attribute* shall not be applied to an item declared within an [`extern` block].
259259

260260
```rust
261261
#[no_mangle]
@@ -304,7 +304,7 @@ fn main() {
304304
```
305305

306306
r[abi.symbol-name.export_name]
307-
The *`export_name` attribute* may be specified as a built-in attribute, using the [_MetaNameValueStr_] syntax. The *export name* of an item with the *`no_mangle` attribute* is the content of `STRING_LITERAL`.
307+
The *`export_name` attribute* may be specified as a built-in attribute, using the [_MetaNameValueStr_] syntax. The *export name* of an item with the *`no_mangle` attribute* is the content of `STRING_LITERAL`.
308308

309309
```rust
310310
extern "C" {
@@ -341,7 +341,7 @@ MetaItemLinkSection := "link_section" "=" ([STRING_LITERAL] | [RAW_STRING_LITERA
341341
```
342342

343343
r[abi.link_section.syntax]
344-
The *`link_section` attribute* may be specified as a built-in attribute, using the [_MetaNameValueStr_] syntax.
344+
The *`link_section` attribute* may be specified as a built-in attribute, using the [_MetaNameValueStr_] syntax.
345345

346346
r[abi.link_section.application]
347347
The *`link_section` attribute* shall be applied to a `static` or `fn` item.
@@ -374,7 +374,7 @@ pub static VAR1: u32 = 1;
374374
> * `.bss`: Readable and Writable - Uninitialized data,
375375
> * `.tdata`: Readable and Writable - Thread-local,
376376
> * `.tbss`: Readable and Writable - Uninitialized and Thread-local.
377-
>
377+
>
378378
> This is not an exhaustive list, and generally extended versions of these section names such as `.text.foo`, are also defined with the same properties as the base section.
379379
380380

0 commit comments

Comments
 (0)