mirror of
https://github.com/Noratrieb/website.git
synced 2026-01-16 09:55:02 +01:00
parent
d57e076267
commit
97b2f2c4be
2 changed files with 37 additions and 2 deletions
|
|
@ -584,6 +584,41 @@ fn main() { math::add() }
|
|||
- annoying to set up
|
||||
</textarea>
|
||||
</section>
|
||||
<section data-markdown>
|
||||
<textarea data-template>
|
||||
## inlining across codegen units in the same crate
|
||||
|
||||
- ThinLTO across different codegen units by default
|
||||
</textarea>
|
||||
</section>
|
||||
<section data-markdown>
|
||||
<textarea data-template>
|
||||
## `Cargo.toml` config
|
||||
|
||||
```toml
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
codegen-units = 1
|
||||
```
|
||||
</textarea>
|
||||
</section>
|
||||
<section data-markdown>
|
||||
<textarea data-template>
|
||||
## and why did `#[inline]` make the error go away?
|
||||
|
||||
```rust
|
||||
pub fn error() {
|
||||
// vvvvvvvvvvv post-mono error!
|
||||
let _x: [u8; usize::MAX] = [0; usize::MAX];
|
||||
}
|
||||
```
|
||||
</textarea>
|
||||
</section>
|
||||
<section data-markdown>
|
||||
<textarea data-template>
|
||||
## happy compiling
|
||||
</textarea>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue