about summary refs log tree commit diff
path: root/src/libcore/lib.rs
AgeCommit message (Collapse)AuthorLines
2015-04-11Change the rt::unwind line argument type from usize to u32.Ryan Prichard-1/+1
2015-04-10Change `derive` expansions to use `discriminant_value` intrinsic.Felix S. Klock II-0/+1
Fix #15523.
2015-04-01Collect the definition of the `Error` trait into `libstd` for now. ThisNiko Matsakis-1/+0
sidesteps a coherence difficulty where `liballoc` had to prove that `&str: !Error`, which didn't involve any local types.
2015-04-01Add `#[fundamental]` annotations into libcore so that `Sized` and theNiko Matsakis-0/+2
`Fn` traits are considered fundamental, along with `Box` (though that is mostly for show; the real type is `~T` in the compiler).
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-1/+0
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-1/+0
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs
2015-03-26Implement `Reflect` trait with a variant on the standard OIBITNiko Matsakis-0/+1
semantics that tests the *interface* of trait objects, rather than what they close over.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-1/+0
Now that support has been removed, all lingering use cases are renamed.
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+1
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23Add generic conversion traitsAaron Turon-0/+1
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+1
2015-03-18Avoid metadata bloat by using trait FixedSizeArrayVadim Petrochenkov-1/+1
2015-03-06Rollup merge of #23100 - wesleywiser:fix_23059, r=brsonManish Goregaokar-2/+1
Fixes #23059
2015-03-06Rollup merge of #23056 - awlnx:master, r=nrcManish Goregaokar-0/+2
2015-03-05Fix reference to 'librlibc' in libcore docsWesley Wiser-2/+1
Fixes #23059
2015-03-05fix for new attributes failing. issue #22964awlnx-0/+2
2015-03-03Added `OverflowingOps` trait to core::num::wrapping.Felix S. Klock II-0/+1
These return the result of the operation *plus* an overflow/underflow bit. This can make it easier to write operations where you want to chain some arithmetic together, but also want to return a flag signalling if overflow every occurred.
2015-03-01Remove int/uintGuillaumeGomez-3/+1
2015-02-24Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakisbors-0/+1
This is one more step towards completing #13231 This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go. The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items. Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well. This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
2015-02-22Add negative impls for `*const T` and `*mut T`Flavio Percoco-0/+1
2015-02-20Tweaks to equality comparisons for slices/arrays/vectorsVadim Petrochenkov-0/+3
2015-02-18Stabilize std::borrowAaron Turon-1/+0
This commit stabilizes `std::borrow`, making the following modifications to catch up the API with language changes: * It renames `BorrowFrom` to `Borrow`, as was originally intended (but blocked for technical reasons), and reorders the parameters accordingly. * It moves the type parameter of `ToOwned` to an associated type. This is somewhat less flexible, in that each borrowed type must have a unique owned type, but leads to a significant simplification for `Cow`. Flexibility can be regained by using newtyped slices, which is advisable for other reasons anyway. * It removes the owned type parameter from `Cow`, making the type much less verbose. * Deprecates the `is_owned` and `is_borrowed` predicates in favor of direct matching. The above API changes are relatively minor; the basic functionality remains the same, and essentially the whole module is now marked `#[stable]`. [breaking-change]
2015-02-17Register new snapshotsAlex Crichton-15/+6
2015-02-17Add gating for rustc_* attrsManish Goregaokar-0/+1
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+1
2015-02-09Set up docs for missing core typesSteve Klabnik-0/+4
Fixes #22085
2015-02-07Feature-gate #![no_std]Keegan McAllister-0/+1
Fixes #21833. [breaking-change]
2015-02-07Don't use std:: paths in syntax extensions when compiling a #![no_std] crateKeegan McAllister-8/+16
Fixes #16803. Fixes #14342. Fixes half of #21827 -- slice syntax is still broken.
2015-02-02remove unused mut qualifiersJorge Aparicio-1/+0
2015-01-30Test fixes and rebase conflictsAlex Crichton-8/+8
Also some tidying up of a bunch of crate attributes
2015-01-30fix falloutJorge Aparicio-0/+4
2015-01-30Change from core::ops::RangeFull to std::opsNick Cameron-3/+3
2015-01-30Use absolute path to FullRange, rather than assuming it is in the preludeNick Cameron-0/+1
Closes #21263 [breaking-change] If you are using `core::ops::FullRange` you should change to using `core::ops::RangeFull`
2015-01-29remove #[old_impl_check] now that #21363 has been fixedJorge Aparicio-2/+0
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-0/+3
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-23Set unstable feature names appropriatelyBrian Anderson-1/+1
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+1
2015-01-21Remove 'since' from unstable attributesBrian Anderson-1/+1
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-1/+1
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-0/+1
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-0/+1
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-19impl Iterator for &mut Iterator and Box<Iterator>Jorge Aparicio-0/+2
closes #20953 closes #21361
2015-01-17Register new snapshots.Eduard Burtescu-1/+0
2015-01-12Feature gate #[rustc_on_unimplemented]Manish Goregaokar-0/+1
2015-01-08rollup merge of #20754: nikomatsakis/int-featureAlex Crichton-1/+2
Conflicts: src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs src/test/compile-fail/issue-2590.rs src/test/compile-fail/lint-stability.rs src/test/compile-fail/slice-mut-2.rs src/test/compile-fail/std-uncopyable-atomics.rs
2015-01-08Remove warning from the libraries.Huon Wilson-1/+2
This adds the int_uint feature to *every* library, whether or not it needs it.
2015-01-08Improvements to feature stagingBrian Anderson-1/+1
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-07Test fixes and rebase conflictsAlex Crichton-0/+1
2015-01-07rollup merge of #20708: aturon/new-int-modulesAlex Crichton-2/+2
Conflicts: src/libserialize/lib.rs
2015-01-07Preliminary feature stagingBrian Anderson-0/+1
This partially implements the feature staging described in the [release channel RFC][rc]. It does not yet fully conform to the RFC as written, but does accomplish its goals sufficiently for the 1.0 alpha release. It has three primary user-visible effects: * On the nightly channel, use of unstable APIs generates a warning. * On the beta channel, use of unstable APIs generates a warning. * On the beta channel, use of feature gates generates a warning. Code that does not trigger these warnings is considered 'stable', modulo pre-1.0 bugs. Disabling the warnings for unstable APIs continues to be done in the existing (i.e. old) style, via `#[allow(...)]`, not that specified in the RFC. I deem this marginally acceptable since any code that must do this is not using the stable dialect of Rust. Use of feature gates is itself gated with the new 'unstable_features' lint, on nightly set to 'allow', and on beta 'warn'. The attribute scheme used here corresponds to an older version of the RFC, with the `#[staged_api]` crate attribute toggling the staging behavior of the stability attributes, but the user impact is only in-tree so I'm not concerned about having to make design changes later (and I may ultimately prefer the scheme here after all, with the `#[staged_api]` crate attribute). Since the Rust codebase itself makes use of unstable features the compiler and build system to a midly elaborate dance to allow it to bootstrap while disobeying these lints (which would otherwise be errors because Rust builds with `-D warnings`). This patch includes one significant hack that causes a regression. Because the `format_args!` macro emits calls to unstable APIs it would trigger the lint. I added a hack to the lint to make it not trigger, but this in turn causes arguments to `println!` not to be checked for feature gates. I don't presently understand macro expansion well enough to fix. This is bug #20661. Closes #16678 [rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md