Skip to content

Rollup of 15 pull requests #48608

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

Merged
merged 40 commits into from
Feb 28, 2018
Merged
Changes from 3 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
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