Skip to content

Commit 48700be

Browse files
committed
Auto merge of #30445 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30370, #30404, #30415, #30419, #30428, #30437, #30439, #30441, #30442, #30443 - Failed merges:
2 parents 6734dcc + 7ad8fb9 commit 48700be

File tree

10 files changed

+31
-44
lines changed

10 files changed

+31
-44
lines changed

src/doc/book/the-stack-and-the-heap.md

+22-20
Original file line numberDiff line numberDiff line change
@@ -130,63 +130,64 @@ on the stack is the first one you retrieve from it.
130130
Let’s try a three-deep example:
131131

132132
```rust
133-
fn bar() {
133+
fn italic() {
134134
let i = 6;
135135
}
136136

137-
fn foo() {
137+
fn bold() {
138138
let a = 5;
139139
let b = 100;
140140
let c = 1;
141141

142-
bar();
142+
italic();
143143
}
144144

145145
fn main() {
146146
let x = 42;
147147

148-
foo();
148+
bold();
149149
}
150150
```
151151

152+
We have some kooky function names to make the diagrams clearer.
153+
152154
Okay, first, we call `main()`:
153155

154156
| Address | Name | Value |
155157
|---------|------|-------|
156158
| 0 | x | 42 |
157159

158-
Next up, `main()` calls `foo()`:
160+
Next up, `main()` calls `bold()`:
159161

160162
| Address | Name | Value |
161163
|---------|------|-------|
162-
| 3 | c | 1 |
163-
| 2 | b | 100 |
164-
| 1 | a | 5 |
164+
| **3** | **c**|**1** |
165+
| **2** | **b**|**100**|
166+
| **1** | **a**| **5** |
165167
| 0 | x | 42 |
166168

167-
And then `foo()` calls `bar()`:
169+
And then `bold()` calls `italic()`:
168170

169171
| Address | Name | Value |
170172
|---------|------|-------|
171-
| 4 | i | 6 |
172-
| 3 | c | 1 |
173-
| 2 | b | 100 |
174-
| 1 | a | 5 |
173+
| *4* | *i* | *6* |
174+
| **3** | **c**|**1** |
175+
| **2** | **b**|**100**|
176+
| **1** | **a**| **5** |
175177
| 0 | x | 42 |
176-
177178
Whew! Our stack is growing tall.
178179

179-
After `bar()` is over, its frame is deallocated, leaving just `foo()` and
180+
After `italic()` is over, its frame is deallocated, leaving just `bold()` and
180181
`main()`:
181182

182183
| Address | Name | Value |
183184
|---------|------|-------|
184-
| 3 | c | 1 |
185-
| 2 | b | 100 |
186-
| 1 | a | 5 |
187-
| 0 | x | 42 |
185+
| **3** | **c**|**1** |
186+
| **2** | **b**|**100**|
187+
| **1** | **a**| **5** |
188+
| 0 | x | 42 |
188189

189-
And then `foo()` ends, leaving just `main()`:
190+
And then `bold()` ends, leaving just `main()`:
190191

191192
| Address | Name | Value |
192193
|---------|------|-------|
@@ -578,3 +579,4 @@ comes at the cost of either significant runtime support (e.g. in the form of a
578579
garbage collector) or significant programmer effort (in the form of explicit
579580
memory management calls that require verification not provided by the Rust
580581
compiler).
582+

src/doc/nomicon/lifetimes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ This signature of `as_str` takes a reference to a u32 with *some* lifetime, and
107107
promises that it can produce a reference to a str that can live *just as long*.
108108
Already we can see why this signature might be trouble. That basically implies
109109
that we're going to find a str somewhere in the scope the reference
110-
to the u32 originated in, or somewhere *even earlier*. That's a bit of a big
111-
ask.
110+
to the u32 originated in, or somewhere *even earlier*. That's a bit of a tall
111+
order.
112112

113113
We then proceed to compute the string `s`, and return a reference to it. Since
114114
the contract of our function says the reference must outlive `'a`, that's the

src/libcollections/slice.rs

-9
Original file line numberDiff line numberDiff line change
@@ -909,15 +909,6 @@ pub trait SliceConcatExt<T: ?Sized> {
909909
#[stable(feature = "rename_connect_to_join", since = "1.3.0")]
910910
fn join(&self, sep: &T) -> Self::Output;
911911

912-
/// Flattens a slice of `T` into a single value `Self::Output`, placing a
913-
/// given separator between each.
914-
///
915-
/// # Examples
916-
///
917-
/// ```
918-
/// # #![allow(deprecated)]
919-
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
920-
/// ```
921912
#[stable(feature = "rust1", since = "1.0.0")]
922913
#[rustc_deprecated(since = "1.3.0", reason = "renamed to join")]
923914
fn connect(&self, sep: &T) -> Self::Output;

src/libcore/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
//! nor does it provide concurrency or I/O. These things require
2424
//! platform integration, and this library is platform-agnostic.
2525
//!
26-
//! *It is not recommended to use the core library*. The stable
27-
//! functionality of libcore is reexported from the
28-
//! [standard library](../std/index.html). The composition of this library is
29-
//! subject to change over time; only the interface exposed through libstd is
30-
//! intended to be stable.
31-
//!
3226
//! # How to use the core library
3327
//!
3428
// FIXME: Fill me in with more detail when the interface settles

src/libcore/num/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ macro_rules! int_impl {
644644
self.overflowing_shl(rhs).0
645645
}
646646

647-
/// Panic-free bitwise shift-left; yields `self >> mask(rhs)`,
647+
/// Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
648648
/// where `mask` removes any high-order bits of `rhs` that
649649
/// would cause the shift to exceed the bitwidth of the type.
650650
///
@@ -1446,7 +1446,7 @@ macro_rules! uint_impl {
14461446
self.overflowing_shl(rhs).0
14471447
}
14481448

1449-
/// Panic-free bitwise shift-left; yields `self >> mask(rhs)`,
1449+
/// Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
14501450
/// where `mask` removes any high-order bits of `rhs` that
14511451
/// would cause the shift to exceed the bitwidth of the type.
14521452
///

src/libcore/ops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeTo<Idx> {
16161616
}
16171617

16181618
/// The `Deref` trait is used to specify the functionality of dereferencing
1619-
/// operations like `*v`.
1619+
/// operations, like `*v`.
16201620
///
16211621
/// `Deref` also enables ['`Deref` coercions'][coercions].
16221622
///

src/librustc/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ explanatory comments for the same example:
13371337
13381338
// `for`-loops use a protocol based on the `Iterator`
13391339
// trait. Each item yielded in a `for` loop has the
1340-
// type `Iterator::Item` -- that is,I `Item` is the
1340+
// type `Iterator::Item` -- that is, `Item` is the
13411341
// associated type of the concrete iterator impl.
13421342
for v in &vs {
13431343
// ~ ~~~

src/libstd/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//!
2626
//! # How to read this documentation
2727
//!
28-
//! If you already know the name of what you are looking for the fastest way to
28+
//! If you already know the name of what you are looking for, the fastest way to
2929
//! find it is to use the <a href="#" onclick="focusSearchBar();">search
3030
//! bar</a> at the top of the page.
3131
//!

src/libstd/prelude/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//!
4444
//! [`std::io::prelude`]: ../io/prelude/index.html
4545
//!
46-
//! The differece between 'the prelude' and these other preludes is that they
46+
//! The difference between 'the prelude' and these other preludes is that they
4747
//! are not automatically `use`'d, and must be imported manually. This is still
4848
//! easier than importing all of their consitutent components.
4949
//!

src/libstd/primitive_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ mod prim_slice { }
333333
/// let ptr = story.as_ptr();
334334
/// let len = story.len();
335335
///
336-
/// // story has thirteen bytes
336+
/// // story has nineteen bytes
337337
/// assert_eq!(19, len);
338338
///
339339
/// // We can re-build a str out of ptr and len. This is all unsafe becuase

0 commit comments

Comments
 (0)