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

Merged
merged 56 commits into from
Apr 1, 2015
Merged

Rolling up PRs in the queue #23936

merged 56 commits into from
Apr 1, 2015

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Apr 1, 2015

This is an attempt to fix test issue(s) discovered late in landing PR #23922

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
aturon and others added 8 commits March 31, 2015 16:22
const_eval : add overflow-checking for {`+`, `-`, `*`, `/`, `<<`, `>>`}.

One tricky detail here: There is some duplication of labor between `rustc::middle::const_eval` and `rustc_trans::trans::consts`. It might be good to explore ways to try to factor out the common structure to the two passes (by abstracting over the particular value-representation used in the compile-time interpreter).

----

Update: Rebased atop rust-lang#23841

Fix rust-lang#22531

Fix rust-lang#23030

Fix rust-lang#23221

Fix rust-lang#23235
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@pnkfelix
Copy link
Member Author

pnkfelix commented Apr 1, 2015

@bors r+ 2b71aed p=100

@pnkfelix
Copy link
Member Author

pnkfelix commented Apr 1, 2015

@bors force

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

bors commented Apr 1, 2015

⌛ Testing commit 2b71aed with merge 8943653...

@pnkfelix
Copy link
Member Author

pnkfelix commented Apr 1, 2015

(droid build passed! fingers crossed ...)

@alexcrichton
Copy link
Member

Thanks @pnkfelix for taking this over!

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.

None yet