Skip to content

Commit 43e4117

Browse files
committed
align code blocks with their paragraphs
1 parent a6c35fc commit 43e4117

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/asm.md

+23-21
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ through all of the compiler layers down to LLVM codegen. Throughout the various
1010

1111
- The template string, which is stored as an array of `InlineAsmTemplatePiece`. Each piece
1212
represents either a literal or a placeholder for an operand (just like format strings).
13-
```rust
14-
pub enum InlineAsmTemplatePiece {
15-
String(String),
16-
Placeholder { operand_idx: usize, modifier: Option<char>, span: Span },
17-
}
18-
```
13+
14+
```rust
15+
pub enum InlineAsmTemplatePiece {
16+
String(String),
17+
Placeholder { operand_idx: usize, modifier: Option<char>, span: Span },
18+
}
19+
```
1920

2021
- The list of operands to the `asm!` (`in`, `[late]out`, `in[late]out`, `sym`, `const`). These are
2122
represented differently at each stage of lowering, but follow a common pattern:
@@ -34,21 +35,22 @@ or a `fn`.
3435
- The options set at the end of the `asm!` macro. The only ones that are of particular interest to
3536
rustc are `NORETURN` which makes `asm!` return `!` instead of `()`, and `RAW` which disables format
3637
string parsing. The remaining options are mostly passed through to LLVM with little processing.
37-
```rust
38-
bitflags::bitflags! {
39-
pub struct InlineAsmOptions: u16 {
40-
const PURE = 1 << 0;
41-
const NOMEM = 1 << 1;
42-
const READONLY = 1 << 2;
43-
const PRESERVES_FLAGS = 1 << 3;
44-
const NORETURN = 1 << 4;
45-
const NOSTACK = 1 << 5;
46-
const ATT_SYNTAX = 1 << 6;
47-
const RAW = 1 << 7;
48-
const MAY_UNWIND = 1 << 8;
49-
}
50-
}
51-
```
38+
39+
```rust
40+
bitflags::bitflags! {
41+
pub struct InlineAsmOptions: u16 {
42+
const PURE = 1 << 0;
43+
const NOMEM = 1 << 1;
44+
const READONLY = 1 << 2;
45+
const PRESERVES_FLAGS = 1 << 3;
46+
const NORETURN = 1 << 4;
47+
const NOSTACK = 1 << 5;
48+
const ATT_SYNTAX = 1 << 6;
49+
const RAW = 1 << 7;
50+
const MAY_UNWIND = 1 << 8;
51+
}
52+
}
53+
```
5254

5355
## AST
5456

0 commit comments

Comments
 (0)