Commit Graph

89738 Commits

Author SHA1 Message Date
Guillaume Gomez
82e051b6ce
Rollup merge of #57926 - icefoxen:test-doc-pr, r=frewsxcv
Tiny expansion to docs for `core::convert`.

This is not really significant, accept or reject as you wish.  I just want to make sure I understand how the PR process works and that I'm doing it right before doing a bigger one for #33417.
2019-02-10 21:45:09 +01:00
Guillaume Gomez
d9f9780918
Rollup merge of #57740 - JakubOnderka:ipv4addr-to_ne_bytes, r=scottmcm
Use `to_ne_bytes` for converting IPv4Addr to octets

It is easier and it should be also faster, because [`to_ne_bytes`](https://doc.rust-lang.org/std/primitive.u32.html#method.to_ne_bytes) just calls `mem::transmute`.
2019-02-10 21:45:08 +01:00
Guillaume Gomez
e917f8b531
Rollup merge of #57259 - king6cong:master, r=alexcrichton
Update reference of rlibc crate to compiler-builtins crate

None
2019-02-10 21:45:07 +01:00
bors
0b7af2668a Auto merge of #58129 - RalfJung:maybe-uninit, r=cramertj
MaybeUninit: some docs, rename into_inner -> into_initialized, return &mut from set
2019-02-10 20:03:03 +00:00
Ralf Jung
4833074a9a fix SGX build failures 2019-02-10 19:08:49 +01:00
Pietro Albini
998e584522
bump cargo submodule 2019-02-10 18:36:00 +01:00
Matthew Jasper
d7afd3ebfb Add test for MIR printing changes 2019-02-10 17:24:18 +00:00
Guillaume Gomez
b1d82ac6ed Remove spotlight for trait aliases and fix nits 2019-02-10 16:56:21 +01:00
Matthew Jasper
18089df7e8 Fix ICE and invalid filenames in MIR printing code 2019-02-10 15:44:24 +00:00
Ralf Jung
4853ce660e it is okay not to use into_inner 2019-02-10 15:35:47 +01:00
bors
c3d2490433 Auto merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxc
Partially HirId-ify rustc

Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-10 14:30:37 +00:00
Ralf Jung
eaf81c2e3e miri value visitor: use in macro 2019-02-10 15:16:25 +01:00
Guillaume Gomez
c20357a62a Add trait aliases to js types 2019-02-10 14:49:20 +01:00
Guillaume Gomez
29354ddc15 Add style for trait aliases 2019-02-10 14:49:20 +01:00
Guillaume Gomez
74e97f3381 Add trait alias support in rustdoc 2019-02-10 14:49:20 +01:00
Vadim Petrochenkov
55f90c77e8 Fix failing tidy (line endings on Windows) 2019-02-10 16:21:47 +03:00
Ralf Jung
adb33008f7 rpath computation: explain why we pop() 2019-02-10 13:05:43 +01:00
Ralf Jung
3a3691f187 when there are multiple filenames, print what got interpreted as 2nd filename 2019-02-10 13:01:09 +01:00
bors
68650cacf2 Auto merge of #58085 - wesleywiser:profiler_2, r=wesleywiser
Implement more detailed self profiling

Timing data and cache hits/misses are now recorded at the query level.
This allows us to show detailed per query information such as total time
for each query.

To see detailed query information in the summary pass the `-Z verbose`
flag. For example:

```
rustc -Z self-profile -Z verbose hello_world.rs
```

results in something like:

```md
Self profiling results:

| Phase                                     | Time (ms)      | Time (%) | Queries        | Hits (%)
| ----------------------------------------- | -------------- | -------- | -------------- | --------
| Other                                     |            177 |    54.97 |           8094 |    45.47
| - {time spent not running queries}        |            113 |    35.09 |              0 |     0.00
| - const_eval                              |             16 |     4.97 |             26 |    11.54
| - type_of                                 |              9 |     2.80 |            627 |    27.75
| - const_eval_raw                          |              8 |     2.48 |             22 |     0.00
| - adt_def                                 |              7 |     2.17 |            381 |    11.55
| - visible_parent_map                      |              7 |     2.17 |             99 |    98.99
| - item_attrs                              |              6 |     1.86 |            698 |    50.14
| - item_children                           |              5 |     1.55 |           2815 |     0.00
| - adt_dtorck_constraint                   |              4 |     1.24 |              2 |     0.00
| - adt_destructor                          |              2 |     0.62 |             15 |    86.67
| TypeChecking                              |             53 |    16.46 |           2834 |    79.89
| - trait_impls_of                          |              9 |     2.80 |             65 |    86.15
| - evaluate_obligation                     |              7 |     2.17 |             80 |     2.50
| - const_is_rvalue_promotable_to_static    |              6 |     1.86 |              1 |     0.00
| - is_copy_raw                             |              6 |     1.86 |             29 |    58.62
| - rvalue_promotable_map                   |              6 |     1.86 |              2 |    50.00
| - {time spent not running queries}        |              6 |     1.86 |              0 |     0.00
| - typeck_item_bodies                      |              5 |     1.55 |              1 |     0.00
| - typeck_tables_of                        |              5 |     1.55 |             19 |    94.74
| - dropck_outlives                         |              2 |     0.62 |              1 |     0.00
| - layout_raw                              |              1 |     0.31 |            668 |    87.87
| Linking                                   |             48 |    14.91 |             43 |    46.51
| - {time spent not running queries}        |             48 |    14.91 |              0 |     0.00
| Codegen                                   |             29 |     9.01 |            420 |    61.90
| - {time spent not running queries}        |             16 |     4.97 |              0 |     0.00
| - collect_and_partition_mono_items        |             11 |     3.42 |             13 |    92.31
| - mir_const                               |              1 |     0.31 |              1 |     0.00
| - mir_validated                           |              1 |     0.31 |              3 |    66.67
| Expansion                                 |             14 |     4.35 |              0 |     0.00
| - {time spent not running queries}        |             14 |     4.35 |              0 |     0.00
| BorrowChecking                            |              1 |     0.31 |             12 |    41.67
| - borrowck                                |              1 |     0.31 |              2 |    50.00
| Parsing                                   |              0 |     0.00 |              0 |     0.00

Optimization level: No
Incremental: off
```

<details>
<summary>Rendered</summary>

Self profiling results:

| Phase                                     | Time (ms)      | Time (%) | Queries        | Hits (%)
| ----------------------------------------- | -------------- | -------- | -------------- | --------
| **Other**                                     |           **177** |   **54.97** |   **8094** |  **45.47**
| - {time spent not running queries}        |            113 |    35.09 |              0 |     0.00
| - const_eval                              |             16 |     4.97 |             26 |    11.54
| - type_of                                 |              9 |     2.80 |            627 |    27.75
| - const_eval_raw                          |              8 |     2.48 |             22 |     0.00
| - adt_def                                 |              7 |     2.17 |            381 |    11.55
| - visible_parent_map                      |              7 |     2.17 |             99 |    98.99
| - item_attrs                              |              6 |     1.86 |            698 |    50.14
| - item_children                           |              5 |     1.55 |           2815 |     0.00
| - adt_dtorck_constraint                   |              4 |     1.24 |              2 |     0.00
| - adt_destructor                          |              2 |     0.62 |             15 |    86.67
| TypeChecking                              |             53 |    16.46 |           2834 |    79.89
| - trait_impls_of                          |              9 |     2.80 |             65 |    86.15
| - evaluate_obligation                     |              7 |     2.17 |             80 |     2.50
| - const_is_rvalue_promotable_to_static    |              6 |     1.86 |              1 |     0.00
| - is_copy_raw                             |              6 |     1.86 |             29 |    58.62
| - rvalue_promotable_map                   |              6 |     1.86 |              2 |    50.00
| - {time spent not running queries}        |              6 |     1.86 |              0 |     0.00
| - typeck_item_bodies                      |              5 |     1.55 |              1 |     0.00
| - typeck_tables_of                        |              5 |     1.55 |             19 |    94.74
| - dropck_outlives                         |              2 |     0.62 |              1 |     0.00
| - layout_raw                              |              1 |     0.31 |            668 |    87.87
| Linking                                   |             48 |    14.91 |             43 |    46.51
| - {time spent not running queries}        |             48 |    14.91 |              0 |     0.00
| Codegen                                   |             29 |     9.01 |            420 |    61.90
| - {time spent not running queries}        |             16 |     4.97 |              0 |     0.00
| - collect_and_partition_mono_items        |             11 |     3.42 |             13 |    92.31
| - mir_const                               |              1 |     0.31 |              1 |     0.00
| - mir_validated                           |              1 |     0.31 |              3 |    66.67
| Expansion                                 |             14 |     4.35 |              0 |     0.00
| - {time spent not running queries}        |             14 |     4.35 |              0 |     0.00
| BorrowChecking                            |              1 |     0.31 |             12 |    41.67
| - borrowck                                |              1 |     0.31 |              2 |    50.00
| Parsing                                   |              0 |     0.00 |              0 |     0.00

Optimization level: No
Incremental: off

</details>
cc @nikomatsakis @michaelwoerister @Zoxc

Fixes #54141
2019-02-10 11:18:50 +00:00
bors
de111e6367 Auto merge of #58103 - RalfJung:mir-shim-dump, r=eddyb
Make -Zdump-mir dump shims

Fixes https://github.com/rust-lang/rust/issues/53532 by (a) making the MIR shim generation use the MIR pass infrastructure, and (b) fixing said infrastructure to handle the fallout.

Cc @eddyb @oli-obk
2019-02-10 08:52:10 +00:00
Taiki Endo
2be0993c4e Revert removed #![feature(nll)] 2019-02-10 16:13:30 +09:00
bors
2e08bb1dd2 Auto merge of #58339 - Mark-Simulacrum:embedded-book, r=Mark-Simulacrum
Add EmbeddedBook to test list in bootstrap

r? @alexcrichton
2019-02-10 04:34:12 +00:00
Mark Rousskov
80942e95ea Add EmbeddedBook to test list in bootstrap 2019-02-09 19:42:23 -07:00
bors
1bfb44133d Auto merge of #57770 - Zoxc:no-hash-query, r=michaelwoerister
Add a query type which is always marked as red if it runs

This is useful for queries which produce results which are very likely to change if their inputs do.

I also expect this to be useful for end to end queries because 1) we don't need `HashStable` impls and 2) we avoid the overhead of hashing the result of large results like the AST or the HIR map.

r? @michaelwoerister
2019-02-10 01:33:17 +00:00
bors
abcfc3b762 Auto merge of #58065 - alexreg:refactor-smart_resolve_path_fragment, r=petrochenkov
Factor out error reporting from `smart_resolve_path_fragment` fn

This function was ridiculously monolithic before. We now have three rather-less-monolithic-and-horrifying functions.

r? @centril
2019-02-09 23:02:15 +00:00
Ralf Jung
a01efbcbec operand-to-place copies should never be overlapping 2019-02-09 21:24:29 +01:00
bors
3315728c06 Auto merge of #57944 - estebank:unclosed-delim-the-quickening, r=oli-obk
Deduplicate mismatched delimiter errors

Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently.

Second attempt at #54029, follow up to #53949. Fix #31528.
2019-02-09 20:15:57 +00:00
Matthias Einwag
1ef34a5a39 Remove rustdoc test which referenced unstable API 2019-02-09 12:09:12 -08:00
Matthew Jasper
0a16b8754a Use ? in librustc macros 2019-02-09 16:29:31 +00:00
ljedrz
eb669b3a83 cleanup: remove hir_path_str 2019-02-09 16:37:17 +01:00
ljedrz
3a1a704903 cleanup: rename node_id_to_type(_opt) 2019-02-09 16:37:15 +01:00
bors
4c9233cdeb Auto merge of #57885 - arielb1:xform-probe, r=nikomatsakis
Avoid committing to autoderef in object method probing

This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).

Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.

r? @nikomatsakis
2019-02-09 15:11:43 +00:00
Harald Hoyer
f06af1ff17
impl iter_sources() and iter_chain() for dyn Error
Examples:

```rust
let next_error_type_a = err
    .iter_chain()
    .filter_map(Error::downcast_ref::<ErrorTypeA>)
    .next();
```

```rust
let source_root_error = err.iter_chain().last();
```

Credit for the ErrorIter goes to Tim Diekmann
https://www.reddit.com/r/rust/comments/aj3lpg/is_an_iterator_impl_over_errorsource_possible/
2019-02-09 16:04:25 +01:00
Ralf Jung
66adf52e7d miri: give non-generic functions a stable address 2019-02-09 15:44:54 +01:00
Taiki Endo
be71fccf11 librustc_codegen_ssa => 2018 2019-02-09 23:31:47 +09:00
bors
d329d46a3f Auto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obk
Make `intern_lazy_const` actually intern its argument.

Currently it just unconditionally allocates it in the arena.

For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.

For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.

Fixes #57432, fixes #57829.
2019-02-09 12:38:51 +00:00
Ralf Jung
544b3a1bb4 fix rebase fallout 2019-02-09 12:19:04 +01:00
Ralf Jung
a413242efe fix printing closures 2019-02-09 12:11:13 +01:00
Ralf Jung
84d75dbd7e fix node classification 2019-02-09 12:11:12 +01:00
Ralf Jung
27ce224a8f fix --emit=mir: StructCtors are functions 2019-02-09 12:11:12 +01:00
Ralf Jung
fed4c5d9e1 disambiguate filenames of multiple drop shims being dumped 2019-02-09 12:11:12 +01:00
Ralf Jung
2708946787 pass full InstanceDef to run_passes 2019-02-09 12:11:12 +01:00
Ralf Jung
cd2169682e fix rebase fallout: AnonConsts are Consts, and Methods are functions 2019-02-09 12:11:12 +01:00
Ralf Jung
276219e0e2 fix dumping MIR from another crate 2019-02-09 12:11:12 +01:00
Ralf Jung
f5bbcf3818 use pass infrastructure for mir shims, so that they can get dumped 2019-02-09 12:08:39 +01:00
bors
618f5a08a1 Auto merge of #57617 - mark-i-m:multiple-matcher-bindings, r=petrochenkov
Error on duplicate matcher bindings

fix  #57593

This should not be merged without a crater run and maybe an FCP. Discussion is ongoing at  #57593.

TODO:
- [x] write tests
- [x] crater run
- [x] ~maybe need edition gating?~ not for 1 regression /centril

r? @petrochenkov
2019-02-09 09:48:41 +00:00
Taiki Endo
06b63046b2 Cleanup imports 2019-02-09 17:13:39 +09:00
Taiki Endo
360e65db7a Move some tests into the tests directory
This moves tests in opaque.rs and tests other than tests that require
private items in json.rs into tests/opaque.rs and tests/json.rs.
2019-02-09 17:12:04 +09:00
Robert Hayek
caf7126ee8
Some writing improvement, conciseness of intro 2019-02-09 00:46:27 -05:00
bors
312f3827fa Auto merge of #57184 - varkor:deny-warnings-lib, r=Mark-Simulacrum
Deny warnings in libcore and libstd

This probably fixes https://github.com/rust-lang/rust/issues/57178 (though there may still be some crates that need warnings denied). At least after this change, rustc currently produces no warnings during compilation.

r? @oli-obk
2019-02-09 03:54:31 +00:00