| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This commit is another in the series of vector slice API
stabilization. The focus here is the *mutable* slice API.
Largely, this API inherits the stability attributes [previously
assigned](https://github.com/rust-lang/rust/pull/16332) to the analogous
methods on immutable slides. It also adds comments to a few `unstable`
attributes that were previously missing them.
In addition, the commit adds several `_mut` variants of APIs that were
missing:
- `init_mut`
- `head_mut`
- `tail_mut`
- `splitn_mut`
- `rsplitn_mut`
Some of the unsafe APIs -- `unsafe_set`, `init_elem`, and `copy_memory`
-- were deprecated in favor of working through `as_mut_ptr`, to simplify
the API surface.
Due to deprecations, this is a:
[breaking-change]
|
|
Moves the vast majority of builtin bound checking out of type contents and into the trait system.
This is a preliminary step for a lot of follow-on work:
- opt-in builtin types, obviously
- generalized where clauses, because TypeContents has this notion that a type parameter has a single set of builtin kinds, but with where clauses it depends on context
- generalized coherence, because this adds support for recursive trait selection
Unfortunately I wasn't able to completely remove Type Contents from the front-end checking in this PR. It's still used by EUV to decide what gets moved and what doesn't.
r? @pcwalton
|
|
Intended to prevent each user to write his own partial_min/max, possibly differing in slight details. @sfackler encouraged to PR this on IRC.
(Let's hope this works... First PR.)
|
|
Given that the `Default` module is now stable, it might as well get good docs.
|
|
OrdIterator: the doc says that values must implement `PartialOrd`, while the implementation is only for `Ord` values. It looks like this initially got out of sync in 4e1c215. Removed the doc sentence entirely since it seems redundant.
MultiplicativeIterator: Fixed weird sentence.
|
|
Add partial_min/max to libcore/cmp
Match against None and mark as experimental
Shortened documentation.
Removed whitespace
|
|
|
|
r=alexcrichton
This is a PR for #16114 and includes to following things:
* Rename `begin_unwind` lang item to `fail_fmt`
* Rename `core::failure::begin_unwind` to `fail_impl`
* Rename `fail_` lang item to `fail`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OrdIterator: the doc says that values must implement `PartialOrd`, while the implementation is only for `Ord` values. It looks like this initially got out of sync in 4e1c215. Removed the doc sentence entirely since it seems redundant.
MultiplicativeIterator: Fixed weird sentence.
|
|
Fixes #17445.
|
|
This breaks code like:
struct Foo {
...
}
pub fn make_foo() -> Foo {
...
}
Change this code to:
pub struct Foo { // note `pub`
...
}
pub fn make_foo() -> Foo {
...
}
The `visible_private_types` lint has been removed, since it is now an
error to attempt to expose a private type in a public API. In its place
a `#[feature(visible_private_types)]` gate has been added.
Closes #16463.
RFC #48.
[breaking-change]
|
|
Fixes #17445.
|
|
Fallout of closing #17185.
|
|
Also some cleanup to conform to documentation style.
|
|
`expr[]`, `expr[expr..]`, `expr[..expr]`,`expr[expr..expr]`
Uses the Slice and SliceMut traits.
Allows ... as well as .. in range patterns.
|
|
|
|
|
|
|
|
|
|
|
|
Remove ~~~ for code block specification. Use /// Over /** */ for doc
blocks.
|
|
This is the first linux snapshot created on our new CentOS 5.10 builders.
Closes #9545
|
|
|
|
As per [RFC
52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md),
use `_mut` suffixes to mark mutable variants, and `into_iter` for moving
iterators.
[breaking-change]
|
|
This isn't ready to merge yet.
The 'containers and iterators' guide is basically just a collection of stuff that should be in the module definitions. So I'm moving the guide to just an 'iterators' guide, and moved the info that was there into the right places.
So, is this a good path forward, and is all of the information still correct?
|
|
|
|
This isn't really what guides are for, this information belongs in the
module-level docs.
Fixes #9314.
|
|
|
|
This switches win64 hosts to bootstrap from win64 snaps.
|
|
|
|
|
|
Based on an observation that strings and arguments are always interleaved, thanks to #15832. Additionally optimize invocations where formatting parameters are unspecified for all arguments, e.g. `"{} {:?} {:x}"`, by emptying the `__STATIC_FMTARGS` array. Next, `Arguments::new` replaces an empty slice with `None` so that passing empty `__STATIC_FMTARGS` generates slightly less machine code when `Arguments::new` is inlined. Furthermore, formatting itself treats these cases separately without making redundant copies of formatting parameters.
All in all, this adds a single mov instruction per `write!` in most cases. That's why code size has increased.
|
|
Format specs are ignored and not stored in case they're all default.
Restore default formatting parameters during iteration.
Pass `None` instead of empty slices of format specs to take advantage
of non-nullable pointer optimization.
Generate a call to one of two functions of `fmt::Argument`.
|
|
|
|
|
|
|
|
Breaks `iterate(f, seed)`, use `iterate(seed, f)` instead.
The convention is to have the closure last.
Closes #17066.
[breaking-change]
|
|
Fixes rust-lang/rfcs#224
|
|
From the discussion on reddit:
http://www.reddit.com/r/rust/comments/2fenlg/benchmark_improvement_fannkuchredux/
This adds two variants: the primary, that uses an unsafe block, and a secondary
that is completely safe.
The one with the unsafe block matches clang's performance and beats gcc's.
|
|
This makes the completely safe implementation of fannkuchredux perform
the same as C++. Yay, Rust.
|
|
Fixes rust-lang/rfcs#224
|
|
|
|
r=alexcrichton
I corrected spelling and capitalization errors in comments and strings.
|