about summary refs log tree commit diff
path: root/src/libcore/kinds.rs
AgeCommit message (Collapse)AuthorLines
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-298/+0
[breaking-change]
2015-01-05Merge remote-tracking branch 'nrc/sized-2' into rollupAlex Crichton-9/+9
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-06FalloutNick Cameron-9/+9
2015-01-05sed -i -s 's/ for Sized?//g' **/*.rsJorge Aparicio-4/+4
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-10/+10
2014-12-26Make Send and Sync traits unsafeFlavio Percoco-2/+2
2014-12-21rollup merge of #20014: kballard/unsized-marker-type-paramsAlex Crichton-10/+20
Tweak CovariantType, ContravariantType, and InvariantType to allow their type parameter to be unsized.
2014-12-21rollup merge of #19838: shepmaster/invariant-lifetime-copyAlex Crichton-3/+1
Both ContravariantLifetime and CovariantLifetime are marked as Copy, so it makes sense for InvariantLifetime to be as well.
2014-12-19libcore: use `#[deriving(Copy)]`Jorge Aparicio-6/+2
2014-12-19Allow marker types to have unsized parametersKevin Ballard-10/+20
Tweak CovariantType, ContravariantType, and InvariantType to allow their type parameter to be unsized.
2014-12-17Use #[deriving(Copy)] for InvariantLifetimeJake Goulding-3/+1
2014-12-17rollup merge of #19860: japaric/copy-markersAlex Crichton-4/+2
Necessary to implement `Copy` on structs like this one: ``` rust struct Slice<'a, T> { _contravariant: marker::ContravariantLifetime<'a>, _nosend: marker::NoSend, data: *const T, length: uint, } ``` r? @alexcrichton
2014-12-14impl `Copy` for `NoSend`/`NoSync`Jorge Aparicio-4/+2
2014-12-14InvariantLifetime is Copy-ableJake Goulding-0/+2
Both ContravariantLifetime and CovariantLifetime are marked as Copy, so it makes sense for InvariantLifetime to be as well.
2014-12-12Switch to using predicates to drive checking. Correct various tests --Niko Matsakis-1/+1
in most cases, just the error message changed, but in some cases we are reporting new errors that OUGHT to have been reported before but we're overlooked (mostly involving the `'static` bound on `Send`).
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+17
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-11-26/*! -> //!Steve Klabnik-11/+8
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-17Implement more basic traits for the marker types.Huon Wilson-10/+10
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-3/+0
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-25Integrate builtin bounds fully into the trait checkerNiko Matsakis-4/+4
2014-09-05Update language item from 'share' to 'sync' #16988Felix Raimundo-1/+1
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-1/+1
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
2014-08-15Register new snapshotsAlex Crichton-7/+0
Hopefully this will fix #16489!
2014-08-08auto merge of #16285 : alexcrichton/rust/rename-share, r=huonwbors-16/+25
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-07Rename `Share` to `Sync`Alex Crichton-16/+25
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-05Remove references to `~[]` in core::kinds::marker docs.nham-2/+2
2014-07-26std: Stabilize unit, bool, ty, tuple, arc, anyAlex Crichton-1/+1
This commit applies stability attributes to the contents of these modules, summarized here: * The `unit` and `bool` modules have become #[unstable] as they are purely meant for documentation purposes and are candidates for removal. * The `ty` module has been deprecated, and the inner `Unsafe` type has been renamed to `UnsafeCell` and moved to the `cell` module. The `marker1` field has been removed as the compiler now always infers `UnsafeCell` to be invariant. The `new` method i stable, but the `value` field, `get` and `unwrap` methods are all unstable. * The `tuple` module has its name as stable, the naming of the `TupleN` traits as stable while the methods are all #[unstable]. The other impls in the module have appropriate stability for the corresponding trait. * The `arc` module has received the exact same treatment as the `rc` module previously did. * The `any` module has its name as stable. The `Any` trait is also stable, with a new private supertrait which now contains the `get_type_id` method. This is to make the method a private implementation detail rather than a public-facing detail. The two extension traits in the module are marked #[unstable] as they will not be necessary with DST. The `is` method is #[stable], the as_{mut,ref} methods have been renamed to downcast_{mut,ref} and are #[unstable]. The extension trait `BoxAny` has been clarified as to why it is unstable as it will not be necessary with DST. This is a breaking change because the `marker1` field was removed from the `UnsafeCell` type. To deal with this change, you can simply delete the field and only specify the value of the `data` field in static initializers. [breaking-change]
2014-06-28Rename all raw pointers as necessaryAlex Crichton-1/+1
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-10/+10
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-22Spelling/doc formatting fixes.Huon Wilson-1/+1
2014-05-11core: Remove the cast moduleAlex Crichton-4/+4
This commit revisits the `cast` module in libcore and libstd, and scrutinizes all functions inside of it. The result was to remove the `cast` module entirely, folding all functionality into the `mem` module. Specifically, this is the fate of each function in the `cast` module. * transmute - This function was moved to `mem`, but it is now marked as #[unstable]. This is due to planned changes to the `transmute` function and how it can be invoked (see the #[unstable] comment). For more information, see RFC 5 and #12898 * transmute_copy - This function was moved to `mem`, with clarification that is is not an error to invoke it with T/U that are different sizes, but rather that it is strongly discouraged. This function is now #[stable] * forget - This function was moved to `mem` and marked #[stable] * bump_box_refcount - This function was removed due to the deprecation of managed boxes as well as its questionable utility. * transmute_mut - This function was previously deprecated, and removed as part of this commit. * transmute_mut_unsafe - This function doesn't serve much of a purpose when it can be achieved with an `as` in safe code, so it was removed. * transmute_lifetime - This function was removed because it is likely a strong indication that code is incorrect in the first place. * transmute_mut_lifetime - This function was removed for the same reasons as `transmute_lifetime` * copy_lifetime - This function was moved to `mem`, but it is marked `#[unstable]` now due to the likelihood of being removed in the future if it is found to not be very useful. * copy_mut_lifetime - This function was also moved to `mem`, but had the same treatment as `copy_lifetime`. * copy_lifetime_vec - This function was removed because it is not used today, and its existence is not necessary with DST (copy_lifetime will suffice). In summary, the cast module was stripped down to these functions, and then the functions were moved to the `mem` module. transmute - #[unstable] transmute_copy - #[stable] forget - #[stable] copy_lifetime - #[unstable] copy_mut_lifetime - #[unstable] [breaking-change]
2014-05-07core: Inherit the kinds moduleAlex Crichton-0/+281
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-53/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-19Register snapshotsBrian Anderson-6/+0
2013-05-07Remove Durable from the languageBrian Anderson-2/+1
2012-12-17Register snapshotsBrian Anderson-18/+0
2012-12-17Revert "Register snapshots"Brian Anderson-0/+18
This reverts commit d6d12d90ff5363f59f1a1bf67f999a5d7944abb1.
2012-12-17Register snapshotsBrian Anderson-18/+0
2012-12-13Rename Send trait to OwnedBrian Anderson-2/+11
2012-12-13Rename Owned trait to DurableBrian Anderson-4/+11
2012-12-10Add license boilerplate to more files.Graydon Hoare-0/+10
2012-11-30Fix small typo in kinds documentationAndrew Dunham-1/+1
2012-11-30core: Add docs about kind traitsBrian Anderson-5/+36
2012-11-30core: Make core.rc more readable. CleanupBrian Anderson-0/+21