Commit Graph

40827 Commits

Author SHA1 Message Date
Manish Goregaokar
d0c32834f4 Rollup merge of #23979 - Ryman:error_from_string, r=alexcrichton 2015-04-04 10:53:22 +05:30
Corey Farwell
263fdfeea8 Cleanup and modernize some things in libcore::iter 2015-04-03 21:38:51 -07:00
Dan Callahan
cb1e6a2dc4 book: use mod test consistently
Fixes #24030

Of the four code samples with modules in TRPL:

    - 2 use `mod test`
    - 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

    $ grep -r 'mod tests {' src/lib* | wc -l
          63
    $ grep -r 'mod test {'  src/lib* | wc -l
          58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.
2015-04-03 22:48:00 -05:00
bors
bcae782aa8 Auto merge of #23979 - Ryman:error_from_string, r=alexcrichton 2015-04-04 02:45:41 +00:00
Augusto Hack
eb2a6d9866 Removed repeated sentence. 2015-04-03 22:56:34 -03:00
Corey Farwell
6ff085c9a9 Make example function in comment more idiomatic 2015-04-03 18:32:29 -07:00
Corey Farwell
692c88c9bc Simplify match branches in documentation comment 2015-04-03 18:09:11 -07:00
Steve Klabnik
925a52cb93 Update Rust install instructions in TRPL
Default is now beta, add nightly in the unstable section
2015-04-03 19:09:41 -04:00
Jonathan S
3cbc345cf7 In librustc*, convert many uses of ast::Ident to ast::Name, fixing much of #6993. 2015-04-03 17:46:08 -05: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
Dan Callahan
3b73a6e3ce Remove old_io from trpl/concurrency.md
Also: the std_misc feature flag is removed; it's not needed in Beta.

Hat tip to @tshepang in #23871

Fixes #24023
2015-04-03 17:33:12 -05:00
Alex Quach
c3b27be942 Delete duplicated sentence. 2015-04-03 12:56:28 -07:00
bors
c1b8eb5ad4 Auto merge of #24018 - nikomatsakis:marker-trait-stability, r=alexcrichton
r? @alexcrichton
2015-04-03 19:53:27 +00:00
Steve Klabnik
862e16025a Don't speak of old_io
from https://news.ycombinator.com/item?id=9317822
2015-04-03 15:24:47 -04: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
Alex Quach
c5df38efa3 Fixing copy/paste typo. 2015-04-03 11:17:15 -07:00
Scott Olson
2f63e9c127 Remove unnecessary Vec<_> annotation from docs
This was brought up in IRC by a confused reader.
2015-04-03 13:23:58 -04:00
Dave Huseby
787c6cda00 this correctly disables jemalloc on Bitrig 2015-04-03 08:54:08 -07: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
Andrea Canciani
0621a83ba5 Workaround javac popup on MacOS X
MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.

Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).

Fixes #23138.
2015-04-03 15:10:59 +02: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
Corey Farwell
b406782e29 Indicate associated type in comment is code-like 2015-04-02 22:47:50 -07:00
Aaron Turon
6529872afc Adjust AsRef impl for Cow
The existing impl had the too-strong requirement of `Clone`, when only
`ToOwned` was needed.
2015-04-02 22:22:44 -07:00
Aaron Turon
ad3daa89f2 Update AUTHORS.txt as of 1.0.0-beta 2015-04-02 21:52:34 -07: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
Vadim Petrochenkov
e1be69b8a9 Add tests for parsing of patterns 2015-04-03 05:56:27 +03: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
Liam Monahan
06bc99918c doc/trpl: Fixing a comma splice in iterators.md. 2015-04-02 20:02:57 -04: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
Richo Healey
5a700b26e8 liballoc: fix typo 2015-04-02 15:08:10 -07:00
Piotr Szotkowski
d97325c9b8 Book: sync ‘Crates and Modules’ with current output 2015-04-02 23:18:47 +02:00
Kevin Butler
8b719eefc0 std: impl From<String> for Box<Error + Send> 2015-04-02 21:10:25 +01:00
Brian Anderson
1cbaf9fd18 Upgrade rust-installer 2015-04-02 11:31:31 -07: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