Skip to content

[beta] Rollup backports #62065

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 13 commits into from
Jun 26, 2019
Merged
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .azure-pipelines/auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

pr: none
trigger:
- auto

pool:
vmImage: 'Ubuntu 16.04'

steps:
- script: echo Done
displayName: 'Dummy build'
2 changes: 1 addition & 1 deletion src/liballoc/macros.rs
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ macro_rules! vec {
($($x:expr),*) => (
<[_]>::into_vec(box [$($x),*])
);
($($x:expr,)*) => (vec![$($x),*])
($($x:expr,)*) => ($crate::vec![$($x),*])
}

// HACK(japaric): with cfg(test) the inherent `[T]::into_vec` method, which is
22 changes: 11 additions & 11 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
@@ -6,13 +6,13 @@
#[stable(feature = "core", since = "1.6.0")]
macro_rules! panic {
() => (
panic!("explicit panic")
$crate::panic!("explicit panic")
);
($msg:expr) => ({
$crate::panicking::panic(&($msg, file!(), line!(), __rust_unstable_column!()))
});
($msg:expr,) => (
panic!($msg)
$crate::panic!($msg)
);
($fmt:expr, $($arg:tt)+) => ({
$crate::panicking::panic_fmt(format_args!($fmt, $($arg)*),
@@ -58,7 +58,7 @@ macro_rules! assert_eq {
}
});
($left:expr, $right:expr,) => ({
assert_eq!($left, $right)
$crate::assert_eq!($left, $right)
});
($left:expr, $right:expr, $($arg:tt)+) => ({
match (&($left), &($right)) {
@@ -115,7 +115,7 @@ macro_rules! assert_ne {
}
});
($left:expr, $right:expr,) => {
assert_ne!($left, $right)
$crate::assert_ne!($left, $right)
};
($left:expr, $right:expr, $($arg:tt)+) => ({
match (&($left), &($right)) {
@@ -208,7 +208,7 @@ macro_rules! debug_assert {
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
macro_rules! debug_assert_eq {
($($arg:tt)*) => (if cfg!(debug_assertions) { assert_eq!($($arg)*); })
($($arg:tt)*) => (if cfg!(debug_assertions) { $crate::assert_eq!($($arg)*); })
}

/// Asserts that two expressions are not equal to each other.
@@ -235,7 +235,7 @@ macro_rules! debug_assert_eq {
#[macro_export]
#[stable(feature = "assert_ne", since = "1.13.0")]
macro_rules! debug_assert_ne {
($($arg:tt)*) => (if cfg!(debug_assertions) { assert_ne!($($arg)*); })
($($arg:tt)*) => (if cfg!(debug_assertions) { $crate::assert_ne!($($arg)*); })
}

/// Unwraps a result or propagates its error.
@@ -310,7 +310,7 @@ macro_rules! r#try {
return $crate::result::Result::Err($crate::convert::From::from(err))
}
});
($expr:expr,) => (r#try!($expr));
($expr:expr,) => ($crate::r#try!($expr));
}

/// Writes formatted data into a buffer.
@@ -425,10 +425,10 @@ macro_rules! write {
#[allow_internal_unstable(format_args_nl)]
macro_rules! writeln {
($dst:expr) => (
write!($dst, "\n")
$crate::write!($dst, "\n")
);
($dst:expr,) => (
writeln!($dst)
$crate::writeln!($dst)
);
($dst:expr, $($arg:tt)*) => (
$dst.write_fmt(format_args_nl!($($arg)*))
@@ -493,10 +493,10 @@ macro_rules! unreachable {
panic!("internal error: entered unreachable code")
});
($msg:expr) => ({
unreachable!("{}", $msg)
$crate::unreachable!("{}", $msg)
});
($msg:expr,) => ({
unreachable!($msg)
$crate::unreachable!($msg)
});
($fmt:expr, $($arg:tt)*) => ({
panic!(concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
6 changes: 3 additions & 3 deletions src/libcore/marker.rs
Original file line number Diff line number Diff line change
@@ -73,9 +73,9 @@ impl<T: ?Sized> !Send for *mut T { }
/// impl Foo for Impl { }
/// impl Bar for Impl { }
///
/// let x: &Foo = &Impl; // OK
/// // let y: &Bar = &Impl; // error: the trait `Bar` cannot
/// // be made into an object
/// let x: &dyn Foo = &Impl; // OK
/// // let y: &dyn Bar = &Impl; // error: the trait `Bar` cannot
/// // be made into an object
/// ```
///
/// [trait object]: ../../book/ch17-02-trait-objects.html
2 changes: 1 addition & 1 deletion src/libcore/mem.rs
Original file line number Diff line number Diff line change
@@ -1071,7 +1071,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
/// optimizations, potentially resulting in a larger size:
///
/// ```rust
/// # use std::mem::{MaybeUninit, size_of, align_of};
/// # use std::mem::{MaybeUninit, size_of};
/// assert_eq!(size_of::<Option<bool>>(), 1);
/// assert_eq!(size_of::<Option<MaybeUninit<bool>>>(), 2);
/// ```
4 changes: 2 additions & 2 deletions src/libcore/raw.rs
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@
/// let value: i32 = 123;
///
/// // let the compiler make a trait object
/// let object: &Foo = &value;
/// let object: &dyn Foo = &value;
///
/// // look at the raw representation
/// let raw_object: raw::TraitObject = unsafe { mem::transmute(object) };
@@ -65,7 +65,7 @@
///
/// // construct a new object, pointing to a different `i32`, being
/// // careful to use the `i32` vtable from `object`
/// let synthesized: &Foo = unsafe {
/// let synthesized: &dyn Foo = unsafe {
/// mem::transmute(raw::TraitObject {
/// data: &other_value as *const _ as *mut (),
/// vtable: raw_object.vtable,
15 changes: 9 additions & 6 deletions src/librustc/middle/region.rs
Original file line number Diff line number Diff line change
@@ -658,12 +658,15 @@ impl<'tcx> ScopeTree {
// The lifetime was defined on node that doesn't own a body,
// which in practice can only mean a trait or an impl, that
// is the parent of a method, and that is enforced below.
assert_eq!(Some(param_owner_id), self.root_parent,
"free_scope: {:?} not recognized by the \
region scope tree for {:?} / {:?}",
param_owner,
self.root_parent.map(|id| tcx.hir().local_def_id_from_hir_id(id)),
self.root_body.map(|hir_id| DefId::local(hir_id.owner)));
if Some(param_owner_id) != self.root_parent {
tcx.sess.delay_span_bug(
DUMMY_SP,
&format!("free_scope: {:?} not recognized by the \
region scope tree for {:?} / {:?}",
param_owner,
self.root_parent.map(|id| tcx.hir().local_def_id_from_hir_id(id)),
self.root_body.map(|hir_id| DefId::local(hir_id.owner))));
}

// The trait/impl lifetime is in scope for the method's body.
self.root_body.unwrap().local_id
2 changes: 1 addition & 1 deletion src/librustc/traits/query/evaluate_obligation.rs
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
Err(OverflowError) => {
let mut selcx =
SelectionContext::with_query_mode(&self, TraitQueryMode::Standard);
selcx.evaluate_obligation_recursively(obligation)
selcx.evaluate_root_obligation(obligation)
.unwrap_or_else(|r| {
span_bug!(
obligation.cause.span,
Loading