Auto merge of #41735 - frewsxcv:rollup, r=frewsxcv
Rollup of 6 pull requests - Successful merges: #41543, #41600, #41715, #41720, #41721, #41730 - Failed merges:
This commit is contained in:
commit
b16c7a235f
8 changed files with 107 additions and 42 deletions
1
.mailmap
1
.mailmap
|
@ -139,6 +139,7 @@ Margaret Meyerhofer <mmeyerho@andrew.cmu.edu> <mmeyerho@andrew>
|
|||
Mark Sinclair <mark.edward.x@gmail.com>
|
||||
Mark Sinclair <mark.edward.x@gmail.com> =Mark Sinclair <=125axel125@gmail.com>
|
||||
Markus Westerlind <marwes91@gmail.com> Markus <marwes91@gmail.com>
|
||||
Martin Hafskjold Thoresen <martinhath@gmail.com>
|
||||
Matej Lach <matej.lach@gmail.com> Matej Ľach <matej.lach@gmail.com>
|
||||
Matt Brubeck <mbrubeck@limpet.net> <mbrubeck@cs.hmc.edu>
|
||||
Matthew Auld <matthew.auld@intel.com>
|
||||
|
|
15
.travis.yml
15
.travis.yml
|
@ -95,7 +95,10 @@ matrix:
|
|||
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||
os: osx
|
||||
osx_image: xcode7
|
||||
install: *osx_install_sccache
|
||||
install:
|
||||
- travis_retry brew update
|
||||
- travis_retry brew install xz
|
||||
- *osx_install_sccache
|
||||
- env: >
|
||||
RUST_CHECK_TARGET=dist
|
||||
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers"
|
||||
|
@ -106,7 +109,10 @@ matrix:
|
|||
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||
os: osx
|
||||
osx_image: xcode7
|
||||
install: *osx_install_sccache
|
||||
install:
|
||||
- travis_retry brew update
|
||||
- travis_retry brew install xz
|
||||
- *osx_install_sccache
|
||||
|
||||
# "alternate" deployments, these are "nightlies" but don't have assertions
|
||||
# turned on, they're deployed to a different location primarily for projects
|
||||
|
@ -123,7 +129,10 @@ matrix:
|
|||
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||
os: osx
|
||||
osx_image: xcode7
|
||||
install: *osx_install_sccache
|
||||
install:
|
||||
- travis_retry brew update
|
||||
- travis_retry brew install xz
|
||||
- *osx_install_sccache
|
||||
|
||||
env:
|
||||
global:
|
||||
|
|
|
@ -767,7 +767,18 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
|
|||
// > through this reference must obviously happened before), and an
|
||||
// > "acquire" operation before deleting the object.
|
||||
//
|
||||
// In particular, while the contents of an Arc are usually immutable, it's
|
||||
// possible to have interior writes to something like a Mutex<T>. Since a
|
||||
// Mutex is not acquired when it is deleted, we can't rely on its
|
||||
// synchronization logic to make writes in thread A visible to a destructor
|
||||
// running in thread B.
|
||||
//
|
||||
// Also note that the Acquire fence here could probably be replaced with an
|
||||
// Acquire load, which could improve performance in highly-contended
|
||||
// situations. See [2].
|
||||
//
|
||||
// [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
|
||||
// [2]: (https://github.com/rust-lang/rust/pull/41714)
|
||||
atomic::fence(Acquire);
|
||||
|
||||
unsafe {
|
||||
|
|
|
@ -148,8 +148,9 @@ impl fmt::Debug for Child {
|
|||
}
|
||||
}
|
||||
|
||||
/// A handle to a child process's stdin. This struct is used in the [`stdin`]
|
||||
/// field on [`Child`].
|
||||
/// A handle to a child process's stdin.
|
||||
///
|
||||
/// This struct is used in the [`stdin`] field on [`Child`].
|
||||
///
|
||||
/// [`Child`]: struct.Child.html
|
||||
/// [`stdin`]: struct.Child.html#structfield.stdin
|
||||
|
@ -190,8 +191,9 @@ impl fmt::Debug for ChildStdin {
|
|||
}
|
||||
}
|
||||
|
||||
/// A handle to a child process's stdout. This struct is used in the [`stdout`]
|
||||
/// field on [`Child`].
|
||||
/// A handle to a child process's stdout.
|
||||
///
|
||||
/// This struct is used in the [`stdout`] field on [`Child`].
|
||||
///
|
||||
/// [`Child`]: struct.Child.html
|
||||
/// [`stdout`]: struct.Child.html#structfield.stdout
|
||||
|
|
|
@ -715,21 +715,32 @@ struct Inner {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
/// A handle to a thread.
|
||||
///
|
||||
/// You can use it to identify a thread (by name, for example). Most of the
|
||||
/// time, there is no need to directly create a `Thread` struct using the
|
||||
/// constructor, instead you should use a function like `spawn` to create
|
||||
/// new threads, see the docs of [`Builder`] and [`spawn`] for more.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::thread;
|
||||
/// use std::thread::Builder;
|
||||
///
|
||||
/// let handler = thread::Builder::new()
|
||||
/// .name("foo".into())
|
||||
/// .spawn(|| {
|
||||
/// let thread = thread::current();
|
||||
/// println!("thread name: {}", thread.name().unwrap());
|
||||
/// })
|
||||
/// .unwrap();
|
||||
///
|
||||
/// handler.join().unwrap();
|
||||
/// for i in 0..5 {
|
||||
/// let thread_name = format!("thread_{}", i);
|
||||
/// Builder::new()
|
||||
/// .name(thread_name) // Now you can identify which thread panicked
|
||||
/// // thanks to the handle's name
|
||||
/// .spawn(move || {
|
||||
/// if i == 3 {
|
||||
/// panic!("I'm scared!!!");
|
||||
/// }
|
||||
/// })
|
||||
/// .unwrap();
|
||||
/// }
|
||||
/// ```
|
||||
/// [`Builder`]: ../../std/thread/struct.Builder.html
|
||||
/// [`spawn`]: ../../std/thread/fn.spawn.html
|
||||
|
||||
pub struct Thread {
|
||||
inner: Arc<Inner>,
|
||||
}
|
||||
|
|
|
@ -84,7 +84,10 @@ impl Duration {
|
|||
/// ```
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let five_seconds = Duration::from_secs(5);
|
||||
/// let duration = Duration::from_secs(5);
|
||||
///
|
||||
/// assert_eq!(5, duration.as_secs());
|
||||
/// assert_eq!(0, duration.subsec_nanos());
|
||||
/// ```
|
||||
#[stable(feature = "duration", since = "1.3.0")]
|
||||
#[inline]
|
||||
|
@ -99,7 +102,10 @@ impl Duration {
|
|||
/// ```
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let five_seconds = Duration::from_millis(5000);
|
||||
/// let duration = Duration::from_millis(2569);
|
||||
///
|
||||
/// assert_eq!(2, duration.as_secs());
|
||||
/// assert_eq!(569000000, duration.subsec_nanos());
|
||||
/// ```
|
||||
#[stable(feature = "duration", since = "1.3.0")]
|
||||
#[inline]
|
||||
|
@ -119,9 +125,24 @@ impl Duration {
|
|||
/// ```
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let five_seconds = Duration::new(5, 0);
|
||||
/// assert_eq!(five_seconds.as_secs(), 5);
|
||||
/// let duration = Duration::new(5, 730023852);
|
||||
/// assert_eq!(duration.as_secs(), 5);
|
||||
/// ```
|
||||
///
|
||||
/// To determine the total number of seconds represented by the `Duration`,
|
||||
/// use `as_secs` in combination with [`subsec_nanos`]:
|
||||
///
|
||||
/// ```
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let duration = Duration::new(5, 730023852);
|
||||
///
|
||||
/// assert_eq!(5.730023852,
|
||||
/// duration.as_secs() as f64
|
||||
/// + duration.subsec_nanos() as f64 * 1e-9);
|
||||
/// ```
|
||||
///
|
||||
/// [`subsec_nanos`]: #method.subsec_nanos
|
||||
#[stable(feature = "duration", since = "1.3.0")]
|
||||
#[inline]
|
||||
pub fn as_secs(&self) -> u64 { self.secs }
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4f994850808a572e2cc8d43f968893c8e942e9bf
|
||||
Subproject commit 4cf7397fb0566e745f0bce4c5b009cfeb5d12c53
|
|
@ -116,10 +116,26 @@ struct Target {
|
|||
available: bool,
|
||||
url: Option<String>,
|
||||
hash: Option<String>,
|
||||
xz_url: Option<String>,
|
||||
xz_hash: Option<String>,
|
||||
components: Option<Vec<Component>>,
|
||||
extensions: Option<Vec<Component>>,
|
||||
}
|
||||
|
||||
impl Target {
|
||||
fn unavailable() -> Target {
|
||||
Target {
|
||||
available: false,
|
||||
url: None,
|
||||
hash: None,
|
||||
xz_url: None,
|
||||
xz_hash: None,
|
||||
components: None,
|
||||
extensions: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(RustcEncodable)]
|
||||
struct Component {
|
||||
pkg: String,
|
||||
|
@ -242,16 +258,12 @@ impl Builder {
|
|||
let digest = match self.digests.remove(&filename) {
|
||||
Some(digest) => digest,
|
||||
None => {
|
||||
pkg.target.insert(host.to_string(), Target {
|
||||
available: false,
|
||||
url: None,
|
||||
hash: None,
|
||||
components: None,
|
||||
extensions: None,
|
||||
});
|
||||
pkg.target.insert(host.to_string(), Target::unavailable());
|
||||
continue
|
||||
}
|
||||
};
|
||||
let xz_filename = filename.replace(".tar.gz", ".tar.xz");
|
||||
let xz_digest = self.digests.remove(&xz_filename);
|
||||
let mut components = Vec::new();
|
||||
let mut extensions = Vec::new();
|
||||
|
||||
|
@ -293,8 +305,10 @@ impl Builder {
|
|||
|
||||
pkg.target.insert(host.to_string(), Target {
|
||||
available: true,
|
||||
url: Some(self.url("rust", host)),
|
||||
url: Some(self.url(&filename)),
|
||||
hash: Some(digest),
|
||||
xz_url: xz_digest.as_ref().map(|_| self.url(&xz_filename)),
|
||||
xz_hash: xz_digest,
|
||||
components: Some(components),
|
||||
extensions: Some(extensions),
|
||||
});
|
||||
|
@ -312,21 +326,17 @@ impl Builder {
|
|||
let filename = self.filename(pkgname, name);
|
||||
let digest = match self.digests.remove(&filename) {
|
||||
Some(digest) => digest,
|
||||
None => {
|
||||
return (name.to_string(), Target {
|
||||
available: false,
|
||||
url: None,
|
||||
hash: None,
|
||||
components: None,
|
||||
extensions: None,
|
||||
})
|
||||
}
|
||||
None => return (name.to_string(), Target::unavailable()),
|
||||
};
|
||||
let xz_filename = filename.replace(".tar.gz", ".tar.xz");
|
||||
let xz_digest = self.digests.remove(&xz_filename);
|
||||
|
||||
(name.to_string(), Target {
|
||||
available: true,
|
||||
url: Some(self.url(pkgname, name)),
|
||||
url: Some(self.url(&filename)),
|
||||
hash: Some(digest),
|
||||
xz_url: xz_digest.as_ref().map(|_| self.url(&xz_filename)),
|
||||
xz_hash: xz_digest,
|
||||
components: None,
|
||||
extensions: None,
|
||||
})
|
||||
|
@ -338,11 +348,11 @@ impl Builder {
|
|||
});
|
||||
}
|
||||
|
||||
fn url(&self, component: &str, target: &str) -> String {
|
||||
fn url(&self, filename: &str) -> String {
|
||||
format!("{}/{}/{}",
|
||||
self.s3_address,
|
||||
self.date,
|
||||
self.filename(component, target))
|
||||
filename)
|
||||
}
|
||||
|
||||
fn filename(&self, component: &str, target: &str) -> String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue