Commit Graph

50 Commits

Author SHA1 Message Date
Alex Crichton
554946c81e rollup merge of #23873: alexcrichton/remove-deprecated
Conflicts:
	src/libcollectionstest/fmt.rs
	src/libcollectionstest/lib.rs
	src/libcollectionstest/str.rs
	src/libcore/error.rs
	src/libstd/fs.rs
	src/libstd/io/cursor.rs
	src/libstd/os.rs
	src/libstd/process.rs
	src/libtest/lib.rs
	src/test/run-pass-fulldeps/compiler-calls.rs
2015-03-31 15:54:44 -07:00
Alex Crichton
94137a37e9 Test fixes and rebase conflicts, round 1 2015-03-31 15:53:25 -07:00
Alex Crichton
d4a2c94180 std: Clean out #[deprecated] APIs
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-31 15:49:57 -07:00
Vadim Petrochenkov
1accaa9f86 Fix some typos 2015-03-28 18:09:51 +03:00
Niko Matsakis
dd8cf92389 Fix doc tests. 2015-03-26 21:12:52 -04:00
Niko Matsakis
9c9bb9ce1d Implement Reflect trait with a variant on the standard OIBIT
semantics that tests the *interface* of trait objects, rather
than what they close over.
2015-03-26 17:52:38 -04:00
Alex Crichton
6e0f1d3984 rollup merge of #23484: alexcrichton/marker-trait-stable
This trait has proven quite useful when defining marker traits to avoid the
semi-confusing `PhantomFn` trait and it looks like it will continue to be a
useful tool for defining these traits.
2015-03-23 15:26:24 -07:00
Alex Crichton
c608084ff5 rollup merge of #23598: brson/gate
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-23 15:13:15 -07:00
Brian Anderson
e9019101a8 Add #![feature] attributes to doctests 2015-03-23 14:40:26 -07:00
Flavio Percoco
38dbcb2e37 Check trait unsafety for defaulted traits 2015-03-20 16:43:11 +01:00
Flavio Percoco
9ae144f055 Add default impls for Send/Sync 2015-03-20 16:43:11 +01:00
Alex Crichton
959a0e69c9 std: Stabilize marker::MarkerTrait
This trait has proven quite useful when defining marker traits to avoid the
semi-confusing `PhantomFn` trait and it looks like it will continue to be a
useful tool for defining these traits.
2015-03-18 11:43:46 -07:00
Joseph Crail
fcf3f3209a Remove explicit syntax highlight from docs. 2015-03-13 19:25:18 -04:00
Steve Klabnik
64ab111b53 Example -> Examples
This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown
2015-03-11 21:11:40 -04:00
bors
777f5d9599 Auto merge of #23219 - Manishearth:rollup, r=Manishearth 2015-03-09 16:02:29 +00:00
Steve Klabnik
9653a521b5 Clean up references to opt-out traits
They're opt-in now.

Fixes #22572
2015-03-08 09:32:18 -04:00
Pyry Kontio
6dcc0e5631 Adds an example for PhantomData<T>. 2015-03-08 08:38:10 -04:00
Niko Matsakis
7074346e4f Change MarkerTrait to be invariant. This is a (small) loss of expressiveness,
but is necessary for now to work around #22806. Fixes #22655.
2015-02-25 12:21:15 -05:00
bors
2890508d97 Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakis
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-24 02:22:44 +00:00
Flavio Percoco
7ae8889286 Add negative impls for Sync 2015-02-22 02:14:24 +01:00
Flavio Percoco
bd511f73be Add negative impls for *const T and *mut T 2015-02-22 02:14:24 +01:00
Alex Crichton
6686f7aa47 Register new snapshots 2015-02-20 22:17:17 -08:00
Alex Crichton
b7c0813eb7 Round 4 test fixes and rebase conflicts 2015-02-18 17:57:35 -08:00
Alex Crichton
d6e939a2df Round 3 test fixes and conflicts 2015-02-18 16:34:04 -08:00
Niko Matsakis
f5491e63b4 Stabilize Send/Sync. 2015-02-18 17:30:14 -05:00
Niko Matsakis
d622235b30 Add deprecated versions of the old markers and integrate them back into the variance analysis. 2015-02-18 17:14:27 -05:00
Niko Matsakis
a2393e665d WIP -- improve documentation on the phantom traits 2015-02-18 16:38:39 -05:00
Niko Matsakis
2594d56e32 Introduce the new phantomdata/phantomfn markers and integrate them
into variance inference; fix various bugs in variance inference
so that it considers the correct set of constraints; modify infer to
consider the results of variance inference for type arguments.
2015-02-18 10:24:55 -05:00
Alex Crichton
47f91a9484 Register new snapshots 2015-02-17 22:04:31 -08:00
Huon Wilson
35ca50bd56 Add Send implementations for & and &mut.
Per RFC 458.

Closes #22251.
2015-02-18 08:19:21 +11:00
Huon Wilson
cae969e2a7 Remove the implicit 'static bound on Send.
Previously Send was defined as `trait Send: 'static {}`. As detailed in
https://github.com/rust-lang/rfcs/pull/458, the `'static` bound is not
actually necessary for safety, we can use lifetimes to enforce that more
flexibly.

`unsafe` code that was previously relying on `Send` to insert a
`'static` bound now may allow incorrect patterns, and so should be
audited (a quick way to ensure safety immediately and postpone the audit
is to add an explicit `'static` bound to any uses of the `Send` type).

cc #22251.
2015-02-18 08:19:21 +11:00
Felix S. Klock II
f90c3864b6 Add core::marker::PhantomData.
Port `core::ptr::Unique` to have `PhantomData`. Add `PhantomData` to
`TypedArena` and `Vec` as well.

As a drive-by, switch `ptr::Unique` from a tuple-struct to a struct
with fields.
2015-02-11 13:51:09 +01:00
bors
a08504bb35 Auto merge of #21995 - leejunseok:fix_invariant_ex, r=steveklabnik
Should fix #20147

This is my second PR in the history of ever (I botched my first one #21828). Any tips would be appreciated!
2015-02-07 09:55:14 +00:00
Junseok Lee
310ada06f2 added example back in, with a modified, (hopefully) improved description 2015-02-05 23:50:51 -08:00
Junseok Lee
b6544fd352 removed weird example 2015-02-05 23:50:51 -08:00
Steven Fackler
85a85c2070 Switch missing_copy_implementations to default-allow
This was particularly helpful in the time just after OIBIT's
implementation to make sure things that were supposed to be Copy
continued to be, but it's now creates a lot of noise for types that
intentionally don't want to be Copy.
2015-02-03 23:31:07 -08:00
Jorge Aparicio
788181d405 s/Show/Debug/g 2015-01-29 07:49:02 -05:00
Brian Anderson
d179ba3b8e Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	src/libcore/cmp.rs
	src/libcore/fmt/mod.rs
	src/libcore/iter.rs
	src/libcore/marker.rs
	src/libcore/num/f32.rs
	src/libcore/num/f64.rs
	src/libcore/result.rs
	src/libcore/str/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/lint/context.rs
	src/libstd/sync/mpsc/mod.rs
	src/libstd/sync/poison.rs
2015-01-25 22:14:06 -08:00
Brian Anderson
63fcbcf3ce Merge remote-tracking branch 'rust-lang/master'
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-25 01:20:55 -08:00
Brian Anderson
b44ee371b8 grandfathered -> rust1 2015-01-23 21:48:20 -08:00
Brian Anderson
cd6d9eab5d Set unstable feature names appropriately
* `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-23 13:28:40 -08:00
P1start
87db16cecd core::marker: s/task/thread/ 2015-01-22 22:22:16 +13:00
P1start
be138ed2bd Add #[rustc_on_unimplemented] annotations to more traits 2015-01-22 22:22:04 +13:00
Brian Anderson
41278c5441 Remove 'since' from unstable attributes 2015-01-21 19:25:55 -08:00
Brian Anderson
94ca8a3610 Add 'feature' and 'since' to stability attributes 2015-01-21 16:16:18 -08:00
Flavio Percoco
cd631c6914 Register snapshot for 9006c3c 2015-01-20 22:15:44 +01:00
Steve Klabnik
02968389dc Beef up Copy documentation
Fixes #21249
Fixes #11540
2015-01-17 10:51:07 -05:00
Steve Klabnik
078bd498b9 Evaluate # fn in docs
I searched for times when we were hiding functions with # in the documentation,
and fixed them to not use it unless neccesary.

I also made random improvements whenever I changed something. For example,
I changed Example to Examples, for consistency.

Fixes #13423
2015-01-17 10:49:49 -05:00
Flavio Percoco
388e30f78e Remove NoSend/NoSync 2015-01-16 08:18:56 +01:00
Nick Cameron
9f07d055f7 markers -> marker 2015-01-07 12:10:31 +13:00