Skip to content

Commit 0c1dc62

Browse files
committed
Auto merge of #56340 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 22 pull requests Successful merges: - #55391 (bootstrap: clean up a few clippy findings) - #56021 (avoid features_untracked) - #56023 (atomic::Ordering: Get rid of misleading parts of intro) - #56080 (Reduce the amount of bold text at doc.rlo) - #56114 (Enclose type in backticks for "non-exhaustive patterns" error) - #56124 (Fix small doc mistake on std::io::read::read_to_end) - #56127 (Update an outdated comment in mir building) - #56148 (Add rustc-guide as a submodule) - #56149 (Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer) - #56220 (Suggest appropriate place for lifetime when declared after type arguments) - #56223 (Make JSON output from -Zprofile-json valid) - #56236 (Remove unsafe `unsafe` inner function.) - #56255 (Update outdated code comments in StringReader) - #56257 (rustc-guide has moved to rust-lang/) - #56273 (Add missing doc link) - #56289 (Fix small typo in comment of thread::stack_size) - #56294 (Fix a typo in the documentation of std::ffi) - #56312 (Deduplicate literal -> constant lowering) - #56319 (fix futures creating aliasing mutable and shared ref) - #56321 (rustdoc: add bottom margin spacing to nested lists) - #56322 (resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`) - #56330 (Clean up span in non-trailing `..` suggestion) Failed merges: r? @ghost
2 parents 147e60c + 3b64f86 commit 0c1dc62

File tree

83 files changed

+418
-316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+418
-316
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@
6262
url = https://github.com/rust-lang-nursery/clang.git
6363
branch = rust-release-80-v1
6464

65+
[submodule "src/doc/rustc-guide"]
66+
path = src/doc/rustc-guide
67+
url = https://github.com/rust-lang/rustc-guide.git

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,13 @@ are:
640640
* **Google!** ([search only in Rust Documentation][gsearchdocs] to find types, traits, etc. quickly)
641641
* Don't be afraid to ask! The Rust community is friendly and helpful.
642642

643-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
643+
[rustc guide]: https://rust-lang.github.io/rustc-guide/about-this-guide.html
644644
[gdfrustc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
645645
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
646646
[rif]: http://internals.rust-lang.org
647647
[rr]: https://doc.rust-lang.org/book/README.html
648648
[rustforge]: https://forge.rust-lang.org/
649649
[tlgba]: http://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/
650650
[ro]: http://www.rustaceans.org/
651-
[rctd]: https://rust-lang-nursery.github.io/rustc-guide/tests/intro.html
651+
[rctd]: https://rust-lang.github.io/rustc-guide/tests/intro.html
652652
[cheatsheet]: https://buildbot2.rust-lang.org/homu/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Also, you may find the [rustdocs for the compiler itself][rustdocs] useful.
233233
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
234234
[#rust]: irc://irc.mozilla.org/rust
235235
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
236-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
236+
[rustc guide]: https://rust-lang.github.io/rustc-guide/about-this-guide.html
237237
[rustdocs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
238238

239239
## License

src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ There is also useful content in the following READMEs, which are gradually being
1212
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
1313
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve
1414

15-
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
15+
[rustc guide]: https://rust-lang.github.io/rustc-guide/about-this-guide.html

src/bootstrap/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,10 @@ impl Build {
777777
fn cflags(&self, target: Interned<String>, which: GitRepo) -> Vec<String> {
778778
// Filter out -O and /O (the optimization flags) that we picked up from
779779
// cc-rs because the build scripts will determine that for themselves.
780-
let mut base: Vec<String> = self.cc[&target].args().iter()
780+
let mut base = self.cc[&target].args().iter()
781781
.map(|s| s.to_string_lossy().into_owned())
782782
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
783-
.collect::<Vec<_>>();
783+
.collect::<Vec<String>>();
784784

785785
// If we're compiling on macOS then we add a few unconditional flags
786786
// indicating that we want libc++ (more filled out than libstdc++) and

src/doc/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ nav {
2121
#search-but:hover, #search-input:focus {
2222
border-color: #55a9ff;
2323
}
24+
h2 {
25+
font-size: 18px;
26+
}
2427
</style>
2528

2629
Welcome to an overview of the documentation provided by the Rust project.

src/doc/rustc-guide

Submodule rustc-guide added at 3a80495

src/doc/rustc/src/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to rustc
22

33
We'd love to have your help improving `rustc`! To that end, we've written [a
4-
whole book](https://rust-lang-nursery.github.io/rustc-guide/) on its
4+
whole book](https://rust-lang.github.io/rustc-guide/) on its
55
internals, how it works, and how to get started working on it. To learn
6-
more, you'll want to check that out.
6+
more, you'll want to check that out.

src/libcore/iter/iterator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ pub trait Iterator {
519519
/// element.
520520
///
521521
/// `map()` transforms one iterator into another, by means of its argument:
522-
/// something that implements `FnMut`. It produces a new iterator which
522+
/// something that implements [`FnMut`]. It produces a new iterator which
523523
/// calls this closure on each element of the original iterator.
524524
///
525525
/// If you are good at thinking in types, you can think of `map()` like this:
@@ -533,6 +533,7 @@ pub trait Iterator {
533533
/// more idiomatic to use [`for`] than `map()`.
534534
///
535535
/// [`for`]: ../../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
536+
/// [`FnMut`]: ../../std/ops/trait.FnMut.html
536537
///
537538
/// # Examples
538539
///

src/libcore/str/lossy.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,15 @@ impl<'a> Iterator for Utf8LossyChunksIter<'a> {
6262
}
6363

6464
const TAG_CONT_U8: u8 = 128;
65-
fn unsafe_get(xs: &[u8], i: usize) -> u8 {
66-
unsafe { *xs.get_unchecked(i) }
67-
}
6865
fn safe_get(xs: &[u8], i: usize) -> u8 {
69-
if i >= xs.len() { 0 } else { unsafe_get(xs, i) }
66+
*xs.get(i).unwrap_or(&0)
7067
}
7168

7269
let mut i = 0;
7370
while i < self.source.len() {
7471
let i_ = i;
7572

76-
let byte = unsafe_get(self.source, i);
73+
let byte = unsafe { *self.source.get_unchecked(i) };
7774
i += 1;
7875

7976
if byte < 128 {

0 commit comments

Comments
 (0)