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

Rolling up PRs in the queue #23922

Merged
merged 55 commits into from
Apr 1, 2015
Merged

Rolling up PRs in the queue #23922

merged 55 commits into from
Apr 1, 2015

Conversation

alexcrichton
Copy link
Member

No description provided.

hirschenberger and others added 30 commits March 25, 2015 16:10
This commit stabilizes the platform-specific `io` modules, specifically around
the traits having to do with the raw representation of each object on each
platform.

Specifically, the following material was stabilized:

* `AsRaw{Fd,Socket,Handle}`
* `RawFd` (renamed from `Fd`)
* `RawHandle` (renamed from `Handle`)
* `RawSocket` (renamed from `Socket`)
* `AsRaw{Fd,Socket,Handle}` implementations
* `std::os::{unix, windows}::io`

The following material was added as `#[unstable]`:

* `FromRaw{Fd,Socket,Handle}`
* Implementations for various primitives

There are a number of future improvements that are possible to make to this
module, but this should cover a good bit of functionality desired from these
modules for now. Some specific future additions may include:

* `IntoRawXXX` traits to consume the raw representation and cancel the
  auto-destructor.
* `Fd`, `Socket`, and `Handle` abstractions that behave like Rust objects and
  have nice methods for various syscalls.

At this time though, these are considered backwards-compatible extensions and
will not be stabilized at this time.

This commit is a breaking change due to the addition of `Raw` in from of the
type aliases in each of the platform-specific modules.

[breaking-change]
This commit stabilizes the following APIs:

* `TypeId::of` - now that it has an `Any` bound it's ready to be stable.
* `Box<Any>::downcast` - now that an inherent impl on `Box<Any>` as well as
  `Box<Any+Send>` is allowed the `BoxAny` trait is removed in favor of these
  inherent methods.

This is a breaking change due to the removal of the `BoxAny` trait, but
consumers can simply remove imports to fix crates.

[breaking-change]
This removes the FromError trait, since it can now be expressed using
the new convert::Into trait. All implementations of FromError<E> where
changed to From<E>, and `try!` was changed to use From::from instead.

Because this removes FromError, it is a breaking change, but fixing it
simply requires changing the words `FromError` to `From`, and
`from_error` to `from`.

[breaking-change]
Previously 0b12 was considered two tokens, 0b1 and 2, as 2 isn't a valid
base 2 digit. This patch changes that to collapse them into one (and
makes `0b12` etc. an error: 2 isn't a valid base 2 digit).

This may break some macro invocations of macros with `tt` (or syntax
extensions) that rely on adjacent digits being separate tokens and hence
is a

[breaking-change]

The fix is to separate the tokens, e.g. `0b12` -> `0b1 2`.

cc rust-lang/rfcs#879
Removed duplicate words
This commit stabilizes the `std::num` module:

* The `Int` and `Float` traits are deprecated in favor of (1) the
  newly-added inherent methods and (2) the generic traits available in
  rust-lang/num.

* The `Zero` and `One` traits are reintroduced in `std::num`, which
  together with various other traits allow you to recover the most
  common forms of generic programming.

* The `FromStrRadix` trait, and associated free function, is deprecated
  in favor of inherent implementations.

* A wide range of methods and constants for both integers and floating
  point numbers are now `#[stable]`, having been adjusted for integer
  guidelines.

* `is_positive` and `is_negative` are renamed to `is_sign_positive` and
  `is_sign_negative`, in order to address rust-lang#22985

* The `Wrapping` type is moved to `std::num` and stabilized;
  `WrappingOps` is deprecated in favor of inherent methods on the
  integer types, and direct implementation of operations on
  `Wrapping<X>` for each concrete integer type `X`.

Closes rust-lang#22985
Closes rust-lang#21069

[breaking-change]

r? @alexcrichton
* Marks `#[stable]` the contents of the `std::convert` module.

* Added methods `PathBuf::as_path`, `OsString::as_os_str`,
  `String::as_str`, `Vec::{as_slice, as_mut_slice}`.

* Deprecates `OsStr::from_str` in favor of a new, stable, and more
  general `OsStr::new`.

* Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
  to_cstring}` for ergonomic FFI usage.

[breaking-change]
Remove broken links that should just point to the current page, and while we're at it, re-wrap to 100 chars.
This is a deprecated attribute that is slated for removal, and it also affects
all implementors of the trait. This commit removes the attribute and fixes up
implementors accordingly. The primary implementation which was lost was the
ability to compare `&[T]` and `Vec<T>` (in that order).

This change also modifies the `assert_eq!` macro to not consider both directions
of equality, only the one given in the left/right forms to the macro. This
modification is motivated due to the fact that `&[T] == Vec<T>` no longer
compiles, causing hundreds of errors in unit tests in the standard library (and
likely throughout the community as well).

cc rust-lang#19470
[breaking-change]
This commit is an implementation of [RFC rust-lang#1011][rfc] which adds an `exit`
function to the standard library for immediately terminating the current process
with a specified exit code.

[rfc]: rust-lang/rfcs#1011
* The `io::Seek` trait, and `SeekFrom` enum.
* The `Iterator::{partition, unsip}` methods.
* The `Vec::into_boxed_slice` method.
* The `LinkedList::append` method.
* The `{or_insert, or_insert_with` methods in the `Entry` APIs.
This commit stabilizes the platform-specific `io` modules, specifically around
the traits having to do with the raw representation of each object on each
platform.

Specifically, the following material was stabilized:

* `AsRaw{Fd,Socket,Handle}`
* `RawFd` (renamed from `Fd`)
* `RawHandle` (renamed from `Handle`)
* `RawSocket` (renamed from `Socket`)
* `AsRaw{Fd,Socket,Handle}` implementations
* `std::os::{unix, windows}::io`

The following material was added as `#[unstable]`:

* `FromRaw{Fd,Socket,Handle}`
* Implementations for various primitives

There are a number of future improvements that are possible to make to this
module, but this should cover a good bit of functionality desired from these
modules for now. Some specific future additions may include:

* `IntoRawXXX` traits to consume the raw representation and cancel the
  auto-destructor.
* `Fd`, `Socket`, and `Handle` abstractions that behave like Rust objects and
  have nice methods for various syscalls.

At this time though, these are considered backwards-compatible extensions and
will not be stabilized at this time.

This commit is a breaking change due to the addition of `Raw` in from of the
type aliases in each of the platform-specific modules.

[breaking-change]
This commit stabilizes the following APIs:

* `TypeId::of` - now that it has an `Any` bound it's ready to be stable.
* `Box<Any>::downcast` - now that an inherent impl on `Box<Any>` as well as
  `Box<Any+Send>` is allowed the `BoxAny` trait is removed in favor of these
  inherent methods.

This is a breaking change due to the removal of the `BoxAny` trait, but
consumers can simply remove imports to fix crates.

[breaking-change]
`min`-like functions now return the leftmost element/input for equal elements.
`max`-like return the rightmost.

Closes rust-lang#23687.

cc @HeroesGrave, @aturon, @alexcrichton
Just one or two things to finish this module off
@alexcrichton
Copy link
Member Author

@bors: r+ f5edb39 force

@bors
Copy link
Contributor

bors commented Apr 1, 2015

⌛ Testing commit f5edb39 with merge 77043c9...

@bors
Copy link
Contributor

bors commented Apr 1, 2015

💔 Test failed - auto-win-64-nopt-t

@alexcrichton
Copy link
Member Author

@bors: r+ force

@bors
Copy link
Contributor

bors commented Apr 1, 2015

📌 Commit e142019 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 1, 2015

⌛ Testing commit e142019 with merge f65dc90...

@alexcrichton
Copy link
Member Author

@bors: r+ 07d5401 force

@bors
Copy link
Contributor

bors commented Apr 1, 2015

⌛ Testing commit 07d5401 with merge 66da436...

@alexcrichton
Copy link
Member Author

@bors: r+ 94bc636 force

@bors
Copy link
Contributor

bors commented Apr 1, 2015

⌛ Testing commit 94bc636 with merge f82b3e8...

@bors
Copy link
Contributor

bors commented Apr 1, 2015

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member Author

@bors: r+ 8dff0ac force

@bors
Copy link
Contributor

bors commented Apr 1, 2015

⌛ Testing commit 8dff0ac with merge e9b95f0...

@bors
Copy link
Contributor

bors commented Apr 1, 2015

💔 Test failed - auto-linux-64-x-android-t

@Manishearth
Copy link
Member

test result: ok. 15 passed; 0 failed; 3 ignored; 0 measured

rustc: x86_64-unknown-linux-gnu/stage2/test/libctest-arm-linux-androideabi
run: x86_64-unknown-linux-gnu/stage2/test/libctest-arm-linux-androideabi via adb
1597 KB/s (1348596 bytes in 0.824s)

running 1 test
test work_on_windows ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

0 KB/s (19 bytes in 0.078s)
rustc: x86_64-unknown-linux-gnu/stage2/test/stdtest-arm-linux-androideabi
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/old_io/process.rs:1077:17: 1077:26 error: failed to resolve. Use of undeclared type or module `env`
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/old_io/process.rs:1077         let r = env::vars();
                                                                                                                          ^~~~~~~~~
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/old_io/process.rs:1077:17: 1077:26 error: unresolved name `env::vars`
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/old_io/process.rs:1077         let r = env::vars();
                                                                                                                          ^~~~~~~~~
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/process.rs:841:17: 841:24 error: unresolved name `os::env`
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-x-android-t/build/src/libstd/process.rs:841         let r = os::env();
                                                                                                                  ^~~~~~~
error: aborting due to 3 previous errors
make: *** [x86_64-unknown-linux-gnu/stage2/test/stdtest-arm-linux-androideabi] Error 101

bors added a commit that referenced this pull request Apr 1, 2015
@pnkfelix
Copy link
Member

pnkfelix commented Apr 1, 2015

I attempted to fix the android problem noted by @Manishearth above in a separate commit atop this commit sequence; see #23936

@bors bors merged commit 8dff0ac into rust-lang:master Apr 1, 2015
@alexcrichton alexcrichton deleted the rollup branch April 1, 2015 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.