Commit Graph

51531 Commits

Author SHA1 Message Date
mitaa
d78f19ebbd Use const instead of function 2016-03-04 19:40:00 +01:00
mitaa
032156210d Use Item::is_* methods consistently 2016-03-04 19:40:00 +01:00
mitaa
2a28b69948 Refactor rustdocs attribute handling 2016-03-04 19:39:52 +01:00
Jeffrey Seyfried
d908ff1759 Don't treat associated types specially in def_privacy
Improve trait privacy error message
2016-03-04 18:30:24 +00:00
Jeffrey Seyfried
32f251cc1c Add test 2016-03-04 18:30:23 +00:00
Jeffrey Seyfried
13f5fca0f2 privacy: change def_privacy so that it checks for visiblity instead of nameability 2016-03-04 18:30:22 +00:00
mitaa
8f6e09a956 Simplify if let/match expressions 2016-03-04 19:07:35 +01:00
Alex Crichton
df9e173353 test: Clean up alloc_jemalloc usage in tests
Right now there's just a smattering of `// ignore-foo` platforms which is ever
expanding as new ones are added. Instead switch to only running these tests on
Linux/OSX and then use a guaranteed-to-work but not-as-well-tested alternative
on other platforms.
2016-03-04 09:53:50 -08:00
Alex Crichton
4fbc080033 std: Update jemalloc again to the 4.* track 2016-03-04 09:49:39 -08:00
Alex Crichton
01a2a7f991 rustc: Add an i586-pc-windows-msvc target
Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is
sometimes a desire to compile for x86 Windows as well where SSE2 is disabled.
This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant
for Windows as well.

This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit
Windows due to users having CPUs that don't support SSE2 instructions. It was
requested that we could have non-SSE2 builds of the standard library available
so they could continue to use vanilla releases and nightlies.

[ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
2016-03-04 09:21:28 -08:00
bors
d31d8a9a91 Auto merge of #32039 - arielb1:pat-enum, r=nagisa
Fixes #32004

r? @eddyb
2016-03-04 17:19:40 +00:00
bors
c97524bef9 Auto merge of #32032 - arielb1:load-const, r=eddyb
Fixes #30891

r? @eddyb
2016-03-04 15:33:10 +00:00
Ariel Ben-Yehuda
26a0afbd9f remove wrong assert in check_match
the assert was invalidated by PR #31020

Fixes #31561
2016-03-04 16:11:38 +02:00
Ariel Ben-Yehuda
f40d12f180 don't treat unit patterns as wildcard patterns
Fixes #32004
2016-03-04 15:50:55 +02:00
bors
85ad61c583 Auto merge of #32022 - gohyda:master, r=alexcrichton
- Empty `.sidebar .location` caused "grey line" on top of the documentation page (under 700px) fixed.
- `.sidebar .location` appearance improvement in responsive mode.
2016-03-04 13:47:02 +00:00
Ariel Ben-Yehuda
af55b4189f clean up check_pat_enum 2016-03-04 15:24:28 +02:00
Simonas Kazlauskas
27d91d73f9 Address comments 2016-03-04 15:20:42 +02:00
Simonas Kazlauskas
811b874716 Add Pass manager for MIR 2016-03-04 15:20:10 +02:00
Oliver Schneider
25e5de3f7e make skip a double ended iterator 2016-03-04 10:22:55 +01:00
Brian Bowman
84e6e04d83 Clarify ambiguous wording in fold() docs
To me it was unclear whether 'it' referred to the fold function, or the closure.
2016-03-04 01:09:23 -06:00
bors
5b5e521869 Auto merge of #32006 - jseyfried:fix_expanded_mod_path, r=nikomatsakis
This PR changes the search paths for macro-expanded non-inline modules so that they match ordinary non-inline modules (fixes #31624). This is a [breaking-change].

Right now, the search paths for a macro-expanded non-inline module are computed as if the module were declared in the top level of the file in which the macro was defined.
For example, consider `./foo/mod.rs`:
```rust
mod inconsequential { // moving the macro outside this module wouldn't change anything
    macro_rules! mod_decl {
        ($i:ident) => { mod $i; }
    }
}
```
and `./lib.rs`:
```rust
mod foo;

mod bar {
    mod_decl!(baz);
    //^ Now, rustc expects `./foo/baz.rs` (or `./foo/baz/mod.rs`)
    //| After this PR, rustc will expect `./bar/baz.rs` (or `./bar/baz/mod.rs`)
}
```
r? @alexcrichton
2016-03-04 06:55:11 +00:00
bors
8e261d12e3 Auto merge of #31945 - sfackler:net2, r=alexcrichton
I have these tagged as stable in 1.9, so this shouldn't merge until the 1.8 beta's cut.
2016-03-04 04:19:30 +00:00
ubsan
633cd84821 usize is now a proper ctype, so fix cmp_slice 2016-03-03 19:53:31 -08:00
Ariel Ben-Yehuda
cf29344c63 truncate i8-s to i1-s when loading constants
Fixes #30891
2016-03-04 01:16:23 +02:00
bors
e91f889ed3 Auto merge of #31671 - ranma42:printcfg, r=alexcrichton
Show `cfg` as possible argument to `--print` and make it so that `--print cfg` also outputs the `target_feature`s.

Should I also extend `src/test/run-make/print-cfg/Makefile` to check that `target_feature`s are actually printed?
2016-03-03 21:37:18 +00:00
Aleksey Kladov
4844f01bab tests: add test for empty <> 2016-03-03 23:30:23 +03:00
bors
809b14acf1 Auto merge of #31797 - apasel422:issue-28950, r=alexcrichton
Closes #28950.

r? @eddyb
2016-03-03 19:52:11 +00:00
Jorge Aparicio
ddd2e99d02 [rustbuild] fix cross compilation of std for mips(el)-linux-musl
These targets don't link statically to libunwind or libc
2016-03-03 14:50:28 -05:00
Steven Fackler
e4aa513139 Fix netbsd 2016-03-03 09:54:15 -08:00
bors
493d999ffa Auto merge of #32007 - nikomatsakis:compiletest-incremental, r=alexcrichton
This PR extends compiletest to support **test revisions** and with a preliminary **incremental testing harness**. run-pass, compile-fail, and run-fail tests may be tagged with

```
// revisions: a b c d
```

This will cause the test to be re-run four times with `--cfg {a,b,c,d}` in turn. This means you can write very closely related things using `cfg`. You can also configure the headers/expected-errors by writing `//[foo] header: value` or `//[foo]~ ERROR bar`, where `foo` is the name of your revision. See the changes to `coherence-cow.rs` as a proof of concept.

The main point of this work is to support the incremental testing harness. This PR contains an initial, unused version. The code that uses it will land later. The incremental testing harness compiles each revision in turn, and requires that the revisions have particular names (e.g., `rpass2`, `cfail3`), which tell it whether a particular revision is expected to compile or not.

Two questions:

- Is there compiletest documentation anywhere I can update?
- Should I hold off on landing the incremental testing harness until I have the code to exercise it? (That will come in a separate PR, still fixing a few details)

r? @alexcrichton
cc @rust-lang/compiler <-- new testing capabilities
2016-03-03 17:41:13 +00:00
Alex Crichton
6f9afba602 std: Stabilize into_* ASCII methods
These were intended to land in stable 1.8 but were just waiting for the
implementation PR, so now they're landing. Specifically this PR stabilizes:

* `AsciiExt::into_ascii_uppercase`
* `AsciiExt::into_ascii_lowercase`
* `AsciiExt for Vec<u8>`
* `AsciiExt for String`
2016-03-03 09:11:59 -08:00
srinivasreddy
d2df5514c0 added ignore 2016-03-03 21:54:21 +05:30
Steven Fackler
ee62aab2ed Fix android build 2016-03-03 08:19:30 -08:00
Niko Matsakis
fc4d0ecf20 mention caveat about should-fail in docs 2016-03-03 11:18:42 -05:00
Niko Matsakis
aa19b41f25 make pretty printer tests understand revisions, and make them ignore the
should-fail annotation
2016-03-03 11:17:32 -05:00
mitaa
62267470f6 Refactor src-link creation for local sources
Since we emit the sources beforhand we actually **know** whether we
can safely create src-links to these files and where they are stored.
2016-03-03 16:11:10 +01:00
Guillaume Gomez
7ab9345fe6 Improve error messages 2016-03-03 12:47:27 +01:00
bors
f6e125f04a Auto merge of #31979 - jseyfried:rename_ctxt, r=eddyb
r? @eddyb
2016-03-03 10:22:41 +00:00
Niko Matsakis
9601e6f252 Do not assert revisions list is empty for pretty printing tests 2016-03-03 04:17:39 -05:00
Andrea Canciani
4e46eee110 Hide gated cfg attributes from the output of --print cfg
Gated cfg attributes are not available on the stable and beta release
channels, therefore they should not be presented to users of those
channels in order to avoid confusion.
2016-03-03 10:06:09 +01:00
bors
4aa913cd23 Auto merge of #32012 - bluss:more-drop-in-place, r=alexcrichton
Use `drop_in_place` in Vec and VecDeque

We can use drop_in_place's DST capabilities directly in Vec::drop and similarly in VecDeque::drop. I verfied this has the same effect as the previous `needs_drop` code; `drop_in_place` it itself an intrinsic.

The VecDeque replacement should be more efficient too, even in release mode (slice iteration makes a more efficient loop than the deque iterator).
2016-03-03 08:35:51 +00:00
Jeffrey Seyfried
37ba66a66e Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
Guillaume Gomez
6aa3d0f11a Swap lang item collect order (externals are now collected before locals) 2016-03-03 08:21:55 +01:00
Steven Fackler
631fa2b8c0 Fix comments and OSX build 2016-03-02 22:05:14 -08:00
gohyda
311ff0367d Responsive layout correction. 2016-03-03 04:46:30 +01:00
Guillaume Gomez
150ac067af Provide more useful information for E0152 2016-03-03 04:22:49 +01:00
bors
7cee8b9ffb Auto merge of #31824 - jseyfried:privacy_in_resolve, r=nikomatsakis
This PR privacy checks paths as they are resolved instead of in `librustc_privacy` (fixes #12334 and fixes #31779). This removes the need for the `LastPrivate` system introduced in PR #9735, the limitations of which cause #31779.

This PR also reports privacy violations in paths to intra- and inter-crate items the same way -- it always reports the first inaccessible segment of the path.

Since it fixes #31779, this is a [breaking-change]. For example, the following code would break:
```rust
mod foo {
    pub use foo::bar::S;
    mod bar { // `bar` should be private to `foo`
        pub struct S;
    }
}

impl foo::S {
    fn f() {}
}

fn main() {
    foo::bar::S::f(); // This is now a privacy error
}
```

r? @alexcrichton
2016-03-03 02:21:28 +00:00
Brian Anderson
d3ae29d9c1 Ignore a rustdoc test that does not work on beta 2016-03-03 00:40:34 +00:00
Jeffrey Seyfried
e2aa90e780 Add test 2016-03-02 23:50:19 +00:00
Jeffrey Seyfried
472fcb5973 Fix the search paths for macro-expanded non-inline modules 2016-03-02 23:50:19 +00:00