Commit Graph

57129 Commits

Author SHA1 Message Date
bors
5f6f838448 Auto merge of #36545 - Cobrand:wild-print-fix, r=sfackler
Remove stray println! when invoking error E0316

Removed a wild println! statement that has been here for over a year and a half.

Closes #36543
2016-09-18 21:01:49 -07:00
bors
bfac5d6d9f Auto merge of #36523 - Mark-Simulacrum:format-args-link, r=GuillaumeGomez
Add links between format_args! macro and std::fmt::Arguments struct

r? @GuillaumeGomez
2016-09-18 17:25:01 -07:00
aclarry
af67f0b389 Fix name of error test file 2016-09-18 18:55:19 -04:00
bors
55bf6a4f87 Auto merge of #36487 - nrc:save-doc-urls, r=@eddyb
save-analysis: better 'parent' info

In particular, this fixes some bugs displaying doc URLs for method calls.
2016-09-18 14:00:02 -07:00
Nick Cameron
48e69e029b save-analysis: better 'parent' info
In particular, this fixes some bugs displaying doc URLs for method calls.
2016-09-19 07:17:49 +12:00
bors
33927757ae Auto merge of #36390 - frewsxcv:panic-set-hook, r=GuillaumeGomez
Add basic doc examples for `std::panic::{set_hook, take_hook}`.

None
2016-09-18 10:34:48 -07:00
Corey Farwell
e0d554a883 Add regression test for #9837.
Fixes https://github.com/rust-lang/rust/issues/9837
2016-09-18 13:01:40 -04:00
Eitan Adler
0c252ffbab per timnn 2016-09-18 07:36:02 -07:00
Corey Farwell
5505ebc31d Add basic doc examples for std::panic::{set_hook, take_hook}. 2016-09-18 10:03:34 -04:00
Guillaume Gomez
b4c739dbdd Add missing Eq implementations 2016-09-18 14:26:49 +02:00
bors
22d15eaca9 Auto merge of #36555 - jseyfried:issue_36540, r=eddyb
Visit and fold macro invocations in the same order

Fixes #36540.
r? @nrc
2016-09-18 04:11:51 -07:00
bors
f39039e6e5 Auto merge of #36527 - nnethercote:last_token_kind, r=jseyfried
Optimize the parser's last token handling.

The parser currently makes a heap copy of the last token in four cases:
identifiers, paths, doc comments, and commas. The identifier and
interpolation cases are unused, and for doc comments and commas we only
need to record their presence, not their value.

This commit consolidates the last token handling and avoids the
unnecessary copies by replacing `last_token`, `last_token_eof`, and
`last_token_interpolated` with a new field `last_token_kind`. This
simplifies the parser slightly and speeds up parsing on some files by
3--4%.
2016-09-18 00:48:51 -07:00
Eitan Adler
fad6a09c94 remove duplicate duplicate words 2016-09-17 23:36:59 -07:00
Eitan Adler
9c3cf06b29 inherit from object 2016-09-17 23:31:06 -07:00
Eitan Adler
4f11a39e26 invisible isn't a tag 2016-09-17 23:30:42 -07:00
Eitan Adler
ccb78d20cd border-color > border 2016-09-17 23:30:22 -07:00
Eitan Adler
101d987d29 add missing semi-colon 2016-09-17 23:29:00 -07:00
Eitan Adler
73d2653417 duplicate the 2016-09-17 23:19:03 -07:00
Eitan Adler
1a4a723dda remove useless semicolon from python 2016-09-17 23:10:12 -07:00
Eitan Adler
22c66c4b38 modern style classes 2016-09-17 23:09:21 -07:00
Eitan Adler
733fe1d25c make functions static where possible 2016-09-17 23:08:31 -07:00
Eitan Adler
3545785041 Remove unused code 2016-09-17 23:07:11 -07:00
Eitan Adler
1a67298f20 prefer tuple to array 2016-09-17 23:06:45 -07:00
Eitan Adler
266ef889e3 pep8 prefers triple quoted with double quotes 2016-09-17 23:05:20 -07:00
Eitan Adler
f7811c1ca6 Fix order of @import
In CSS 2.1, any @import rules must precede all other rules (except the
@charset rule, if present).
2016-09-17 22:56:22 -07:00
Eitan Adler
8de97dddfd simplify python code 2016-09-17 22:52:00 -07:00
Eitan Adler
a6d804ede8 Browsers do not consistently handle non-integer values for font-size. 2016-09-17 22:51:13 -07:00
bors
0b03ba1f55 Auto merge of #36502 - TimNN:correct-cancel, r=jseyfried
correctly cancel some errors

Fixes #36499.

I also (proactively) changed all other calls in `parser.rs` to use `Handler::cancel`.
2016-09-17 20:57:05 -07:00
bors
d37e54b419 Auto merge of #36504 - pcwalton:and-star, r=eddyb
librustc_mir: Remove `&*x` when `x` has a reference type.

This introduces a new `InstCombine` pass for us to place such peephole
optimizations.

r? @eddyb
2016-09-17 17:30:22 -07:00
Jeffrey Seyfried
c7e4ae0d8d Add regression test. 2016-09-17 23:40:17 +00:00
Jeffrey Seyfried
2cee9ec3b3 Ensure that macro invocations are folded and visited the same order. 2016-09-17 23:40:15 +00:00
bors
32571c05c8 Auto merge of #36508 - nagisa:llvm-backport, r=eddyb
Up the LLVM

Fixes #36474

The relevant patch to rust-llvm is at https://github.com/rust-lang/llvm/pull/51

r? @alexcrichton
2016-09-17 12:02:34 -07:00
Simonas Kazlauskas
d104e5bfb7 Up the LLVM
Fixes #36474
2016-09-17 18:40:40 +03:00
bors
fb62f4d544 Auto merge of #36490 - bluss:zip-slightly-despecialized-edition, r=alexcrichton
Remove data structure specialization for .zip() iterator

Go back on half the specialization, the part that changed the Zip
struct's fields themselves depending on the types of the iterators.

Previous PR: #33090

This means that the Zip iterator will always carry two usize fields,
which are sometimes unused. If a whole for loop using a .zip() iterator is
inlined, these are simply removed and have no effect.

The same improvement for Zip of for example slice iterators remain, and
they still optimize well. However, like when the specialization of zip
was merged, the compiler is still very sensistive to the exact context.

For example this code only autovectorizes if the function is used, not
if the code in zip_sum_i32 is inserted inline where it was called:

```rust
fn zip_sum_i32(xs: &[i32], ys: &[i32]) -> i32 {
    let mut s = 0;
    for (&x, &y) in xs.iter().zip(ys) {
        s += x * y;
    }
    s
}

fn zipdot_i32_default_zip(b: &mut test::Bencher)
{
    let xs = vec![1; 1024];
    let ys = vec![1; 1024];

    b.iter(|| {
        zip_sum_i32(&xs, &ys)
    })
}
```

Include a test that checks that `Zip<T, U>` is covariant w.r.t. T and U.

Fixes #35727
2016-09-17 08:23:44 -07:00
bors
cde61ba7f7 Auto merge of #36485 - nnethercote:char_lit-2, r=nagisa
Overhaul char_lit()

This commit does the following.

- Removes parsing support for '\X12', '\u123456' and '\U12345678' char
  literals. These are no longer valid Rust and rejected by the lexer.
  (This strange-sounding situation occurs because the parser rescans
  char literals to compute their value.)

- Rearranges the function so that all the escaped values are handled in
  a single `match`. The error-handling strategy is based on the one used
  by byte_lit().
2016-09-17 02:51:13 -07:00
bors
141012dd52 Auto merge of #36482 - jseyfried:dont_load_unconfigured_noninline_modules, r=nrc
Avoid loading and parsing unconfigured non-inline modules.

For example, `#[cfg(any())] mod foo;` will always compile after this PR, even if `foo.rs` and `foo/mod.rs` do not exist or do not contain valid Rust.

Fixes #36478 and fixes #27873.

r? @nrc
2016-09-16 23:29:15 -07:00
bors
9dc9f340cc Auto merge of #36468 - michaelwoerister:collect-vtable-drop-glue, r=eddyb
trans: Let the collector find drop-glue for all vtables, not just VTableImpl.

This fixes #36260. So far, the collector has only recorded drop-glue for insertion into a vtable if the vtable was for an impl. But there's actually no reason why it shouldn't do just the same for closure vtables, afaict.

r? @eddyb
cc @rust-lang/compiler
2016-09-16 19:52:53 -07:00
Cobrand
d8b2cfeae6 Remove stray println! when invoking error E0316 2016-09-16 23:52:03 +02:00
Mark-Simulacrum
ad63215732 Add links between format_args! macro and std::fmt::Arguments struct 2016-09-16 15:33:53 -06:00
bors
d4037fc476 Auto merge of #36444 - jseyfried:macro_rules_ext, r=nrc
Remove variant `MacroRulesTT` of `SyntaxExtension`

r? @nrc
2016-09-16 14:15:13 -07:00
Mikhail Modin
82639d4f04 fix top level attr spans 2016-09-16 21:44:15 +03:00
bors
55a61a1175 Auto merge of #36536 - jonathandturner:rollup, r=jonathandturner
Rollup of 8 pull requests

- Successful merges: #36383, #36424, #36480, #36484, #36505, #36509, #36519, #36521
- Failed merges:
2016-09-16 10:45:35 -07:00
Patrick Walton
e8a44d29b6 librustc_mir: Remove &*x when x has a reference type.
This introduces a new `InstCombine` pass for us to place such peephole
optimizations.
2016-09-16 09:30:51 -07:00
Jonathan Turner
ab7425dcd4 Rollup merge of #36521 - Mark-Simulacrum:documentation-fix, r=apasel422
Fix language in documentation comment.
2016-09-16 09:29:49 -07:00
Jonathan Turner
919cbc0168 Rollup merge of #36519 - Mark-Simulacrum:example-asmut, r=GuillaumeGomez
Add example in AsMut trait documentation

Let me know of any changes I should make.

r? @GuillaumeGomez
2016-09-16 09:29:49 -07:00
Jonathan Turner
c6f1db6f60 Rollup merge of #36509 - nagisa:rustbuild-py3, r=alexcrichton
Try to support py3 with rustbuild better

Annoying to have it fail when you run with `python` only to have to rerun later with `python2`.

r? @alexcrichton
2016-09-16 09:29:49 -07:00
Jonathan Turner
390e8bd15d Rollup merge of #36505 - nagisa:temp-stack-size, r=eddyb
Default RUST_MIN_STACK to 16MiB for now

Temporary(?) workaround to https://github.com/rust-lang/rust/issues/35408.

cc @nikomatsakis if you want to veto the idea.

r? @eddyb
2016-09-16 09:29:48 -07:00
Jonathan Turner
ff224e7d8d Rollup merge of #36484 - frewsxcv:patch-33, r=eddyb
Don't ignore a doc code-block we can compile.
2016-09-16 09:29:48 -07:00
Jonathan Turner
77c7ff5b46 Rollup merge of #36480 - tshepang:stronger-pause, r=steveklabnik
doc: make that sound better
2016-09-16 09:29:48 -07:00
Jonathan Turner
d48f17b21e Rollup merge of #36424 - kmcallister:gh-29361-marker-docs, r=GuillaumeGomez
Tweak std::marker docs

Fixes #29361.

r? @GuillaumeGomez
2016-09-16 09:29:48 -07:00