Skip to content

Commit a2bec71

Browse files
authored
Merge pull request #662 from albertlarsan68/patch-1
Fix a typo in src/libs/maintining-std.md
2 parents f014306 + fa22bb7 commit a2bec71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libs/maintaining-std.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The rules around what's sound and what's not can be subtle. See the [Unsafe Code
4848

4949
Inlining is a trade-off between potential execution speed, compile time and code size. There's some discussion about it in [this PR to the `hashbrown` crate][hashbrown/pull/119]. From the thread:
5050

51-
> `#[inline]` is very different than simply just an inline hint. As I mentioned before, there's no equivalent in C++ for what `#[inline]` does. In debug mode rustc basically ignores `#[inline]`, pretending you didn't even write it. In release mode the compiler will, by default, codegen an `#[inline]` function into every single referencing codegen unit, and then it will also add `inlinehin`t. This means that if you have 16 CGUs and they all reference an item, every single one is getting the entire item's implementation inlined into it.
51+
> `#[inline]` is very different than simply just an inline hint. As I mentioned before, there's no equivalent in C++ for what `#[inline]` does. In debug mode rustc basically ignores `#[inline]`, pretending you didn't even write it. In release mode the compiler will, by default, codegen an `#[inline]` function into every single referencing codegen unit, and then it will also add `inlinehint`. This means that if you have 16 CGUs and they all reference an item, every single one is getting the entire item's implementation inlined into it.
5252
5353
You can add `#[inline]`:
5454

0 commit comments

Comments
 (0)