Skip to content

Commit 22ac88f

Browse files
committed
Auto merge of #33562 - GuillaumeGomez:rollup, r=steveklabnik
Rollup of 3 pull requests - Successful merges: #33401, #33489, #33558 - Failed merges: #33342, #33475, #33517
2 parents 700279f + 10f9f30 commit 22ac88f

12 files changed

+409
-25
lines changed

Makefile.in

+20
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,20 @@
107107
#
108108
# run `make nitty-gritty`
109109
#
110+
# # Make command examples
111+
#
112+
# ## Docs linked commands
113+
#
114+
# * make check-stage1-rustdocck: Builds rustdoc. It has the advantage to compile
115+
# quite quickly since we're only using stage1
116+
# executables.
117+
# * make doc/error-index.md: Gets all doc blocks from doc comments and error
118+
# explanations to put them in a markdown file. You
119+
# can then test them by running
120+
# "rustdoc --test error-index.md".
121+
#
122+
# And of course, the wonderfully useful 'make tidy'! Always run it before opening a pull request to rust!
123+
#
110124
# </tips>
111125
#
112126
# <nitty-gritty>
@@ -256,3 +270,9 @@ ifneq ($(strip $(findstring TAGS.emacs,$(MAKECMDGOALS)) \
256270
CFG_INFO := $(info cfg: including ctags rules)
257271
include $(CFG_SRC_DIR)mk/ctags.mk
258272
endif
273+
274+
.DEFAULT:
275+
@echo "\n======================================================"
276+
@echo "== If you need help, run 'make help' or 'make tips' =="
277+
@echo "======================================================\n"
278+
exit 1

src/doc/book/crates-and-modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ $ ls target/debug
115115
build deps examples libphrases-a7448e02a0468eaa.rlib native
116116
```
117117

118-
`libphrases-hash.rlib` is the compiled crate. Before we see how to use this
118+
`libphrases-<hash>.rlib` is the compiled crate. Before we see how to use this
119119
crate from another crate, let’s break it up into multiple files.
120120

121121
# Multiple File Crates

src/doc/book/error-handling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ sense to put it into a function:
225225
```rust
226226
# fn find(_: &str, _: char) -> Option<usize> { None }
227227
// Returns the extension of the given file name, where the extension is defined
228-
// as all characters proceeding the first `.`.
228+
// as all characters following the first `.`.
229229
// If `file_name` has no `.`, then `None` is returned.
230230
fn extension_explicit(file_name: &str) -> Option<&str> {
231231
match find(file_name, '.') {
@@ -274,7 +274,7 @@ to get rid of the case analysis:
274274
```rust
275275
# fn find(_: &str, _: char) -> Option<usize> { None }
276276
// Returns the extension of the given file name, where the extension is defined
277-
// as all characters proceeding the first `.`.
277+
// as all characters following the first `.`.
278278
// If `file_name` has no `.`, then `None` is returned.
279279
fn extension(file_name: &str) -> Option<&str> {
280280
find(file_name, '.').map(|i| &file_name[i+1..])

src/doc/book/testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ fn it_works() {
8484
```
8585

8686
`assert!` is a macro provided by Rust which takes one argument: if the argument
87-
is `true`, nothing happens. If the argument is `false`, it `panic!`s. Let's run
88-
our tests again:
87+
is `true`, nothing happens. If the argument is `false`, it will `panic!`. Let's
88+
run our tests again:
8989

9090
```bash
9191
$ cargo test

src/libcore/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
// Since libcore defines many fundamental lang items, all tests live in a
4444
// separate crate, libcoretest, to avoid bizarre issues.
4545

46+
#![cfg_attr(stage0, allow(unused_attributes))]
4647
#![crate_name = "core"]
4748
#![stable(feature = "core", since = "1.6.0")]
4849
#![crate_type = "rlib"]

src/libcore/slice.rs

+4
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ impl<T> SliceExt for [T] {
523523
}
524524

525525
#[stable(feature = "rust1", since = "1.0.0")]
526+
#[allow(unused_attributes)]
527+
#[rustc_on_unimplemented = "a usize is required to index into a slice"]
526528
impl<T> ops::Index<usize> for [T] {
527529
type Output = T;
528530

@@ -533,6 +535,8 @@ impl<T> ops::Index<usize> for [T] {
533535
}
534536

535537
#[stable(feature = "rust1", since = "1.0.0")]
538+
#[allow(unused_attributes)]
539+
#[rustc_on_unimplemented = "a usize is required to index into a slice"]
536540
impl<T> ops::IndexMut<usize> for [T] {
537541
#[inline]
538542
fn index_mut(&mut self, index: usize) -> &mut T {

src/librustc/infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
167167

168168
/// A map returned by `skolemize_late_bound_regions()` indicating the skolemized
169169
/// region that each late-bound region was replaced with.
170-
pub type SkolemizationMap = FnvHashMap<ty::BoundRegion,ty::Region>;
170+
pub type SkolemizationMap = FnvHashMap<ty::BoundRegion, ty::Region>;
171171

172172
/// Why did we require that the two types be related?
173173
///

0 commit comments

Comments
 (0)