Commit Graph

40704 Commits

Author SHA1 Message Date
Niko Matsakis
49f2a56666 Fix tests 2015-04-06 09:35:12 -04:00
Niko Matsakis
48a023c2e9 Convert lifetime shadowing into a hard error, as promised. 2015-04-04 05:55:24 -04:00
bors
bcae782aa8 Auto merge of #23979 - Ryman:error_from_string, r=alexcrichton 2015-04-04 02:45:41 +00:00
bors
f207ecbe02 Auto merge of #23972 - gkoz:partial_eq_str_string, r=alexcrichton
Right now comparing a `&String` (or a `&Cow`) to a `&str` requires redundant borrowing of the latter. Implementing `PartialEq<str>` tries to avoid this limitation.

```rust
struct Foo (String);

fn main () {
    let s = Foo("foo".to_string());
    match s {
        Foo(ref x) if x == &"foo" => println!("foo!"),
        // avoid this -----^
        _ => {}
    }
}
```

I was hoping that #23521 would solve this but it didn't work out.
2015-04-03 22:37:07 +00:00
bors
c1b8eb5ad4 Auto merge of #24018 - nikomatsakis:marker-trait-stability, r=alexcrichton
r? @alexcrichton
2015-04-03 19:53:27 +00:00
Niko Matsakis
62b3060507 Revert accidental change from stable -> unstable; just meant to
deprecate (though these will likely be purged for 1.0).
2015-04-03 14:30:13 -04:00
bors
80def6c244 Auto merge of #23930 - petrochenkov:issue23656, r=nrc
Fixes #22757
Fixes #22972
Fixes #23044
Fixes #23151
Fixes #23597
Fixes #23656
Fixes #23929
It also fixes some other corner cases in range patterns, like incorrect spans or not accepting global paths after `...`.

It passes `make check` but needs some additional tests (then it will fix #22546 as well), I'll write them today or tomorrow.
2015-04-03 15:44:24 +00:00
bors
2615106a46 Auto merge of #23938 - nikomatsakis:invariant, r=pnkfelix
There are still some remnants we could remove from the compiler (e.g. references to "subtraitrefs"; traits still have variance entries in the variance table), but this removes all user-visible bits I believe.

r? @pnkfelix 

Fixes #22806 (since such traits would no longer exist)
2015-04-03 12:59:11 +00:00
bors
82dcec7ee4 Auto merge of #23934 - lfairy:write-no-deref, r=alexcrichton
This means passing in e.g. a `Vec<u8>` or `String` will work as
intended, rather than deref-ing to `&mut [u8]` or `&mut str`.

[breaking-change]

Closes #23768
2015-04-03 07:13:51 +00:00
bors
fc98b19cf7 Auto merge of #23832 - petrochenkov:usize, r=aturon
These constants are small and can fit even in `u8`, but semantically they have type `usize` because they denote sizes and are almost always used in `usize` context. The change of their type to `u32` during the integer audit led only to the large amount of `as usize` noise (see the second commit, which removes this noise).

This is a minor [breaking-change] to an unstable interface.

r? @aturon
2015-04-03 04:29:52 +00:00
bors
5e30f05a05 Auto merge of #23974 - pnkfelix:fix-23973, r=alexcrichton
Do not suggest `#![feature(...)]` if we are in beta or stable channel.

Fix #23973
2015-04-03 01:44:00 +00:00
bors
d17d6e7f1f Auto merge of #23967 - semarie:libc-clone, r=alexcrichton
affected struct:
 - sockaddr_storage
 - sockaddr_un

apply the same method used for linux for:
 - bitrig/openbsd
 - freebsd
 - dragonfly

this commit unbreak build for openbsd (and bitrig, freebsd and dragonfly too I think)

r? @alexcrichton
2015-04-02 22:56:28 +00:00
Kevin Butler
8b719eefc0 std: impl From<String> for Box<Error + Send> 2015-04-02 21:10:25 +01:00
bors
d1835ae7cc Auto merge of #23931 - steveklabnik:doc_std_fs, r=alexcrichton 2015-04-02 18:17:48 +00:00
Felix S. Klock II
f6a06808ec Fallout to tests expecting unconditional help output from missing features. 2015-04-02 19:30:45 +02:00
Niko Matsakis
c2dba8580a Merge conflicts 2015-04-02 13:25:06 -04:00
Niko Matsakis
38fdd50e0b Remove *most* mentions of phantom fns and variance on traits. Leave some
comments and also leave the entries in the variance tables for now.
2015-04-02 13:25:06 -04:00
Niko Matsakis
628d715ff4 Deprecate MarkerTrait and PhantomFn. 2015-04-02 13:25:06 -04:00
Niko Matsakis
9b5accade7 Fallout in tests 2015-04-02 13:24:46 -04:00
Niko Matsakis
dd31bb24e8 Modify variance inference to always infer all trait parameters as invariant. 2015-04-02 13:24:46 -04:00
Gleb Kozyrev
52340630a6 Implement PartialEq<str> for String and Cow 2015-04-02 18:53:04 +03:00
Gleb Kozyrev
63c01cea2d Change PartialEq impls in collections::string to slice notation 2015-04-02 18:52:53 +03:00
Felix S. Klock II
9b8957f1d4 Revise logic to match rustc::session::config::get_unstable_features_setting 2015-04-02 17:47:51 +02:00
bors
edac3ce6fb Auto merge of #23877 - richo:gardening, r=Manishearth
I also wanted to unignore https://github.com/rust-lang/rust/blob/master/src/libsyntax/ext/expand.rs#L1768-L1777 since the issue it references is closed, but the test fails, and it's internals aren't super clear to me.
2015-04-02 15:33:22 +00:00
Felix S. Klock II
eaea188d96 Do not suggest #![feature(...)] if we are in beta or stable channel.
Fix #23973
2015-04-02 17:29:22 +02:00
Steve Klabnik
187355178b Add more examples and documentation for std::fs 2015-04-02 11:12:59 -04:00
bors
9854143cba Auto merge of #23868 - mbrubeck:doc-edit, r=Manishearth
r? @steveklabnik
2015-04-02 12:47:19 +00:00
Sébastien Marie
26453bb60d unary negation of unsigned integers
unbreak build for:
 - linux (mips/mipsel)
 - freebsd
 - dragonfly
 - bitrig
 - openbsd

by converting unsigned integers `-1` to `!0`
2015-04-02 14:23:41 +02:00
Vadim Petrochenkov
76567a64c1 Fix parsing of patterns in macros 2015-04-02 15:09:43 +03:00
Sébastien Marie
48b3def76c don't derive Clone, but impl it
affected struct:
 - sockaddr_storage
 - sockaddr_un

apply the same method used for linux for:
 - bitrig/openbsd
 - freebsd
 - dragonfly
2015-04-02 13:34:40 +02:00
Vadim Petrochenkov
35c1bdb2b4 syntax: Rewrite parsing of patterns 2015-04-02 13:34:26 +03:00
bors
3e8a773bc5 Auto merge of #23822 - tanadeau:remove-box-syntax-in-pointers-doc, r=steveklabnik
This is the first use of `box`. It's an unstable feature and also isn't
consistent with the use of `Box` in the "original" code above it.

r? @steveklabnik
2015-04-02 10:02:30 +00:00
bors
cf00fc4da9 Auto merge of #23963 - alexcrichton:rollup, r=alexcrichton 2015-04-02 07:19:33 +00:00
Alex Crichton
e3b7e6caa2 Tweak relese notes + rebase fixes 2015-04-02 00:18:45 -07:00
Trent Nadeau
00d929dcb3 Moved use of box_syntax unstable feature in docs to Unstable section.
Create a new section under the Unstable section for `box` syntax and
patterns and removed their discussion from the Pointers section.
2015-04-01 21:53:37 -04:00
Alex Crichton
fb77443213 rollup merge of #23959: aturon/beta-relnotes
Collected from TWiR and the PR log.

r? @alexcrichton
f? @brson @nikomatsakis @huonw
2015-04-01 18:43:49 -07:00
Alex Crichton
57f5ac948a Test fixes and rebase conflicts, round 2 2015-04-01 18:38:24 -07:00
Alex Crichton
d49b67e255 rollup merge of #23176: huonw/rm-bounds 2015-04-01 18:38:19 -07:00
Alex Crichton
f92e7abefd rollup merge of #23860: nikomatsakis/copy-requires-clone
Conflicts:
	src/test/compile-fail/coherence-impls-copy.rs
2015-04-01 18:37:54 -07:00
Alex Crichton
05654e528d rollup merge of #23953: dhuseby/master
@alexcrichton here are the two most recent Bitrig snapshots.  As usual, please upload the snapshots to the snapshot server:

https://github.com/dhuseby/rust-cross-bitrig/blob/master/snapshots/rust-stage0-2015-03-25-a923278-bitrig-x86_64-e56c400a04bca7b52ab54e0780484bb68fa449c2.tar.bz2
https://github.com/dhuseby/rust-cross-bitrig/blob/master/snapshots/rust-stage0-2015-03-27-5520801-bitrig-x86_64-55a69b0ae5481ccda54c2fcfc54025a0945c4f57.tar.bz2

BTW, I was just able to get the Bitrig Rust build to pass "make check" so I'll submit a PR once this lands to fix the tests and get the Bitrig buildbot to finally complete a build.  That will hopefully end this nonsense of hand building and uploading snapshots. 👍
2015-04-01 18:36:21 -07:00
Alex Crichton
9edbf42a34 rollup merge of #23945: pnkfelix/gate-u-negate
Feature-gate  unsigned unary negate.

Discussed in weekly meeting here: https://github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2015-03-31.md#feature-gate--expr

and also in the internals thread here: http://internals.rust-lang.org/t/forbid-unsigned-integer/752
2015-04-01 18:36:21 -07:00
Alex Crichton
f86318d63c Test fixes and rebase conflicts, round 2
Conflicts:
	src/libcore/num/mod.rs
2015-04-02 02:07:51 +02:00
Aaron Turon
35a6a372a6 Add release notes for 1.0.0-beta 2015-04-01 16:45:15 -07:00
Felix S. Klock II
07ff8ab885 fixes for fallout in tests/compile-fail 2015-04-02 01:43:54 +02:00
Felix S. Klock II
c8bf5f5d97 partial set of fixes for fallout in tests/run-pass 2015-04-02 01:09:05 +02:00
bors
2e3b0c051d Auto merge of #23955 - alexcrichton:rollup, r=alexcrichton 2015-04-01 22:41:08 +00:00
Alex Crichton
0304e15e5c Test fixes and rebase conflicts, round 1 2015-04-01 15:38:59 -07:00
Felix S. Klock II
b85c4d16d5 Fix bug in OverflowOps impl for unsigned integers.
Namely, the special case treatment for `div`/`rem` is only applicable
to signed integer values.

Clearly RFC 1027 would have saved us here!  ;)
2015-04-01 23:47:19 +02:00
Alex Crichton
655634e6ab rollup merge of #23949: aturon/stab-timeout
This commit renames and stabilizes:

* `Condvar::wait_timeout_ms` (renamed from `wait_timeout`)
* `thread::park_timeout_ms` (renamed from `park_timeout`)
* `thread::sleep_ms` (renamed from `sleep`)

In each case, the timeout is taken as a `u32` number of milliseconds,
rather than a `Duration`.

These functions are likely to be deprecated once a stable form of
`Duration` is available, but there is little cost to having these named
variants around, and it's crucial functionality for 1.0.

[breaking-change]

r? @alexcrichton

cc @sfackler @carllerche
2015-04-01 13:56:20 -07:00
Alex Crichton
bb252a8878 rollup merge of #23948: nikomatsakis/feature-gate-rust-abi
Like it says.

r? @alexcrichton
2015-04-01 13:56:19 -07:00