about summary refs log tree commit diff
path: root/src/libsyntax/util/small_vector.rs
AgeCommit message (Collapse)AuthorLines
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-2/+2
2015-02-24Use arrays instead of vectors in testsVadim Petrochenkov-2/+2
2015-02-18make FromIterator use IntoIteratorAlexis-1/+1
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument). Users of FromIterator should be unaffected because Iterators are IntoIterator. [breaking-change]
2015-02-18make Extend use IntoIteratorAlexis-2/+2
This breaks all implementors of Extend, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument). Users of Extend should be unaffected because Iterators are IntoIterator. [breaking-change]
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-1/+1
2015-02-02remove unused mut qualifiersJorge Aparicio-1/+1
2015-01-31Kill more `isize`sTobias Bucher-11/+11
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-17/+17
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-23Deprecated attributes don't take 'feature' names and are paired with ↵Brian Anderson-1/+2
stable/unstable Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-1/+1
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-10/+10
2015-01-18libsyntax: int types -> isizePaul Collier-4/+4
2015-01-17libsyntax: uint types to usizePaul Collier-3/+3
2015-01-03syntax: fix falloutJorge Aparicio-3/+5
2015-01-02std: Stabilize the prelude moduleAlex Crichton-0/+2
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2014-12-22Renaming of the Iter types as in RFC #344Florian Wilkens-9/+9
libcore: slice::Items -> slice::Iter, slice::MutItems -> slice::IterMut libcollections: *::Items -> *::Iter, *::MoveItems -> *::IntoIter, *::MutItems -> *::IterMut This is of course a [breaking-change].
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-1/+1
2014-12-03Fix falloutJorge Aparicio-2/+2
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+2
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-08Renamed Extendable to Extendgamazeps-1/+1
In order to upgrade, simply rename the Extendable trait to Extend in your code Part of #18424 [breaking-change]
2014-11-01collections: Remove all collections traitsAlex Crichton-10/+10
As part of the collections reform RFC, this commit removes all collections traits in favor of inherent methods on collections themselves. All methods should continue to be available on all collections. This is a breaking change with all of the collections traits being removed and no longer being in the prelude. In order to update old code you should move the trait implementations to inherent implementations directly on the type itself. Note that some traits had default methods which will also need to be implemented to maintain backwards compatibility. [breaking-change] cc #18424
2014-10-29Rename fail! to panic!Steve Klabnik-3/+3
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-1/+1
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-09-16Fallout from renamingAaron Turon-7/+13
2014-09-14syntax: fold: use move semantics for efficient folding.Eduard Burtescu-1/+14
2014-08-26DST coercions and DST structsNick Cameron-1/+4
[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.
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-3/+3
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-8/+8
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]
2014-06-08core: Rename `container` mod to `collections`. Closes #12543Brian Anderson-1/+1
Also renames the `Container` trait to `Collection`. [breaking-change]
2014-04-22rustc: de-@ middle::ty.Eduard Burtescu-0/+9
2014-04-15Remove usage of private enum variantsAlex Crichton-25/+34
This replaces all uses of private enum variants with a struct that has one private field pointing at a private enum. RFC: 0006-remove-priv
2014-03-30Rename `from_iterator` to `from_iter` for consistency.Brian Anderson-2/+2
2014-03-25Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by ↵Marvin Löbel-6/+4
value
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-3/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-4/+4
Closes #12771
2014-03-04Expand nested items within a backtrace.Nick Cameron-0/+8
Fixes a regression from #4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-3/+7
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-12/+12
2014-02-19librustc: Remove unique vector patterns from the language.Patrick Walton-1/+7
Preparatory work for removing unique vectors from the language, which is itself preparatory work for dynamically sized types.
2014-02-14Expand ItemDecorator extensions in all contextsSteven Fackler-1/+7
Now that fold_item can return multiple items, this is pretty trivial. It also recursively expands generated items so ItemDecorators can generate items that are tagged with ItemDecorators! Closes #4913
2014-02-11Move replace and swap to std::mem. Get rid of std::utilEdward Wang-4/+4
Also move Void to std::any, move drop to std::mem and reexport in prelude.
2014-02-08Fixed error starting with uppercasemr.Shu-1/+1
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-01-18Rename iterators for consistencyPalmer Cox-5/+5
Rename existing iterators to get rid of the Iterator suffix and to give them names that better describe the things being iterated over.
2013-12-08Remove dead codesKiet Tran-1/+1
2013-11-28Register new snapshotsAlex Crichton-4/+4
2013-11-26Clean up SmallVector use a bitSteven Fackler-79/+27
2013-11-26Support multiple item macrosSteven Fackler-0/+28
Closes #4375
2013-11-26Add SmallVector to libsyntaxSteven Fackler-0/+213