about summary refs log tree commit diff
path: root/src/libcore/ops.rs
AgeCommit message (Collapse)AuthorLines
2015-01-07Impls using the new scheme for slicingNick Cameron-101/+0
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-1/+1
[breaking-change]
2015-01-06cleanup: use short AT notation (`Ty::Item` instead of `<Ty as Trait>::Item`)Jorge Aparicio-1/+1
2015-01-05Merge remote-tracking branch 'nrc/sized-2' into rollupAlex Crichton-12/+12
Conflicts: src/liballoc/boxed.rs src/libcollections/btree/map.rs src/libcollections/slice.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/libstd/collections/hash/map.rs src/libsyntax/parse/obsolete.rs src/test/compile-fail/unboxed-closure-sugar-default.rs src/test/compile-fail/unboxed-closure-sugar-equiv.rs src/test/compile-fail/unboxed-closure-sugar-lifetime-elision.rs src/test/compile-fail/unboxed-closure-sugar-region.rs src/test/compile-fail/unsized3.rs src/test/run-pass/associated-types-conditional-dispatch.rs
2015-01-05rollup merge of #20556: japaric/no-for-sizedAlex Crichton-8/+8
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/test/compile-fail/issue-19009.rs
2015-01-05rollup merge of #20560: aturon/stab-2-iter-ops-sliceAlex Crichton-0/+74
Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
2015-01-06FalloutNick Cameron-14/+14
2015-01-05Stabilization of impls and fallout from stabilizationAaron Turon-0/+4
2015-01-05register snapshotJorge Aparicio-20/+0
2015-01-05Stabilize core::opsAaron Turon-0/+70
This commit marks as stable those parts of `core::ops` that are in their final planned form: `Drop`, all of the mathematical operators (`Add`, `Sub`, etc), `Deref`/`DerefMut`. It leaves the `Index*`, `Slice*` and `Fn*` traits unstable, as they are still undergoing active changes.
2015-01-05sed -i -s 's/ for Sized?//g' **/*.rsJorge Aparicio-10/+10
2015-01-04Merge pull request #20500 from globin/fix/range-sugarbors-1/+1
Fix range sugar Reviewed-by: nick29581
2015-01-04fix range sugarRobin Gloster-1/+1
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-19/+19
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2015-01-03core: use assoc types in `Index[Mut]`Jorge Aparicio-6/+38
2015-01-03use assoc types in unop traitsJorge Aparicio-9/+27
2015-01-03use assoc types in binop traitsJorge Aparicio-43/+131
2015-01-03core: use assoc types in Iterator et alJorge Aparicio-4/+8
2015-01-02rollup merge of #20410: japaric/assoc-typesAlex Crichton-10/+24
Conflicts: src/liballoc/lib.rs src/libcollections/lib.rs src/libcollections/slice.rs src/libcore/ops.rs src/libcore/prelude.rs src/libcore/ptr.rs src/librustc/middle/traits/project.rs src/libstd/c_str.rs src/libstd/io/mem.rs src/libstd/io/mod.rs src/libstd/lib.rs src/libstd/path/posix.rs src/libstd/path/windows.rs src/libstd/prelude.rs src/libstd/rt/exclusive.rs src/libsyntax/lib.rs src/test/compile-fail/issue-18566.rs src/test/run-pass/deref-mut-on-ref.rs src/test/run-pass/deref-on-ref.rs src/test/run-pass/dst-deref-mut.rs src/test/run-pass/dst-deref.rs src/test/run-pass/fixup-deref-mut.rs src/test/run-pass/issue-13264.rs src/test/run-pass/overloaded-autoderef-indexing.rs
2015-01-02core: use assoc types in `Deref[Mut]`Jorge Aparicio-10/+22
2015-01-02std: Stabilize the prelude moduleAlex Crichton-4/+42
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-30Register new snapshotsAlex Crichton-99/+0
2014-12-30Add hypothetical support for ranges with only an upper boundNick Cameron-0/+8
Note that this doesn't add the surface syntax.
2014-12-24Review changesNick Cameron-59/+19
2014-12-24Add lang items for ranges.Nick Cameron-0/+3
2014-12-24Add structs for ranges to core::ops.Nick Cameron-0/+113
2014-12-21rollup merge of #19972: alexcrichton/snapshotsAlex Crichton-437/+0
Conflicts: src/libcollections/string.rs src/libcollections/vec.rs src/snapshots.txt
2014-12-19Register new snapshotsAlex Crichton-437/+0
This does not yet start the movement to rustc-serialize. That detail is left to a future PR.
2014-12-19libcore: use `#[deriving(Copy)]`Jorge Aparicio-32/+16
2014-12-18libcore: convert unop traits to by valueJorge Aparicio-0/+100
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-69/+69
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-13libcore: fix doctestsJorge Aparicio-22/+22
2014-12-13libcore: convert binop traits to by valueJorge Aparicio-0/+437
2014-12-11auto merge of #19672 : alexcrichton/rust/snapshots, r=brsonbors-50/+0
These snapshots were generated on the 10.7 bot which should be the first step in fixing #19643
2014-12-11Register new snapshotsAlex Crichton-50/+0
2014-12-10auto merge of #19573 : apasel422/rust/sized_fn_once, r=alexcrichtonbors-2/+2
- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes `self` by value and can never be implemented by an unsized type. - Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl, as both `Fn` and `FnMut` are `for Sized?`.
2014-12-09auto merge of #19644 : pcwalton/rust/oibit3, r=nikomatsakisbors-0/+32
2014-12-08Revert "Register new snapshots"Alex Crichton-0/+50
This reverts commit 9b443289cf32cbcff16768614340f0c844675340.
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+32
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-05Register new snapshotsAlex Crichton-50/+0
2014-12-05libcore: Fix `Sized` bounds on overloaded function traits.Andrew Paseltiner-2/+2
- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes `self` by value and can never be implemented by an unsized type. - Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl, as both `Fn` and `FnMut` are `for Sized?`.
2014-12-05rollup merge of #19520: csouth3/derefmut-unsizedCorey Richardson-1/+1
Right now, `DerefMut` is not `for Sized?`, so you can't impl `DerefMut<T> for Foo` where `Foo` is unsized. However, there is no reason that it can't be `for Sized?`, so this pull request fixes the issue. Closes #19493.
2014-12-04`DerefMut` should be `for Sized?`Chase Southwood-1/+1
2014-12-04Implement the `Fn` trait for bare fn pointers in the compiler rather than ↵Niko Matsakis-38/+42
doing it using hard-coded impls. This means that it works also for more complex fn types involving bound regions. Fixes #19126.
2014-11-26rollup merge of #19329: steveklabnik/doc_style_cleanup2Alex Crichton-46/+42
2014-11-26/*! -> //!Steve Klabnik-46/+42
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-25/** -> ///Steve Klabnik-497/+440
This is considered good convention.
2014-11-20libcore: DSTify ops traits, EquivAaron Turon-19/+19
This commit relaxes constraints on generics and traits within the `core::ops` module and for the `Equiv` trait.
2014-11-17Further DSTify Index traitsAaron Turon-2/+2