Skip to content

Commit 0ff9872

Browse files
committed
Auto merge of #48608 - kennytm:rollup, r=kennytm
Rollup of 15 pull requests - Successful merges: #48266, #48321, #48365, #48381, #48450, #48473, #48479, #48484, #48488, #48497, #48541, #48548, #48558, #48560, #48565 - Failed merges:
2 parents ddab91a + fed0c42 commit 0ff9872

File tree

55 files changed

+698
-1394
lines changed

Some content is hidden

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

55 files changed

+698
-1394
lines changed

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ For people new to Rust, and just starting to contribute, or even for
623623
more seasoned developers, some useful places to look for information
624624
are:
625625

626+
* The [rustc guide] contains information about how various parts of the compiler work
626627
* [Rust Forge][rustforge] contains additional documentation, including write-ups of how to achieve common tasks
627628
* The [Rust Internals forum][rif], a place to ask questions and
628629
discuss Rust's internals
@@ -635,6 +636,7 @@ are:
635636
* **Google!** ([search only in Rust Documentation][gsearchdocs] to find types, traits, etc. quickly)
636637
* Don't be afraid to ask! The Rust community is friendly and helpful.
637638

639+
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
638640
[gdfrustc]: http://manishearth.github.io/rust-internals-docs/rustc/
639641
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
640642
[rif]: http://internals.rust-lang.org

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,13 @@ variety of channels on Mozilla's IRC network, irc.mozilla.org. The
227227
most popular channel is [#rust], a venue for general discussion about
228228
Rust. And a good place to ask for help would be [#rust-beginners].
229229

230+
Also, the [rustc guide] might be a good place to start if you want to
231+
find out how various parts of the compiler work.
232+
230233
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
231234
[#rust]: irc://irc.mozilla.org/rust
232235
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
236+
[rustc-guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
233237

234238
## License
235239
[license]: #license

src/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This directory contains the source code of the rust project, including:
2+
- `rustc` and its tests
3+
- `libstd`
4+
- Various submodules for tools, like rustdoc, rls, etc.
5+
6+
For more information on how various parts of the compiler work, see the [rustc guide].
7+
8+
Their is also useful content in the following READMEs, which are gradually being moved over to the guide:
9+
- https://github.com./rust-lang/rust/tree/master/src/librustc/ty/maps
10+
- https://github.com./rust-lang/rust/tree/master/src/librustc/dep_graph
11+
- https://github.com./rust-lang/rust/blob/master/src/librustc/infer/region_constraints
12+
- https://github.com./rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
13+
- https://github.com./rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve
14+
15+
[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html

src/bootstrap/compile.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,10 @@ pub fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path, is_check: boo
10071007
continue
10081008
};
10091009
if json["reason"].as_str() != Some("compiler-artifact") {
1010+
if build.config.rustc_error_format.as_ref().map_or(false, |e| e == "json") {
1011+
// most likely not a cargo message, so let's send it out as well
1012+
println!("{}", line);
1013+
}
10101014
continue
10111015
}
10121016
for filename in json["filenames"].as_array().unwrap() {

src/bootstrap/flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
119119
opts.optopt("", "src", "path to the root of the rust checkout", "DIR");
120120
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
121121
opts.optflag("h", "help", "print this help message");
122-
opts.optflag("", "error-format", "rustc error format");
122+
opts.optopt("", "error-format", "rustc error format", "FORMAT");
123123

124124
// fn usage()
125125
let usage = |exit_code: i32, opts: &Options, subcommand_help: &str, extra_help: &str| -> ! {

src/bootstrap/native.rs

+1
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ impl Step for Openssl {
480480
"mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
481481
"mipsel-unknown-linux-gnu" => "linux-mips32",
482482
"powerpc-unknown-linux-gnu" => "linux-ppc",
483+
"powerpc-unknown-linux-gnuspe" => "linux-ppc",
483484
"powerpc-unknown-netbsd" => "BSD-generic32",
484485
"powerpc64-unknown-linux-gnu" => "linux-ppc64",
485486
"powerpc64le-unknown-linux-gnu" => "linux-ppc64le",

src/liballoc/benches/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(i128_type)]
1414
#![feature(rand)]
1515
#![feature(repr_simd)]
16-
#![feature(slice_rotate)]
1716
#![feature(test)]
1817

1918
extern crate rand;

src/liballoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
#![cfg_attr(test, feature(placement_in))]
8080
#![cfg_attr(not(test), feature(core_float))]
8181
#![cfg_attr(not(test), feature(exact_size_is_empty))]
82-
#![cfg_attr(not(test), feature(slice_rotate))]
8382
#![cfg_attr(not(test), feature(generator_trait))]
8483
#![cfg_attr(test, feature(rand, test))]
8584
#![feature(allow_internal_unstable)]

src/liballoc/slice.rs

+3-17
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,6 @@ impl<T> [T] {
14601460
/// # Examples
14611461
///
14621462
/// ```
1463-
/// #![feature(slice_rotate)]
1464-
///
14651463
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
14661464
/// a.rotate_left(2);
14671465
/// assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
@@ -1470,23 +1468,15 @@ impl<T> [T] {
14701468
/// Rotating a subslice:
14711469
///
14721470
/// ```
1473-
/// #![feature(slice_rotate)]
1474-
///
14751471
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
14761472
/// a[1..5].rotate_left(1);
14771473
/// assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
1478-
/// ```
1479-
#[unstable(feature = "slice_rotate", issue = "41891")]
1474+
/// ```
1475+
#[stable(feature = "slice_rotate", since = "1.26.0")]
14801476
pub fn rotate_left(&mut self, mid: usize) {
14811477
core_slice::SliceExt::rotate_left(self, mid);
14821478
}
14831479

1484-
#[unstable(feature = "slice_rotate", issue = "41891")]
1485-
#[rustc_deprecated(since = "", reason = "renamed to `rotate_left`")]
1486-
pub fn rotate(&mut self, mid: usize) {
1487-
core_slice::SliceExt::rotate_left(self, mid);
1488-
}
1489-
14901480
/// Rotates the slice in-place such that the first `self.len() - k`
14911481
/// elements of the slice move to the end while the last `k` elements move
14921482
/// to the front. After calling `rotate_right`, the element previously at
@@ -1505,8 +1495,6 @@ impl<T> [T] {
15051495
/// # Examples
15061496
///
15071497
/// ```
1508-
/// #![feature(slice_rotate)]
1509-
///
15101498
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
15111499
/// a.rotate_right(2);
15121500
/// assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
@@ -1515,13 +1503,11 @@ impl<T> [T] {
15151503
/// Rotate a subslice:
15161504
///
15171505
/// ```
1518-
/// #![feature(slice_rotate)]
1519-
///
15201506
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
15211507
/// a[1..5].rotate_right(1);
15221508
/// assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
15231509
/// ```
1524-
#[unstable(feature = "slice_rotate", issue = "41891")]
1510+
#[stable(feature = "slice_rotate", since = "1.26.0")]
15251511
pub fn rotate_right(&mut self, k: usize) {
15261512
core_slice::SliceExt::rotate_right(self, k);
15271513
}

src/liballoc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#![feature(pattern)]
2424
#![feature(placement_in_syntax)]
2525
#![feature(rand)]
26-
#![feature(slice_rotate)]
2726
#![feature(splice)]
2827
#![feature(str_escape)]
2928
#![feature(string_retain)]

src/libcore/cell.rs

+24
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,9 @@ impl<T: ?Sized> !Sync for RefCell<T> {}
863863

864864
#[stable(feature = "rust1", since = "1.0.0")]
865865
impl<T: Clone> Clone for RefCell<T> {
866+
/// # Panics
867+
///
868+
/// Panics if the value is currently mutably borrowed.
866869
#[inline]
867870
fn clone(&self) -> RefCell<T> {
868871
RefCell::new(self.borrow().clone())
@@ -880,6 +883,9 @@ impl<T:Default> Default for RefCell<T> {
880883

881884
#[stable(feature = "rust1", since = "1.0.0")]
882885
impl<T: ?Sized + PartialEq> PartialEq for RefCell<T> {
886+
/// # Panics
887+
///
888+
/// Panics if the value in either `RefCell` is currently borrowed.
883889
#[inline]
884890
fn eq(&self, other: &RefCell<T>) -> bool {
885891
*self.borrow() == *other.borrow()
@@ -891,26 +897,41 @@ impl<T: ?Sized + Eq> Eq for RefCell<T> {}
891897

892898
#[stable(feature = "cell_ord", since = "1.10.0")]
893899
impl<T: ?Sized + PartialOrd> PartialOrd for RefCell<T> {
900+
/// # Panics
901+
///
902+
/// Panics if the value in either `RefCell` is currently borrowed.
894903
#[inline]
895904
fn partial_cmp(&self, other: &RefCell<T>) -> Option<Ordering> {
896905
self.borrow().partial_cmp(&*other.borrow())
897906
}
898907

908+
/// # Panics
909+
///
910+
/// Panics if the value in either `RefCell` is currently borrowed.
899911
#[inline]
900912
fn lt(&self, other: &RefCell<T>) -> bool {
901913
*self.borrow() < *other.borrow()
902914
}
903915

916+
/// # Panics
917+
///
918+
/// Panics if the value in either `RefCell` is currently borrowed.
904919
#[inline]
905920
fn le(&self, other: &RefCell<T>) -> bool {
906921
*self.borrow() <= *other.borrow()
907922
}
908923

924+
/// # Panics
925+
///
926+
/// Panics if the value in either `RefCell` is currently borrowed.
909927
#[inline]
910928
fn gt(&self, other: &RefCell<T>) -> bool {
911929
*self.borrow() > *other.borrow()
912930
}
913931

932+
/// # Panics
933+
///
934+
/// Panics if the value in either `RefCell` is currently borrowed.
914935
#[inline]
915936
fn ge(&self, other: &RefCell<T>) -> bool {
916937
*self.borrow() >= *other.borrow()
@@ -919,6 +940,9 @@ impl<T: ?Sized + PartialOrd> PartialOrd for RefCell<T> {
919940

920941
#[stable(feature = "cell_ord", since = "1.10.0")]
921942
impl<T: ?Sized + Ord> Ord for RefCell<T> {
943+
/// # Panics
944+
///
945+
/// Panics if the value in either `RefCell` is currently borrowed.
922946
#[inline]
923947
fn cmp(&self, other: &RefCell<T>) -> Ordering {
924948
self.borrow().cmp(&*other.borrow())

0 commit comments

Comments
 (0)