Skip to content

Commit 4afd2ba

Browse files
committed
---
yaml --- r: 236033 b: refs/heads/stable c: 8e75c50 h: refs/heads/master i: 236031: fc5c0b8 v: v3
1 parent 780ecbc commit 4afd2ba

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 9997a6eb270041c1479a4b0e42c987344c1ceee4
32+
refs/heads/stable: 8e75c50729b6c0e4a88cdd2ab3a4a242412fda5d
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct Foo<u32, u16> {
8888
}
8989
```
9090

91-
The former case quite simply wastes space. An optimal use of space therefore requires
91+
The latter case quite simply wastes space. An optimal use of space therefore requires
9292
different monomorphizations to *have different field orderings*.
9393

9494
**Note: this is a hypothetical optimization that is not yet implemented in Rust 1.0.0**

branches/stable/lifetimes.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ Of course, it might be bounded by the *wrong* lifetime, but this will usually
247247
just cause a compiler error, rather than allow memory safety to be trivially
248248
violated.
249249

250-
Within a function, bounding lifetimes is more error-prone. The safest route
251-
is to just use a small function to ensure the lifetime is bound. However if
252-
this is unacceptable, the reference can be placed in a location with a specific
253-
lifetime. Unfortunately it's impossible to name all lifetimes involved in a
254-
function. To get around this, you can in principle use `copy_lifetime`, though
250+
Within a function, bounding lifetimes is more error-prone. The safest and easiest
251+
way to bound a lifetime is to return it from a function with a bound lifetime.
252+
However if this is unacceptable, the reference can be placed in a location with
253+
a specific lifetime. Unfortunately it's impossible to name all lifetimes involved
254+
in a function. To get around this, you can in principle use `copy_lifetime`, though
255255
these are unstable due to their awkward nature and questionable utility.
256256

257257

@@ -425,7 +425,7 @@ must be invariant to avoid lifetime smuggling.
425425

426426
`Fn` is the most confusing case, largely because contravariance is easily the
427427
most confusing kind of variance, and basically never comes up. To understand it,
428-
consider a function that *takes* a function `len` that takes a function `F`.
428+
consider a function `len` that takes a function `F`.
429429

430430
```rust
431431
fn len<F>(func: F) -> usize
@@ -435,8 +435,8 @@ fn len<F>(func: F) -> usize
435435
}
436436
```
437437

438-
We require that F is a Fn that can take an `&'static str` and print a usize. Now
439-
say we have a function that can take an `&'a str` (for *some* 'a). Such a function actually
438+
We require that F is a Fn that can take an `&'static str` and returns a usize. Now
439+
say we have a function that can take an `&'a str` (for *some* `'a`). Such a function actually
440440
accepts *more* inputs, since `&'static str` is a subtype of `&'a str`. Therefore
441441
`len` should happily accept such a function!
442442

@@ -643,8 +643,8 @@ trait Iterator {
643643
Given this definition, Self::Item has *no* connection to `self`. This means
644644
that we can call `next` several times in a row, and hold onto all the results
645645
*concurrently*. This is perfectly fine for by-value iterators, which have exactly
646-
these semantics. It's also actually fine for shared references, as it's perfectly
647-
fine to grab a huge pile of shared references to the same thing (although the
646+
these semantics. It's also actually fine for shared references, as they admit
647+
arbitrarily many references to the same thing (although the
648648
iterator needs to be a separate object from the thing being shared). But mutable
649649
references make this a mess. At first glance, they might seem completely
650650
incompatible with this API, as it would produce multiple mutable references to

0 commit comments

Comments
 (0)