Skip to content

Commit 281f3a4

Browse files
committed
Remove "optimization hints" section
I didn't feel like this section was pulling its weight. It also wasn't entirely correct.
1 parent e8b19f2 commit 281f3a4

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/attributes/codegen.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@ r[attributes.codegen]
33

44
The following [attributes] are used for controlling code generation.
55

6-
r[attributes.codegen.hint]
7-
## Optimization hints
8-
9-
r[attributes.codegen.hint.cold-inline]
10-
The `cold` and `inline` [attributes] give suggestions to generate code in a way that may be faster than what it would do without the hint. The attributes are only hints, and may be ignored.
11-
12-
r[attributes.codegen.hint.usage]
13-
Both attributes can be used on [functions]. When applied to a function in a [trait], they apply only to that function when used as a default function for a trait implementation and not to all trait implementations. The attributes have no effect on a trait function without a body.
14-
156
r[attributes.codegen.inline]
167
### The `inline` attribute
178

src/items/functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,15 @@ The attributes that have meaning on a function are:
421421

422422
- [`cfg_attr`]
423423
- [`cfg`]
424+
- [`cold`]
424425
- [`deprecated`]
425426
- [`doc`]
426427
- [`export_name`]
428+
- [`inline`]
427429
- [`link_section`]
428430
- [`must_use`]
429431
- [`no_mangle`]
430432
- [Lint check attributes]
431-
- [Optimization hint attributes]
432433
- [Procedural macro attributes]
433434
- [Testing attributes]
434435

@@ -483,7 +484,8 @@ fn foo_oof(#[some_inert_attribute] arg: u8) {
483484
[lint check attributes]: ../attributes/diagnostics.md#lint-check-attributes
484485
[procedural macro attributes]: ../procedural-macros.md#attribute-macros
485486
[testing attributes]: ../attributes/testing.md
486-
[optimization hint attributes]: ../attributes/codegen.md#optimization-hints
487+
[`cold`]: ../attributes/codegen.md#the-cold-attribute
488+
[`inline`]: ../attributes/codegen.md#the-inline-attribute
487489
[`deprecated`]: ../attributes/diagnostics.md#the-deprecated-attribute
488490
[`doc`]: ../../rustdoc/the-doc-attribute.html
489491
[`must_use`]: ../attributes/diagnostics.md#the-must_use-attribute

0 commit comments

Comments
 (0)