Commit Graph

56812 Commits

Author SHA1 Message Date
Michael Woerister
8b67ad69a7 incr.comp. Add tests for stable span hashing. 2016-09-01 09:43:44 -04:00
Michael Woerister
e355ec1c6a incr.comp.: Add stable hashing of HIR spans to ICH. 2016-09-01 09:43:44 -04:00
Michael Woerister
8e4f4810dc Fill some holes in SVH/ICH computation, making it more strict. 2016-09-01 09:43:44 -04:00
Michael Woerister
dd65cb223a Add some infrastructure for timing things where time_passes can't be used. 2016-09-01 09:43:18 -04:00
Mohit Agarwal
7d5fa9edc9
configure: check if any of the arguments contain --help
Currently it checks only the first argument.

Fixes #31216
2016-09-01 18:49:35 +05:30
bors
147371f58f Auto merge of #34982 - arielb1:bad-tuples-and-objects, r=nikomatsakis
Turn the RFC1592 warnings into hard errors

The warnings have already reached stable, and I want to improve the trait error reporting code.

Turning warnings into errors, this is obviously a [breaking-change].

r? @nikomatsakis

cc @rust-lang/compiler
2016-09-01 06:05:04 -07:00
Ariel Ben-Yehuda
7b92d05804 turn the RFC1592 warnings into hard errors
The warnings have already reached stable

The test rfc1592_deprecated is covered by `bad_sized` and
`unsized6`.

Fixes #33242
Fixes #33243
2016-09-01 13:34:56 +03:00
bors
b2799a56a1 Auto merge of #35755 - SimonSapin:char_convert, r=alexcrichton
Implement std::convert traits for char

This is motivated by avoiding the `as` operator, which sometimes silently truncates, and instead use conversions that are explicitly lossless and infallible.

I’m less certain that `From<u8> for char` should be implemented: while it matches an existing behavior of `as`, it’s not necessarily the right thing to use for non-ASCII bytes. It effectively decodes bytes as ISO/IEC 8859-1 (since Unicode designed its first 256 code points to be compatible with that encoding), but that is not apparent in the API name.
2016-09-01 02:53:28 -07:00
CensoredUsername
3d766a0779 the win64 calling convention is also used on x86_64-pc-windows-gnu, so ignore windows entirely instead of just msvc 2016-09-01 10:35:37 +02:00
Nick Cameron
377be7a501 review comments 2016-09-01 14:55:28 +12:00
Nick Cameron
4dc7b585a2 save-analysis: add parent info to api dumps
The parent id is used for constructing rustdoc URLs by clients
2016-09-01 14:55:27 +12:00
Nick Cameron
4e4306c6df Thread visibility info through save-analysis and filter save-analysis-api on it. 2016-09-01 14:55:27 +12:00
Nick Cameron
c7dfc89f85 JsonApiDumper 2016-09-01 14:55:27 +12:00
Nick Cameron
cbafc5758b save-analsysis: add save-analysis-api CLI flag 2016-09-01 14:55:27 +12:00
Niko Matsakis
00d208eea8 remove normalize_infer_ctxt constructor 2016-08-31 22:06:01 -04:00
Jonathan Turner
439afcd974 Update error message for lifetime of borrowed values 2016-08-31 17:48:26 -07:00
bors
3135b7877a Auto merge of #36177 - jonathandturner:rollup, r=jonathandturner
Rollup of 13 pull requests

- Successful merges: #35773, #35786, #35911, #35927, #36083, #36087, #36098, #36114, #36118, #36123, #36129, #36152, #36169
- Failed merges:
2016-08-31 17:40:39 -07:00
Jonathan Turner
1b0476297e Special case a few colors for Windows 2016-08-31 15:19:43 -07:00
Matthew Piziak
9a400f0a31 replace ../ with ../../std/ to support core docs 2016-08-31 18:17:44 -04:00
Niko Matsakis
7057c421c0 cache projections in trans 2016-08-31 17:47:33 -04:00
Eduard Burtescu
f5c7752742 Fix optimization regressions for operations on [x; n]-initialized arrays. 2016-09-01 00:27:03 +03:00
Niko Matsakis
c5be6f6cc6 add cache to shared context for proj 2016-08-31 17:05:53 -04:00
Niko Matsakis
72694d5829 give apply_param_substs a SharedCrateContext
I plan to put a cache on the shared context, for now at least.
2016-08-31 17:05:53 -04:00
Jonathan Turner
5c97100058 Rollup merge of #36169 - wdv4758h:librustc_plugin_docs, r=nikomatsakis
Change 'rustc::plugin' to 'rustc_plugin' in doc comment

It looks like there is a missing one.
2016-08-31 13:53:36 -07:00
Jonathan Turner
240d86b631 Rollup merge of #36152 - dns2utf8:man_page_date, r=nikomatsakis
Update man pages

Until I finish #35438
2016-08-31 13:53:35 -07:00
Jonathan Turner
1a1e9b0b6a Rollup merge of #36129 - eddyb:signal-exit-status, r=alexcrichton
Fix run-pass/signal-exit-status to not trigger UB by writing to NULL.

`run-pass/signal-exit-status` has had UB (NULL dereference) since it was introduced in #10109.
Fixes the test failure found by @camlorn while running under Windows Subsystem for Linux.
2016-08-31 13:53:35 -07:00
Jonathan Turner
e69d65cc0b Rollup merge of #36123 - nagisa:unignore-json-tests, r=alexcrichton
Unignore the json tests on 32-bit platforms

cc #14064

r? @alexcrichton
2016-08-31 13:53:35 -07:00
Jonathan Turner
6e045cc2be Rollup merge of #36118 - nagisa:windows-has-no-sprint-again, r=brson
Fix the test_variadic_ptr fn on printf-less sys

Fixes #36076
2016-08-31 13:53:35 -07:00
Jonathan Turner
5dc779ba52 Rollup merge of #36114 - zjhmale:fix-E0393, r=jonathandturner
Update E0393 to new error format

Fixes #35632.
Part of #35233.

r? @jonathandturner

and a wired thing is that if i add another label

```rust
.span_label(span, &format!("missing reference to `{}`", def.name))
.span_label(span, &format!("because of the default `Self` reference, type parameters must be specified on object types"))
```

and add a new note in the test case like

```rust
trait A<T=Self> {}

fn together_we_will_rule_the_galaxy(son: &A) {}
//~^ ERROR E0393
//~| NOTE missing reference to `T`
//~| NOTE because of the default `Self` reference, type parameters must be specified on object types
```

it will complain that

```
running 1 test
test [compile-fail] compile-fail/E0393.rs ... FAILED

failures:

---- [compile-fail] compile-fail/E0393.rs stdout ----

error: /Users/zjh/Documents/rustspace/rust/src/test/compile-fail/E0393.rs:13: unexpected "error": '13:43: 13:44: the type parameter `T` must be explicitly specified [E0393]'

unexpected errors (from JSON output): [
    Error {
        line_num: 13,
        kind: Some(
            Error
        ),
        msg: "13:43: 13:44: the type parameter `T` must be explicitly specified [E0393]"
    }
]
```

it is a little bit confusing and through the blog post we can use `//~^` and `//~|` to support multiple notes, @jonathandturner am i missing something here?
2016-08-31 13:53:34 -07:00
Jonathan Turner
bbb2d1d0ac Rollup merge of #36098 - king6cong:master, r=alexcrichton
fix git submodule status check

None
2016-08-31 13:53:34 -07:00
Jonathan Turner
1afe1ea003 Rollup merge of #36087 - apasel422:issue-28324, r=alexcrichton
Add test for #28324

Closes #28324
2016-08-31 13:53:34 -07:00
Jonathan Turner
e845da90f9 Rollup merge of #36083 - GuillaumeGomez:missing_convert_urls, r=steveklabnik
Add missing urls into convert module

r? @steveklabnik
2016-08-31 13:53:34 -07:00
Jonathan Turner
bfe51295b3 Rollup merge of #35927 - matthew-piziak:bitandassign-example, r=GuillaumeGomez
replace `BitAndAssign` example with something more evocative

This is the augmented-assignment version of PR #35809.

r? @GuillaumeGomez
2016-08-31 13:53:33 -07:00
Jonathan Turner
117cbb879e Rollup merge of #35911 - tbu-:pr_io_errorkind_traits, r=alexcrichton
Implement more traits for `std::io::ErrorKind`

This makes it possible to use it as key in various maps.
2016-08-31 13:53:33 -07:00
Jonathan Turner
4bc5bcd812 Rollup merge of #35786 - GuillaumeGomez:paths_doc, r=steveklabnik
Improve Path and PathBuf docs

r? @steveklabnik
2016-08-31 13:53:33 -07:00
Jonathan Turner
c75fd78de3 Rollup merge of #35773 - EugeneGonzalez:master, r=jonathandturner
Change E0259 to the new error format

Fixes #35514 as part of #35233.

Sorry about creating a new PR I was having a lot of troubles squashing the commit because I didn't properly branch the new feature.

r? @GuillaumeGomez
2016-08-31 13:53:33 -07:00
bors
2c01bb8851 Auto merge of #35718 - michaelwoerister:incr-comp-dir-locking, r=alexcrichton
Implement synchronization scheme for incr. comp. directory

This PR implements a copy-on-write-based synchronization scheme for the incremental compilation cache directory. For technical details, see the documentation at the beginning of `rustc_incremental/persist/fs.rs`.

The PR contains unit tests for some functions but for testing whether the scheme properly handles races, a more elaborate test setup would be needed. It would probably involve a small tool that allows to manipulate the incremental compilation directory in a controlled way and then letting a compiler instance run against directories in different states. I don't know if it's worth the trouble of adding another test category to `compiletest`, but I'd be happy to do so.

Fixes #32754
Fixes #34957
2016-08-31 12:56:15 -07:00
Niko Matsakis
4eb7362c2c simplify DepNode for trait selection 2016-08-31 15:23:50 -04:00
Niko Matsakis
b44d94a516 remove unneccessary uses of drain_fulfillment_cx
There were various places that we are invoking `drain_fulfillment_cx`
with a "result" of `()`. This is kind of pointless, since it amounts to
just a call to `select_all_or_error` along with some extra overhead.
2016-08-31 15:23:50 -04:00
Niko Matsakis
52c2d87aa9 remove unused normalize field 2016-08-31 15:23:49 -04:00
Federico Ravasio
638b7c89e6 Updated E0493 to new format. 2016-08-31 18:48:11 +02:00
bors
7a187c39c7 Auto merge of #36166 - jonathandturner:rollup, r=jonathandturner
Rollup of 16 pull requests

- Successful merges: #35758, #35926, #36050, #36079, #36085, #36089, #36101, #36130, #36134, #36135, #36136, #36140, #36141, #36147, #36148, #36165
- Failed merges:
2016-08-31 09:38:36 -07:00
Guillaume Gomez
96e3103cfe Improve Path and PathBuf docs 2016-08-31 17:53:01 +02:00
Chiu-Hsiang Hsu
3f7432a399 Change 'rustc::plugin' to 'rustc_plugin' in doc comment 2016-08-31 22:45:37 +08:00
Guillaume Gomez
b712f74508 Add missing urls into convert module 2016-08-31 16:15:19 +02:00
Stefan Schindler
5b5b8536b0 Update man pages 2016-08-31 15:54:34 +02:00
CensoredUsername
ad447a12b5 Add a tracking issue to the feature gate of the sysv64 ABI 2016-08-31 15:52:10 +02:00
Jonathan Turner
0cb507394e Rollup merge of #36165 - fanzier:fix-typo, r=GuillaumeGomez
Fix typo in PartialOrd docs

The inline code was formatted incorrectly because of the backtick.
2016-08-31 06:29:12 -07:00
Jonathan Turner
2040d19b94 Rollup merge of #36148 - birryree:E0194_bonus_format, r=jonathandturner
Bonus format for E0194

Bonus fix for #35280. Part of #35233. Fixes #36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.

Errors for E0194 now look like this:

```
$> ./build/x86_64-apple-darwin/stage1/bin/rustc src/test/compile-fail/E0194.rs
error[E0194]: type parameter `T` shadows another type parameter of the same name
  --> src/test/compile-fail/E0194.rs:13:26
   |
11 | trait Foo<T> { //~ NOTE first `T` declared here
   |           - first `T` declared here
12 |     fn do_something(&self) -> T;
13 |     fn do_something_else<T: Clone>(&self, bar: T);
   |                          ^ shadows another type parameter

error: aborting due to previous error
```

r? @jonathandturner
2016-08-31 06:29:11 -07:00
Jonathan Turner
6631d8e9c6 Rollup merge of #36147 - mikhail-m1:master, r=jonathandturner
update E0265 to new format

Fixes #35309 as part of #35233.
I've describe partially bonus achieve in #35309

r? @jonathandturner
2016-08-31 06:29:11 -07:00