| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Fix #17817.
|
|
|
|
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
|
|
This reverts commit df2f1fa7680a86ba228f004e7de731e91a1df1fe.
|
|
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
|
|
This reverts commit 6e0611a48707a1f5d90aee32a02b2b15957ef25b.
|
|
This also requires a fix for Vec's MoveItems. This resolves issue #16941
|
|
|
|
[breaking-change]
If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
|
|
Deprecates slicing methods from ImmutableSlice/MutableSlice in favour of slicing syntax or the methods in Slice/SliceMut.
Closes #17273.
|
|
|
|
|
|
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]
|
|
Fallout of closing #17185.
|
|
`expr[]`, `expr[expr..]`, `expr[..expr]`,`expr[expr..expr]`
Uses the Slice and SliceMut traits.
Allows ... as well as .. in range patterns.
|
|
|
|
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 makes the completely safe implementation of fannkuchredux perform
the same as C++. Yay, Rust.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[breaking-change]
1. The internal layout for traits has changed from (vtable, data) to (data, vtable). If you were relying on this in unsafe transmutes, you might get some very weird and apparently unrelated errors. You should not be doing this! Prefer not to do this at all, but if you must, you should use raw::TraitObject rather than hardcoding rustc's internal representation into your code.
2. The minimal type of reference-to-vec-literals (e.g., `&[1, 2, 3]`) is now a fixed size vec (e.g., `&[int, ..3]`) where it used to be an unsized vec (e.g., `&[int]`). If you want the unszied type, you must explicitly give the type (e.g., `let x: &[_] = &[1, 2, 3]`). Note in particular where multiple blocks must have the same type (e.g., if and else clauses, vec elements), the compiler will not coerce to the unsized type without a hint. E.g., `[&[1], &[1, 2]]` used to be a valid expression of type '[&[int]]'. It no longer type checks since the first element now has type `&[int, ..1]` and the second has type &[int, ..2]` which are incompatible.
3. The type of blocks (including functions) must be coercible to the expected type (used to be a subtype). Mostly this makes things more flexible and not less (in particular, in the case of coercing function bodies to the return type). However, in some rare cases, this is less flexible. TBH, I'm not exactly sure of the exact effects. I think the change causes us to resolve inferred type variables slightly earlier which might make us slightly more restrictive. Possibly it only affects blocks with unreachable code. E.g., `if ... { fail!(); "Hello" }` used to type check, it no longer does. The fix is to add a semicolon after the string.
|
|
of `use bar as foo`.
Change all uses of `use foo = bar` to `use bar as foo`.
Implements RFC #47.
Closes #16461.
[breaking-change]
|
|
|
|
Much of this is as discussed[1]. Many things are marked
[1]: https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-08-06.md
|
|
These are like the existing bsearch methods but if the search fails,
it returns the next insertion point.
The new `binary_search` returns a `BinarySearchResult` that is either
`Found` or `NotFound`. For convenience, the `found` and `not_found`
methods convert to `Option`, ala `Result`.
Deprecate bsearch and bsearch_elem.
|
|
This is in the prelude and won't break much code.
[breaking-change]
|
|
Deprecate the previous.
|
|
These are equivalent to slice_from and slice_to.
|
|
Deprecate the previous.
|
|
This required some contortions because importing both raw::Slice
and slice::Slice makes rustc crash.
Since `Slice` is in the prelude, this renaming is unlikely to
casue breakage.
[breaking-change]
|
|
ImmutableVector -> ImmutableSlice
ImmutableEqVector -> ImmutableEqSlice
ImmutableOrdVector -> ImmutableOrdSlice
MutableVector -> MutableSlice
MutableVectorAllocating -> MutableSliceAllocating
MutableCloneableVector -> MutableCloneableSlice
MutableOrdVector -> MutableOrdSlice
These are all in the prelude so most code will not break.
[breaking-change]
|
|
This method is similar to the mut_split_at method of slice::MutableVector.
|
|
|
|
This is only breaking for code that references the empty `slice::traits`
module.
[breaking-change]
|
|
This is just moving things around so they are defined in a logical order.
|
|
I ended up altering the semantics of Json's PartialOrd implementation.
It used to be the case that Null < Null, but I can't think of any reason
for an ordering other than the default one so I just switched it over to
using the derived implementation.
This also fixes broken `PartialOrd` implementations for `Vec` and
`TreeMap`.
RFC: 0028-partial-cmp
|
|
Libcore's test infrastructure is complicated by the fact that many lang
items are defined in the crate. The current approach (realcore/realstd
imports) is hacky and hard to work with (tests inside of core::cmp
haven't been run for months!).
Moving tests to a separate crate does mean that they can only test the
public API of libcore, but I don't feel that that is too much of an
issue. The only tests that I had to get rid of were some checking the
various numeric formatters, but those are also exercised through normal
format! calls in other tests.
|
|
|
|
This breaks a fair amount of code. The typical patterns are:
* `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`;
* `println!("{}", 3)`: change to `println!("{}", 3i)`;
* `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`.
RFC #30. Closes #6023.
[breaking-change]
|
|
|