Skip to content

Commit 60c4e38

Browse files
authored
Merge pull request #1860 from ehuss/fix-headings
Fix inconsistent heading depth
2 parents 05f25cd + dfc9a06 commit 60c4e38

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/behavior-considered-undefined.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
r[undefined]
2-
## Behavior considered undefined
2+
# Behavior considered undefined
33

44
r[undefined.general]
55
Rust code is incorrect if it exhibits any of the behaviors in the following
@@ -92,12 +92,12 @@ r[undefined.runtime]
9292
> Undefined behavior affects the entire program. For example, calling a function in C that exhibits undefined behavior of C means your entire program contains undefined behaviour that can also affect the Rust code. And vice versa, undefined behavior in Rust can cause adverse affects on code executed by any FFI calls to other languages.
9393
9494
r[undefined.pointed-to]
95-
### Pointed-to bytes
95+
## Pointed-to bytes
9696

9797
The span of bytes a pointer or reference "points to" is determined by the pointer value and the size of the pointee type (using `size_of_val`).
9898

9999
r[undefined.misaligned]
100-
### Places based on misaligned pointers
100+
## Places based on misaligned pointers
101101
[based on a misaligned pointer]: #places-based-on-misaligned-pointers
102102

103103
r[undefined.misaligned.general]
@@ -137,7 +137,7 @@ that being based on an aligned pointer is always sufficient to ensure that the
137137
new reference is aligned, but it is not always necessary.
138138

139139
r[undefined.dangling]
140-
### Dangling pointers
140+
## Dangling pointers
141141
[dangling]: #dangling-pointers
142142

143143
r[undefined.dangling.general]
@@ -159,7 +159,7 @@ must never exceed `isize::MAX`, since it is impossible for a single allocation
159159
to be larger than `isize::MAX`.
160160

161161
r[undefined.validity]
162-
### Invalid values
162+
## Invalid values
163163
[invalid-values]: #invalid-values
164164

165165
r[undefined.validity.general]

src/behavior-not-considered-unsafe.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
## Behavior not considered `unsafe`
1+
# Behavior not considered `unsafe`
22

33
The Rust compiler does not consider the following behaviors _unsafe_,
44
though a programmer may (should) find them undesirable, unexpected,
55
or erroneous.
66

7-
##### Deadlocks
8-
##### Leaks of memory and other resources
9-
##### Exiting without calling destructors
10-
##### Exposing randomized base addresses through pointer leaks
11-
##### Integer overflow
7+
- Deadlocks
8+
- Leaks of memory and other resources
9+
- Exiting without calling destructors
10+
- Exposing randomized base addresses through pointer leaks
11+
12+
## Integer overflow
1213

1314
If a program contains arithmetic overflow, the programmer has made an
1415
error. In the following discussion, we maintain a distinction between
@@ -36,7 +37,7 @@ semantics.
3637
See [RFC 560] for error conditions, rationale, and more details about
3738
integer overflow.
3839

39-
##### Logic errors
40+
## Logic errors
4041

4142
Safe code may impose extra logical constraints that can be checked
4243
at neither compile-time nor runtime. If a program breaks such

src/expressions/range-expr.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
r[expr.range]
32
# Range expressions
43

src/procedural-macros.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
r[macro.proc]
2-
## Procedural Macros
2+
# Procedural Macros
33

44
r[macro.proc.intro]
55
*Procedural macros* allow creating syntax extensions as execution of a function.
@@ -43,7 +43,7 @@ Procedural macros have two ways of reporting errors. The first is to panic. The
4343
second is to emit a [`compile_error`] macro invocation.
4444
4545
r[macro.proc.proc_macro]
46-
### The `proc_macro` crate
46+
## The `proc_macro` crate
4747
4848
r[macro.proc.proc_macro.intro]
4949
Procedural macro crates almost always will link to the compiler-provided
@@ -67,7 +67,7 @@ cannot modify a `Span` itself, you can always change the `Span` *associated*
6767
with any token, such as through getting a `Span` from another token.
6868
6969
r[macro.proc.hygiene]
70-
### Procedural macro hygiene
70+
## Procedural macro hygiene
7171
7272
Procedural macros are *unhygienic*. This means they behave as if the output
7373
token stream was simply written inline to the code it's next to. This means that
@@ -80,7 +80,7 @@ by ensuring that generated functions have names that are unlikely to clash with
8080
other functions (like `__internal_foo` instead of `foo`).
8181
8282
r[macro.proc.function]
83-
### Function-like procedural macros
83+
## Function-like procedural macros
8484
8585
r[macro.proc.function.intro]
8686
*Function-like procedural macros* are procedural macros that are invoked using
@@ -131,7 +131,7 @@ expressions], [item] positions, including items in [`extern` blocks], inherent
131131
and trait [implementations], and [trait definitions].
132132

133133
r[macro.proc.derive]
134-
### Derive macros
134+
## Derive macros
135135

136136
r[macro.proc.derive.intro]
137137
*Derive macros* define new inputs for the [`derive` attribute]. These macros
@@ -182,7 +182,7 @@ fn main() {
182182
```
183183

184184
r[macro.proc.derive.attributes]
185-
#### Derive macro helper attributes
185+
### Derive macro helper attributes
186186

187187
r[macro.proc.derive.attributes.intro]
188188
Derive macros can add additional [attributes] into the scope of the [item]
@@ -221,7 +221,7 @@ struct Struct {
221221
```
222222

223223
r[macro.proc.attribute]
224-
### Attribute macros
224+
## Attribute macros
225225

226226
r[macro.proc.attribute.intro]
227227
*Attribute macros* define new [outer attributes][attributes] which can be
@@ -307,7 +307,7 @@ fn invoke4() {}
307307
```
308308

309309
r[macro.proc.token]
310-
### Declarative macro tokens and procedural macro tokens
310+
## Declarative macro tokens and procedural macro tokens
311311

312312
r[macro.proc.token.intro]
313313
Declarative `macro_rules` macros and procedural macros use similar, but

0 commit comments

Comments
 (0)