| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Conflicts:
src/libcore/ops.rs
src/librustc_typeck/astconv.rs
src/libstd/io/mem.rs
src/libsyntax/parse/lexer/mod.rs
|
|
|
|
Conflicts:
src/liballoc/boxed.rs
src/librustc/middle/traits/error_reporting.rs
src/libstd/sync/mpsc/mod.rs
|
|
Conflicts:
src/libstd/sync/mpsc/select.rs
|
|
Conflicts:
src/libstd/sync/mpsc/mod.rs
|
|
r? @alexcrichton
|
|
Conflicts:
src/libstd/io/mod.rs
|
|
This just corrects a couple of typos in doc comments, and changes some to conform to the Rust guidelines.
|
|
Initial support for aarch64-linux-android (#18920)
- Add new configuration files
- Modify some options to compile & link succesfully.
(PIE, disable tls on jemalloc, modify some external function linkage, ..)
- To build, refer to https://github.com/rust-lang/rust/wiki/Doc-building-for-android.
(tested with platform=21 and toolchain=aarch64-linux-android-4.9)
|
|
Conflicts:
src/libsyntax/parse/lexer/comments.rs
|
|
Fixes #20943 and adds a test for it
r? @alexcrichton
|
|
|
|
This commit is an implementation of [RFC 565][rfc] which is a stabilization of
the `std::fmt` module and the implementations of various formatting traits.
Specifically, the following changes were performed:
[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md
* The `Show` trait is now deprecated, it was renamed to `Debug`
* The `String` trait is now deprecated, it was renamed to `Display`
* Many `Debug` and `Display` implementations were audited in accordance with the
RFC and audited implementations now have the `#[stable]` attribute
* Integers and floats no longer print a suffix
* Smart pointers no longer print details that they are a smart pointer
* Paths with `Debug` are now quoted and escape characters
* The `unwrap` methods on `Result` now require `Display` instead of `Debug`
* The `Error` trait no longer has a `detail` method and now requires that
`Display` must be implemented. With the loss of `String`, this has moved into
libcore.
* `impl<E: Error> FromError<E> for Box<Error>` now exists
* `derive(Show)` has been renamed to `derive(Debug)`. This is not currently
warned about due to warnings being emitted on stage1+
While backwards compatibility is attempted to be maintained with a blanket
implementation of `Display` for the old `String` trait (and the same for
`Show`/`Debug`) this is still a breaking change due to primitives no longer
implementing `String` as well as modifications such as `unwrap` and the `Error`
trait. Most code is fairly straightforward to update with a rename or tweaks of
method calls.
[breaking-change]
Closes #21436
|
|
r? @alexcrichton
|
|
|
|
|
|
r? @alexcrichton
|
|
After PR #19766 added implicit coersions `*mut T -> *const T`, the explicit casts can be removed.
(The number of such casts turned out to be relatively small).
|
|
From std::markers to std::marker.
|
|
Two errors in `std::sync` are currently missing implementations of the standard error trait because they contain types which aren't `Send`.
This PR therefore requires #21312.
|
|
As discussed with @aturon, this PR removes the `Send` bound from `std::error::Error`, allowing us to implement `Error` for error types containing non-`Send` types. Current examples include `PoisonError` and `TryLockError` from `std::sync` which contain a Guard that we don't want sent between tasks.
[breaking-change]
|
|
|
|
There are a large number of places that incorrectly refer
to deriving in comments, instead of derives.
If someone could look at src/etc/generate-deriving-span-tests.py,
I'm not sure how those tests were passing before/if they were.
|
|
|
|
This just corrects a couple of typos in doc comments, and changes some to conform to the Rust guidelines.
|
|
|
|
Part of collections reform v1, #18424
Also, iteration is simplified:
```
before
test btree::map::bench::iter_1000 ... bench: 17177 ns/iter (+/- 6302)
test btree::map::bench::iter_100000 ... bench: 1735731 ns/iter (+/- 23908)
test btree::map::bench::iter_20 ... bench: 386 ns/iter (+/- 148)
after
test btree::map::bench::iter_1000 ... bench: 15777 ns/iter (+/- 346)
test btree::map::bench::iter_100000 ... bench: 1602604 ns/iter (+/- 73629)
test btree::map::bench::iter_20 ... bench: 339 ns/iter (+/- 91)
```
cc @gereeter @cgaebel
r? @Gankro
|
|
|
|
|
|
Simplify BTree's iterators, too.
|
|
Fixes #20943
Signed-off-by: Peter Atashian <retep998@gmail.com>
|
|
Signed-off-by: Peter Atashian <retep998@gmail.com>
|
|
|
|
This is a [breaking-change] since `std::dynamic_lib::dl` is now
private.
When `LoadLibraryW()` fails, original code called `errno()` to get error
code. However, there was local allocation of `Vec` before
`LoadLibraryW()`, and it drops before `errno()`, and the drop
(deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought
it always succeeded.
This commit fixes the issue.
This commit also sets Windows error mode during `LoadLibrary()` to
prevent "dll load failed" dialog.
|
|
From std::markers to std::marker.
|
|
Lets them build with the -dev, -nightly, or snapshot compiler
|
|
|
|
|
|
|
|
There are a large number of places that incorrectly refer
to deriving in comments, instead of derives.
Fixes #20984
|
|
|
|
|
|
In accordance with [collections reform part 2][rfc] this macro has been moved to
an external [bitflags crate][crate] which is [available though
crates.io][cratesio]. Inside the standard distribution the macro has been moved
to a crate called `rustc_bitflags` for current users to continue using.
[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
[crate]: https://github.com/rust-lang/bitflags
[cratesio]: http://crates.io/crates/bitflags
The major user of `bitflags!` in terms of a public-facing possibly-stable API
today is the `FilePermissions` structure inside of `std::io`. This user,
however, will likely no longer use `bitflags!` after I/O reform has landed. To
prevent breaking APIs today, this structure remains as-is.
Current users of the `bitflags!` macro should add this to their `Cargo.toml`:
bitflags = "0.1"
and this to their crate root:
#[macro_use] extern crate bitflags;
Due to the removal of a public macro, this is a:
[breaking-change]
|
|
I searched for times when we were hiding functions with # in the documentation,
and fixed them to not use it unless neccesary.
I also made random improvements whenever I changed something. For example,
I changed Example to Examples, for consistency.
Fixes #13423
|
|
|
|
**The implementation is a direct adaptation of libcxx's condition_variable implementation.**
I also added a wait_timeout_with method, which matches the second overload in C++'s condition_variable. The implementation right now is kind of dumb but it works. There is an outstanding issue with it: as is it doesn't support the use case where a user doesn't care about poisoning and wants to continue through poison.
r? @alexcrichton @aturon
|
|
**The implementation is a direct adaptation of libcxx's
condition_variable implementation.**
pthread_cond_timedwait uses the non-monotonic system clock. It's
possible to change the clock to a monotonic via pthread_cond_attr, but
this is incompatible with static initialization. To deal with this, we
calculate the timeout using the system clock, and maintain a separate
record of the start and end times with a monotonic clock to be used for
calculation of the return value.
|
|
This PR adds rules for negative implementations. It follows pretty much what the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md) says with 1 main difference:
Instead of positive implementations override negative implementations, this have been implemented in a way that a negative implementation of `Trait` for `T` will overlap with a positive implementation, causing a coherence error.
@nikomatsakis r?
cc #13231
[breaking-change]
|
|
|