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 #60101

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6225b31
Make clear that format padding doesn't work for Debug
sourcefrog Apr 13, 2019
cc2689a
implement nth_back for Bytes
koalatux Apr 16, 2019
fae2a68
implement nth_back for Fuse
koalatux Apr 16, 2019
2605537
implement nth_back for Enumerate
koalatux Apr 16, 2019
4fed94b
Remove unwanted z-index change
GuillaumeGomez Apr 17, 2019
98f38b2
Correct E0392 diagnostic
varkor Apr 17, 2019
ca19ffe
Update rustfmt to 1.2.1
topecongiro Apr 17, 2019
365a48a
whitelist rtm x86 cpu feature
mtak- Apr 17, 2019
007b40b
Point at try `?` on errors affecting the err match arm of the desugar…
estebank Apr 18, 2019
1e99b2e
Give custom error for E0277 on `?` error case
estebank Apr 18, 2019
379c541
Simplify the returning of a Result a bit
janhohenheim Apr 17, 2019
be69785
Use more realistic example for thread builder
matklad Apr 18, 2019
553ec5d
Update run-make PGO test to new commandline syntax.
michaelwoerister Apr 17, 2019
4269be3
Prefix PROFILER_SUPPORT and SANITIZER_SUPPORT test env vars with RUST…
michaelwoerister Apr 18, 2019
227be65
compiletest: Allow for tests requiring profiler-rt or sanitizer-rt su…
michaelwoerister Apr 18, 2019
e2acaee
Add codegen test that makes sure PGO instrumentation is emitted as ex…
michaelwoerister Apr 16, 2019
d98afc5
Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.
nathankleyn Apr 18, 2019
cc77087
Use new `needs-(profiler|sanitizer)-support` compiletest directive to…
michaelwoerister Apr 18, 2019
08efbac
Implement event filtering for self-profiler.
michaelwoerister Apr 12, 2019
ae1f2b5
Update miri
TimDiekmann Apr 18, 2019
048ba28
Update tests
varkor Apr 17, 2019
eed3619
Use -mergefunc-use-aliases for any LLVM >= 8
cuviper Apr 18, 2019
a1099ae
Remove the unused LLVMRustIsRustLLVM
cuviper Apr 18, 2019
dbfbade
libcore: deny more...
Centril Apr 18, 2019
8286299
Rollup merge of #59915 - michaelwoerister:sp-event-filters-1, r=wesle…
Centril Apr 19, 2019
419b217
Rollup merge of #59933 - sourcefrog:doc-fmt, r=shepmaster
Centril Apr 19, 2019
47f14f7
Rollup merge of #60023 - koalatux:nth-back, r=scottmcm
Centril Apr 19, 2019
af65b60
Rollup merge of #60032 - rust-lang:remove-unwanted-z-index, r=QuietMi…
Centril Apr 19, 2019
ecb9edf
Rollup merge of #60038 - michaelwoerister:pgo-updates-2, r=alexcrichton
Centril Apr 19, 2019
e708645
Rollup merge of #60041 - jnferner:patch-1, r=shepmaster
Centril Apr 19, 2019
944a740
Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebank
Centril Apr 19, 2019
eb95caa
Rollup merge of #60056 - topecongiro:rustfmt-1.2.1, r=alexcrichton
Centril Apr 19, 2019
a667ae6
Rollup merge of #60060 - mtak-:rtm-x86-feature, r=petrochenkov
Centril Apr 19, 2019
fc33206
Rollup merge of #60064 - estebank:issue-59980, r=varkor
Centril Apr 19, 2019
54b4a44
Rollup merge of #60078 - matklad:patch-1, r=shepmaster
Centril Apr 19, 2019
90c59c9
Rollup merge of #60080 - nathankleyn:fix-issue-60068, r=Centril
Centril Apr 19, 2019
69a3822
Rollup merge of #60082 - TimDiekmann:master, r=RalfJung
Centril Apr 19, 2019
39ab46a
Rollup merge of #60097 - cuviper:llvm8-mergefunc-use-aliases, r=rkruppe
Centril Apr 19, 2019
0a5fe40
Rollup merge of #60098 - Centril:libcore-deny-more, r=varkor
Centril Apr 19, 2019
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
6 changes: 3 additions & 3 deletions src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub struct LayoutErr {
// (we need this for downstream impl of trait Error)
#[stable(feature = "alloc_layout", since = "1.28.0")]
impl fmt::Display for LayoutErr {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("invalid parameters to Layout::from_size_align")
}
}
Expand All @@ -354,7 +354,7 @@ pub struct AllocErr;
// (we need this for downstream impl of trait Error)
#[unstable(feature = "allocator_api", issue = "32838")]
impl fmt::Display for AllocErr {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("memory allocation failed")
}
}
Expand All @@ -376,7 +376,7 @@ impl CannotReallocInPlace {
// (we need this for downstream impl of trait Error)
#[unstable(feature = "allocator_api", issue = "32838")]
impl fmt::Display for CannotReallocInPlace {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.description())
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl<T: 'static + ?Sized > Any for T {

#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for dyn Any {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("Any")
}
}
Expand All @@ -117,14 +117,14 @@ impl fmt::Debug for dyn Any {
// dispatch works with upcasting.
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for dyn Any + Send {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("Any")
}
}

#[stable(feature = "any_send_sync_methods", since = "1.28.0")]
impl fmt::Debug for dyn Any + Send + Sync {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("Any")
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct TryFromSliceError(());

impl fmt::Display for TryFromSliceError {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(self.__description(), f)
}
}
Expand Down Expand Up @@ -184,7 +184,7 @@ macro_rules! array_impls {

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: fmt::Debug> fmt::Debug for [T; $N] {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&&self[..], f)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl FusedIterator for EscapeDefault {}

#[stable(feature = "std_debug", since = "1.16.0")]
impl fmt::Debug for EscapeDefault {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("EscapeDefault { .. }")
}
}
20 changes: 10 additions & 10 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@ pub struct BorrowError {

#[stable(feature = "try_borrow", since = "1.13.0")]
impl Debug for BorrowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("BorrowError").finish()
}
}

#[stable(feature = "try_borrow", since = "1.13.0")]
impl Display for BorrowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Display::fmt("already mutably borrowed", f)
}
}
Expand All @@ -597,14 +597,14 @@ pub struct BorrowMutError {

#[stable(feature = "try_borrow", since = "1.13.0")]
impl Debug for BorrowMutError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("BorrowMutError").finish()
}
}

#[stable(feature = "try_borrow", since = "1.13.0")]
impl Display for BorrowMutError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Display::fmt("already borrowed", f)
}
}
Expand Down Expand Up @@ -788,7 +788,7 @@ impl<T: ?Sized> RefCell<T> {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn borrow(&self) -> Ref<T> {
pub fn borrow(&self) -> Ref<'_, T> {
self.try_borrow().expect("already mutably borrowed")
}

Expand Down Expand Up @@ -819,7 +819,7 @@ impl<T: ?Sized> RefCell<T> {
/// ```
#[stable(feature = "try_borrow", since = "1.13.0")]
#[inline]
pub fn try_borrow(&self) -> Result<Ref<T>, BorrowError> {
pub fn try_borrow(&self) -> Result<Ref<'_, T>, BorrowError> {
match BorrowRef::new(&self.borrow) {
Some(b) => Ok(Ref {
value: unsafe { &*self.value.get() },
Expand Down Expand Up @@ -869,7 +869,7 @@ impl<T: ?Sized> RefCell<T> {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn borrow_mut(&self) -> RefMut<T> {
pub fn borrow_mut(&self) -> RefMut<'_, T> {
self.try_borrow_mut().expect("already borrowed")
}

Expand Down Expand Up @@ -897,7 +897,7 @@ impl<T: ?Sized> RefCell<T> {
/// ```
#[stable(feature = "try_borrow", since = "1.13.0")]
#[inline]
pub fn try_borrow_mut(&self) -> Result<RefMut<T>, BorrowMutError> {
pub fn try_borrow_mut(&self) -> Result<RefMut<'_, T>, BorrowMutError> {
match BorrowRefMut::new(&self.borrow) {
Some(b) => Ok(RefMut {
value: unsafe { &mut *self.value.get() },
Expand Down Expand Up @@ -1245,7 +1245,7 @@ impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Ref<'b, U>> for Ref<'b,

#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<T: ?Sized + fmt::Display> fmt::Display for Ref<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.value.fmt(f)
}
}
Expand Down Expand Up @@ -1402,7 +1402,7 @@ impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefM

#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.value.fmt(f)
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/libcore/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ enum CharErrorKind {

#[stable(feature = "char_from_str", since = "1.20.0")]
impl fmt::Display for ParseCharError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.__description().fmt(f)
}
}
Expand Down Expand Up @@ -240,7 +240,7 @@ pub struct CharTryFromError(());

#[stable(feature = "try_from", since = "1.34.0")]
impl fmt::Display for CharTryFromError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
"converted integer out of range for `char`".fmt(f)
}
}
Expand Down Expand Up @@ -316,4 +316,3 @@ pub fn from_digit(num: u32, radix: u32) -> Option<char> {
None
}
}

2 changes: 1 addition & 1 deletion src/libcore/char/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl DecodeUtf16Error {

#[stable(feature = "decode_utf16", since = "1.9.0")]
impl fmt::Display for DecodeUtf16Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "unpaired surrogate found: {:x}", self.code)
}
}
12 changes: 6 additions & 6 deletions src/libcore/char/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl FusedIterator for EscapeUnicode {}

#[stable(feature = "char_struct_display", since = "1.16.0")]
impl fmt::Display for EscapeUnicode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for c in self.clone() {
f.write_char(c)?;
}
Expand Down Expand Up @@ -333,7 +333,7 @@ impl FusedIterator for EscapeDefault {}

#[stable(feature = "char_struct_display", since = "1.16.0")]
impl fmt::Display for EscapeDefault {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for c in self.clone() {
f.write_char(c)?;
}
Expand Down Expand Up @@ -367,7 +367,7 @@ impl FusedIterator for EscapeDebug {}

#[stable(feature = "char_escape_debug", since = "1.20.0")]
impl fmt::Display for EscapeDebug {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}
Expand Down Expand Up @@ -482,7 +482,7 @@ impl Iterator for CaseMappingIter {
}

impl fmt::Display for CaseMappingIter {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
CaseMappingIter::Three(a, b, c) => {
f.write_char(a)?;
Expand All @@ -503,14 +503,14 @@ impl fmt::Display for CaseMappingIter {

#[stable(feature = "char_struct_display", since = "1.16.0")]
impl fmt::Display for ToLowercase {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}

#[stable(feature = "char_struct_display", since = "1.16.0")]
impl fmt::Display for ToUppercase {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}
10 changes: 5 additions & 5 deletions src/libcore/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub enum c_void {

#[stable(feature = "std_debug", since = "1.16.0")]
impl fmt::Debug for c_void {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("c_void")
}
}
Expand All @@ -62,7 +62,7 @@ extern {
all(target_arch = "aarch64", target_os = "ios"),
windows))]
impl fmt::Debug for VaListImpl {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "va_list* {:p}", self)
}
}
Expand Down Expand Up @@ -212,7 +212,7 @@ impl<'a> VaList<'a> {
extern "rust-intrinsic" {
/// Destroy the arglist `ap` after initialization with `va_start` or
/// `va_copy`.
fn va_end(ap: &mut VaList);
fn va_end(ap: &mut VaList<'_>);

/// Copies the current location of arglist `src` to the arglist `dst`.
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
Expand All @@ -222,9 +222,9 @@ extern "rust-intrinsic" {
fn va_copy<'a>(src: &VaList<'a>) -> VaList<'a>;
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
fn va_copy(src: &VaList) -> VaListImpl;
fn va_copy(src: &VaList<'_>) -> VaListImpl;

/// Loads an argument of type `T` from the `va_list` `ap` and increment the
/// argument `ap` points to.
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaList) -> T;
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaList<'_>) -> T;
}
2 changes: 1 addition & 1 deletion src/libcore/fmt/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ struct PadAdapter<'a> {
}

impl<'a> PadAdapter<'a> {
fn wrap<'b, 'c: 'a+'b>(fmt: &'c mut fmt::Formatter, slot: &'b mut Option<Self>)
fn wrap<'b, 'c: 'a+'b>(fmt: &'c mut fmt::Formatter<'_>, slot: &'b mut Option<Self>)
-> fmt::Formatter<'b> {
fmt.wrap_buf(move |buf| {
*slot = Some(PadAdapter {
Expand Down
Loading