Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 15 pull requests #48608

Merged
merged 40 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b31ff95
Add non-panicking variants of pow to all integer types
milesand Feb 18, 2018
bde8555
RefCell: document panics in Clone, PartialEq, PartialOrd, Ord. Fixes …
Centril Feb 20, 2018
2d3f31d
Change local storage name for rustdoc because of conflicts with mdbook
GuillaumeGomez Feb 20, 2018
5b61b61
Allow to not switch to a theme if it doesn't exist
GuillaumeGomez Feb 20, 2018
8d51c33
Remove theme button outline
GuillaumeGomez Feb 20, 2018
b1a6c8b
Stabilize [T]::rotate_{left,right}
frewsxcv Feb 23, 2018
2985a1a
Report non-standard compile flags on ICE
pietroalbini Feb 16, 2018
a05c553
Start moving to the rustc guide!
mark-i-m Feb 23, 2018
70db41c
Handle gdb command failure gracefully in compiletest
varkor Feb 23, 2018
23dc694
Fix auto trait impl rustdoc ice
GuillaumeGomez Feb 23, 2018
e20f7b2
Restrict the Termination impls to simplify stabilization
scottmcm Feb 24, 2018
968ce25
Change links to readmes
mark-i-m Feb 25, 2018
d6f22a2
Make comment into a doc comment and change readme ref
mark-i-m Feb 25, 2018
7a82da1
tidy fix
mark-i-m Feb 25, 2018
2466644
Ensure main() always has external linkage
varkor Feb 25, 2018
88de279
bootstrap: Add openssl configuration for powerpc-unknown-linux-gnuspe
glaubitz Feb 23, 2018
a22fbf8
librustc_back: Add support for powerpc-linux-gnuspe
glaubitz Feb 23, 2018
b7683a3
build-manifest: Add powerpc-unknown-linux-gnuspe target
glaubitz Feb 23, 2018
7c84ba4
test: Run atomic-lock-free on powerpc-linux-gnuspe
glaubitz Feb 23, 2018
5db73fc
Encode linker arguments as UTF-16 on MSVC platforms
Mark-Simulacrum Feb 22, 2018
2026453
Add specific target option for returning struct as an integer.
bdrewery Feb 26, 2018
279e5b0
FreeBSD uses Clang which can return small structs as an integer.
bdrewery Feb 26, 2018
9c80019
Fix error-format argument to x.py
Mark-Simulacrum Feb 26, 2018
c133a08
rustc: Rename `bmi` feature to `bmi1`
alexcrichton Feb 26, 2018
f8ebb3f
fix wording on panics in binary operators on RefCells"
Centril Feb 27, 2018
f933dd2
Rollup merge of #48266 - pietroalbini:report-compiler-flags-on-ice, r…
kennytm Feb 28, 2018
85d7d0b
Rollup merge of #48321 - milesand:no_panic_pow, r=alexcrichton
kennytm Feb 28, 2018
c599463
Rollup merge of #48365 - Centril:docs/document-refcell-panics, r=frew…
kennytm Feb 28, 2018
71ce38e
Rollup merge of #48381 - GuillaumeGomez:rustdoc-theme-securities, r=Q…
kennytm Feb 28, 2018
ef44e63
Rollup merge of #48450 - frewsxcv:frewsxcxv-stabilize-slice-rotatee, …
kennytm Feb 28, 2018
cbd0a2c
Rollup merge of #48473 - GuillaumeGomez:rustdoc-auto-trait-impl-fix, …
kennytm Feb 28, 2018
af55518
Rollup merge of #48479 - mark-i-m:rustc-guide, r=nikomatsakis
kennytm Feb 28, 2018
428f002
Rollup merge of #48484 - glaubitz:powerpcspe-linux, r=alexcrichton
kennytm Feb 28, 2018
a3fecfb
Rollup merge of #48488 - varkor:handle-gdb-error-compiletest, r=micha…
kennytm Feb 28, 2018
d3fee34
Rollup merge of #48497 - scottmcm:more-restricted-termination, r=niko…
kennytm Feb 28, 2018
62f4fe5
Rollup merge of #48541 - varkor:inlined-main, r=michaelwoerister
kennytm Feb 28, 2018
59ab146
Rollup merge of #48548 - alexcrichton:msvc-linker-utf16, r=alexcrichton
kennytm Feb 28, 2018
4b4cd47
Rollup merge of #48558 - Mark-Simulacrum:error-format, r=Manishearth
kennytm Feb 28, 2018
537f8d6
Rollup merge of #48560 - bdrewery:freebsd-struct-abi, r=estebank
kennytm Feb 28, 2018
fed0c42
Rollup merge of #48565 - alexcrichton:rename-bmi, r=cramertj
kennytm Feb 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ For people new to Rust, and just starting to contribute, or even for
more seasoned developers, some useful places to look for information
are:

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

[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
[gdfrustc]: http://manishearth.github.io/rust-internals-docs/rustc/
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
[rif]: http://internals.rust-lang.org
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,13 @@ variety of channels on Mozilla's IRC network, irc.mozilla.org. The
most popular channel is [#rust], a venue for general discussion about
Rust. And a good place to ask for help would be [#rust-beginners].

Also, the [rustc guide] might be a good place to start if you want to
find out how various parts of the compiler work.

[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
[#rust]: irc://irc.mozilla.org/rust
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
[rustc-guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html

## License
[license]: #license
Expand Down
15 changes: 15 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This directory contains the source code of the rust project, including:
- `rustc` and its tests
- `libstd`
- Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the [rustc guide].

Their is also useful content in the following READMEs, which are gradually being moved over to the guide:
- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/maps
- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph
- https://github.com/rust-lang/rust/blob/master/src/librustc/infer/region_constraints
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve

[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html
4 changes: 4 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,10 @@ pub fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path, is_check: boo
continue
};
if json["reason"].as_str() != Some("compiler-artifact") {
if build.config.rustc_error_format.as_ref().map_or(false, |e| e == "json") {
// most likely not a cargo message, so let's send it out as well
println!("{}", line);
}
continue
}
for filename in json["filenames"].as_array().unwrap() {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
opts.optopt("", "src", "path to the root of the rust checkout", "DIR");
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
opts.optflag("h", "help", "print this help message");
opts.optflag("", "error-format", "rustc error format");
opts.optopt("", "error-format", "rustc error format", "FORMAT");

// fn usage()
let usage = |exit_code: i32, opts: &Options, subcommand_help: &str, extra_help: &str| -> ! {
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ impl Step for Openssl {
"mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
"mipsel-unknown-linux-gnu" => "linux-mips32",
"powerpc-unknown-linux-gnu" => "linux-ppc",
"powerpc-unknown-linux-gnuspe" => "linux-ppc",
"powerpc-unknown-netbsd" => "BSD-generic32",
"powerpc64-unknown-linux-gnu" => "linux-ppc64",
"powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#![feature(i128_type)]
#![feature(rand)]
#![feature(repr_simd)]
#![feature(slice_rotate)]
#![feature(test)]

extern crate rand;
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
#![cfg_attr(test, feature(placement_in))]
#![cfg_attr(not(test), feature(core_float))]
#![cfg_attr(not(test), feature(exact_size_is_empty))]
#![cfg_attr(not(test), feature(slice_rotate))]
#![cfg_attr(not(test), feature(generator_trait))]
#![cfg_attr(test, feature(rand, test))]
#![feature(allow_internal_unstable)]
Expand Down
20 changes: 3 additions & 17 deletions src/liballoc/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,8 +1460,6 @@ impl<T> [T] {
/// # Examples
///
/// ```
/// #![feature(slice_rotate)]
///
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
/// a.rotate_left(2);
/// assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
Expand All @@ -1470,23 +1468,15 @@ impl<T> [T] {
/// Rotating a subslice:
///
/// ```
/// #![feature(slice_rotate)]
///
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
/// a[1..5].rotate_left(1);
/// assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
/// ```
#[unstable(feature = "slice_rotate", issue = "41891")]
/// ```
#[stable(feature = "slice_rotate", since = "1.26.0")]
pub fn rotate_left(&mut self, mid: usize) {
core_slice::SliceExt::rotate_left(self, mid);
}

#[unstable(feature = "slice_rotate", issue = "41891")]
#[rustc_deprecated(since = "", reason = "renamed to `rotate_left`")]
pub fn rotate(&mut self, mid: usize) {
core_slice::SliceExt::rotate_left(self, mid);
}

/// Rotates the slice in-place such that the first `self.len() - k`
/// elements of the slice move to the end while the last `k` elements move
/// to the front. After calling `rotate_right`, the element previously at
Expand All @@ -1505,8 +1495,6 @@ impl<T> [T] {
/// # Examples
///
/// ```
/// #![feature(slice_rotate)]
///
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
/// a.rotate_right(2);
/// assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
Expand All @@ -1515,13 +1503,11 @@ impl<T> [T] {
/// Rotate a subslice:
///
/// ```
/// #![feature(slice_rotate)]
///
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
/// a[1..5].rotate_right(1);
/// assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
/// ```
#[unstable(feature = "slice_rotate", issue = "41891")]
#[stable(feature = "slice_rotate", since = "1.26.0")]
pub fn rotate_right(&mut self, k: usize) {
core_slice::SliceExt::rotate_right(self, k);
}
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#![feature(pattern)]
#![feature(placement_in_syntax)]
#![feature(rand)]
#![feature(slice_rotate)]
#![feature(splice)]
#![feature(str_escape)]
#![feature(string_retain)]
Expand Down
24 changes: 24 additions & 0 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,9 @@ impl<T: ?Sized> !Sync for RefCell<T> {}

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

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

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

/// # Panics
///
/// Panics if the value in either `RefCell` is currently borrowed.
#[inline]
fn lt(&self, other: &RefCell<T>) -> bool {
*self.borrow() < *other.borrow()
}

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

/// # Panics
///
/// Panics if the value in either `RefCell` is currently borrowed.
#[inline]
fn gt(&self, other: &RefCell<T>) -> bool {
*self.borrow() > *other.borrow()
}

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

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