Skip to content

Rollup of 4 pull requests #41725

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

Closed
wants to merge 14 commits into from
Closed
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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -139,6 +139,7 @@ Margaret Meyerhofer <[email protected]> <mmeyerho@andrew>
Mark Sinclair <[email protected]>
Mark Sinclair <[email protected]> =Mark Sinclair <[email protected]>
Markus Westerlind <[email protected]> Markus <[email protected]>
Martin Hafskjold Thoresen <[email protected]>
Matej Lach <[email protected]> Matej Ľach <[email protected]>
Matt Brubeck <[email protected]> <[email protected]>
Matthew Auld <[email protected]>
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -95,7 +95,9 @@ matrix:
MACOSX_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode7
install: *osx_install_sccache
install:
- brew update && 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 +108,9 @@ matrix:
MACOSX_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode7
install: *osx_install_sccache
install:
- brew update && 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 +127,9 @@ matrix:
MACOSX_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode7
install: *osx_install_sccache
install:
- brew update && brew install xz
- *osx_install_sccache
env:
global:
10 changes: 6 additions & 4 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
@@ -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
29 changes: 25 additions & 4 deletions src/libstd/time/duration.rs
Original file line number Diff line number Diff line change
@@ -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 }
2 changes: 1 addition & 1 deletion src/rust-installer
50 changes: 30 additions & 20 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
@@ -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 {