Commit graph

95887 commits

Author SHA1 Message Date
Mazdak Farrokhzad
0224532493
Rollup merge of #62133 - petrochenkov:norustc, r=eddyb
Feature gate `rustc` attributes harder

Fixes https://github.com/rust-lang/rust/issues/62116
2019-07-05 20:26:54 +02:00
Mazdak Farrokhzad
40841e049a
Rollup merge of #62110 - nnethercote:improve-Ztime-passes, r=Zoxc
Improve -Ztime-passes

Two improvements that make `-Ztime-passes` more useful.

r? @Zoxc
2019-07-05 20:26:52 +02:00
Mazdak Farrokhzad
485a084b45
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Implement another internal lints

cc #49509

This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~

~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~

TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) 🤔 cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros

r? @oli-obk
2019-07-05 20:26:51 +02:00
Yuki Okushi
1640ab2e1f Fix test annotation 2019-07-06 02:06:39 +09:00
Yuki Okushi
211b52bb23 Update rustc-guide 2019-07-06 02:06:00 +09:00
Yuki Okushi
db93d01493 Remove compile-pass from error codes' explanation 2019-07-06 02:06:00 +09:00
Yuki Okushi
ce77031e96 Remove compile-pass from compiletest
Also change annotations in some tests
2019-07-06 02:06:00 +09:00
Jethro Beekman
7fb17d868b Remove last use of mem::uninitialized in SGX 2019-07-05 09:03:49 -07:00
Mark Rousskov
f01e5e6ce7 Lint on invalid values passed to x.py --warnings
This also introduces support for `--warnings allow` and fixes --warnings
being overridden by the configuration file, config.toml.
2019-07-05 10:14:24 -04:00
bors
853f30052d Auto merge of #62407 - Centril:rollup-g0zmff7, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #62123 ( Remove needless lifetimes (std))
 - #62150 (Implement mem::{zeroed,uninitialized} in terms of MaybeUninit.)
 - #62169 (Derive which queries to save using the proc macro)
 - #62238 (Fix code block information icon position)
 - #62292 (Move `async || ...` closures into `#![feature(async_closure)]`)
 - #62323 (Clarify unaligned fields in ptr::{read,write}_unaligned)
 - #62324 (Reduce reliance on `await!(...)` macro)
 - #62371 (Add tracking issue for Box::into_pin)
 - #62383 (Improve error span for async type inference error)
 - #62388 (Break out of the correct number of scopes in loops)

Failed merges:

r? @ghost
2019-07-05 11:53:52 +00:00
Mazdak Farrokhzad
18081890ea
Rollup merge of #62388 - rust-lang:fix-loop-break-mir-generation, r=eddyb
Break out of the correct number of scopes in loops

We were incorrectly breaking out of one too many drop scopes when
generating MIR for loops and breakable blocks, resulting in use after
free and associated borrow checker warnings.

This wasn't noticed because the scope that we're breaking out of twice
is only used for temporaries that are created for adjustments applied to
the loop. Since loops generally propagate coercions to the `break`
expressions, the only case we see this is when the type of the loop is a
smart pointer to a trait object.

Closes #62312
2019-07-05 13:53:13 +02:00
Mazdak Farrokhzad
cc696b957b
Rollup merge of #62383 - Aaron1011:fix/async-error-span, r=varkor
Improve error span for async type inference error

Fixes #62382

Previously, we would point at the spawn of the 'await' expression,
instead of the actual expression with an unknown type.
2019-07-05 13:53:11 +02:00
Mazdak Farrokhzad
ccd925bc7d
Rollup merge of #62371 - Nemo157:fix-62288, r=Centril
Add tracking issue for Box::into_pin

Fixes #62288
2019-07-05 13:53:10 +02:00
Mazdak Farrokhzad
7d6e43177c
Rollup merge of #62324 - Centril:reduce-await-macro-reliance, r=cramertj
Reduce reliance on `await!(...)` macro

Only the last commit is new.

r? @cramertj
2019-07-05 13:53:09 +02:00
Mazdak Farrokhzad
d3569ddf32
Rollup merge of #62323 - Centril:clarify-read-unaligned, r=RalfJung
Clarify unaligned fields in ptr::{read,write}_unaligned

r? @RalfJung
2019-07-05 13:53:07 +02:00
Mazdak Farrokhzad
84527e4676
Rollup merge of #62292 - Centril:split-async-closures, r=cramertj
Move `async || ...` closures into `#![feature(async_closure)]`

The `async || expr` syntax is moved out from `#![feature(async_await)]` into its own gate `#![feature(async_closure)]`.

New tracking issue: https://github.com/rust-lang/rust/issues/62290

Closes https://github.com/rust-lang/rust/issues/62214.

cc https://github.com/rust-lang/rust/issues/62149

r? @varkor
2019-07-05 13:53:06 +02:00
Mazdak Farrokhzad
61256a8164
Rollup merge of #62238 - GuillaumeGomez:fix-code-block-information-icon-pos, r=QuietMisdreavus
Fix code block information icon position

Fixes #62118.

A screenshot of the fix:

<img width="720" alt="Screenshot 2019-06-29 at 18 28 59" src="https://user-images.githubusercontent.com/3050060/60386900-edb23b80-9a9b-11e9-9f4f-0f343674348c.png">

r? @rust-lang/rustdoc
2019-07-05 13:53:04 +02:00
Mazdak Farrokhzad
4b21e20f8e
Rollup merge of #62169 - Zoxc:store-query-results, r=eddyb
Derive which queries to save using the proc macro

Based on https://github.com/rust-lang/rust/pull/62166.

r? @eddyb
2019-07-05 13:53:02 +02:00
Mazdak Farrokhzad
1d45156866
Rollup merge of #62150 - alex:mem-uninit-refactor, r=RalfJung
Implement mem::{zeroed,uninitialized} in terms of MaybeUninit.

Refs #62061

r? @oli-obk
2019-07-05 13:53:00 +02:00
Mazdak Farrokhzad
0f92eb8a4a
Rollup merge of #62123 - jeremystucki:needless_lifetimes_std, r=alexcrichton
Remove needless lifetimes (std)

Split from #62039
2019-07-05 13:52:58 +02:00
Eduard-Mihai Burtescu
050a71b570 rustc_target: avoid negative register counts in the SysV x86_64 ABI. 2019-07-05 13:24:25 +03:00
Simon Sapin
e808d921dd Replace SliceConcatExt trait with inherent methods and SliceConcat helper trait
Before this change `SliceConcatExt` was an unstable extension trait
with stable methods. It was in the libstd prelude, so that its methods
could be used on the stable channel.

This replaces it with inherent methods,
which can be used without any addition to the prelude.
Since the methods are stable and very generic
(with for example a return type that depends on the types of parameters),
an helper trait is still needed.
But now that trait does not need to be in scope for the methods to be used.

Removing this depedency on the libstd prelude allows the methods to be used
in `#![no_std]` crate that use liballoc, which does not have its own
implicitly-imported prelude.
2019-07-05 11:49:30 +02:00
bors
f119bf2761 Auto merge of #62099 - Mark-Simulacrum:syntax-print-clean-2, r=eddyb
Remove io::Result from syntax::print

Since we're now writing directly to the vector, there's no need to
thread results through the whole printing infrastructure
2019-07-05 06:55:48 +00:00
Ralf Jung
50510e4491 remove Scalar::is_null_ptr
Miri does not need it any more and it is otherwise unused
2019-07-05 08:44:19 +02:00
bors
baab1914ec Auto merge of #62376 - Mark-Simulacrum:1.38-nightly, r=alexcrichton
Switch master to 1.38
2019-07-05 03:33:03 +00:00
Mark Rousskov
007d87f171 Permit use of mem::uninitialized via allow(deprecated) 2019-07-04 21:01:35 -04:00
Nicholas Nethercote
87b103d4a9 Add a "total" measurement to -Ztime-passes.
This is useful for getting the total compilation time at the end.
To do this, the patch changes `print_time_passes_entry` to not increment
the depth, which means that `print_time_passes_entry_internal` is no
longer needed.
2019-07-05 08:19:48 +10:00
Nicholas Nethercote
90419d36bd Remove solve_nll_region_constraints measurements from -Ztime-passes output.
Because it pollutes the output with hundreds or thousands of
uninteresting lines for which the time duration is always(?) 0.000s.
2019-07-05 08:19:43 +10:00
bors
4ca7a349da Auto merge of #62153 - alexcrichton:parallel-compress, r=Mark-Simulacrum
Update the `rust-installer` submodule

This pulls in a commit which uses parallel xz encoding which should
hopefully help shave some time off the dist builders which spend an
inordinate amount of time compressing this data.
2019-07-04 22:14:08 +00:00
Mark Brooks
f4b30f4bae
Update README.md 2019-07-04 17:35:26 -04:00
Matthew Jasper
1b7ffe5300 Break out of the correct number of scopes in loops
We were incorrectly breaking out of one too many drop scopes when
generating MIR for loops and breakable blocks, resulting in use after
free and associated borrow checker warnings.

This wasn't noticed because the scope that we're breaking out of twice
is only used for temporaries that are created for adjustments applied to
the loop. Since loops generally propagate coercions to the `break`
expressions, the only case we see this is when the type of the loop is a
smart pointer to a trait object.
2019-07-04 21:53:46 +01:00
Matthew Jasper
61ddf5e85c Create async version of the dynamic-drop test 2019-07-04 20:23:21 +01:00
Alex Crichton
2fb2e00f20 Update the rust-installer submodule
This pulls in a commit which uses parallel xz encoding which should
hopefully help shave some time off the dist builders which spend an
inordinate amount of time compressing this data.
2019-07-04 11:59:09 -07:00
bors
24a9bcbb7c Auto merge of #61392 - Zoxc:single-interner, r=eddyb
Use a single CtxtInterners

Builds on https://github.com/rust-lang/rust/pull/57214

r? @eddyb
2019-07-04 18:44:49 +00:00
Aaron Hill
779308a5e1
Improve error span for async type inference error
Fixes #62382

Previously, we would point at the spawn of the 'await' expression,
instead of the actual expression with an unknown type.
2019-07-04 14:22:47 -04:00
Paweł Romanowski
7f035baaf7 Fix a typo in Write::write_vectored docs 2019-07-04 18:44:34 +02:00
Guillaume Gomez
02886e2c51 Add missing links in Option documentation 2019-07-04 18:11:52 +02:00
Mark Rousskov
8a7dded1a2 Switch master to 1.38 2019-07-04 11:26:57 -04:00
Wesley Wiser
12672e2053 Add test for ICE #62375
Fixes #62375
2019-07-04 10:49:24 -04:00
Alex Gaynor
e4f250e405 Implement mem::{zeroed,uninitialized} in terms of MaybeUninit.
Refs #62061
2019-07-04 09:33:15 -04:00
Wim Looman
55bd2140a2 Add tracking issue for Box::into_pin 2019-07-04 12:57:34 +02:00
ljedrz
a6030ff699 infer: fix a Region-related debug message 2019-07-04 12:53:12 +02:00
ljedrz
675bfb6d16 fix a dep_graph doc regarding type_of_item 2019-07-04 12:53:12 +02:00
ljedrz
01e0d83336 infer::error_reporting: adjust 2 debug messages 2019-07-04 12:53:12 +02:00
ljedrz
c6131b23ae rename hir::map::opt_local_def_id* 2019-07-04 12:53:12 +02:00
ljedrz
37d7e1f22a rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-04 12:53:12 +02:00
ljedrz
4f7ba515c2 rename hir::map::local_def_id to local_def_id_from_node_id 2019-07-04 12:29:26 +02:00
ljedrz
7987719dbe remove FIXMEs for functions that won't go away 2019-07-04 12:29:26 +02:00
Ralf Jung
ceb496cf59 improve validity error range printing for singleton ranges 2019-07-04 10:47:23 +02:00
Ralf Jung
d9d6b3bb28 turns out that dangling pointer branch is dead code; remove it and improve the error that actually gets shown a bit 2019-07-04 10:47:23 +02:00