pull/19/merge
oberien 8 years ago committed by GitHub
commit 0597ea27b4

@ -25,7 +25,7 @@ fn main() {
}
```
If we try to naively desugar this code in the same way that we did in the
If we try to naïvely desugar this code in the same way that we did in the
lifetimes section, we run into some trouble:
```rust,ignore

@ -59,7 +59,7 @@ data.push(4);
println!("{}", x);
```
naive scope analysis would be insufficient to prevent this bug, because `data`
naïve scope analysis would be insufficient to prevent this bug, because `data`
does in fact live as long as we needed. However it was *changed* while we had
a reference into it. This is why Rust requires any references to freeze the
referent and its owners.

@ -113,7 +113,7 @@ requires different monomorphizations to have *different field orderings*.
**Note: this is a hypothetical optimization that is not yet implemented in Rust
1.0**
Enums make this consideration even more complicated. Naively, an enum such as:
Enums make this consideration even more complicated. Naïvely, an enum such as:
```rust
enum Foo {

@ -4,7 +4,7 @@ First off, we need to come up with the struct layout. A Vec has three parts:
a pointer to the allocation, the size of the allocation, and the number of
elements that have been initialized.
Naively, this means we just want this design:
Naïvely, this means we just want this design:
```rust
pub struct Vec<T> {

@ -13,7 +13,7 @@ many intrinsics *do* become stabilized elsewhere (`std::ptr` and `str::mem`
consist of many intrinsics).
Ultimately this means our implementation may not take advantage of all
possible optimizations, though it will be by no means *naive*. We will
possible optimizations, though it will be by no means *naïve*. We will
definitely get into the weeds over nitty-gritty details, even
when the problem doesn't *really* merit it.

Loading…
Cancel
Save