Commit graph

96348 commits

Author SHA1 Message Date
Ralf Jung
85d76a1b48 bump compiler_builtins 2019-07-15 16:58:07 +02:00
Ralf Jung
6e8e18e3fc ignore some codegen tests in debug mode 2019-07-15 16:56:43 +02:00
Valentin Tolmer
009c4a7efe Add debug assertions to write_bytes and copy* 2019-07-15 16:56:43 +02:00
Igor Matuszewski
ae75311823 Add Callbacks::after_expansion 2019-07-15 16:53:18 +02:00
gnzlbg
d2c489a272 Update stdarch 2019-07-15 16:29:12 +02:00
bors
92b0f52584 Auto merge of #62667 - petrochenkov:printattr2, r=Mark-Simulacrum
pprust: Improve pretty-printing of delimited token groups

The commit "Do not convert attributes into `MetaItem`s for printing" fixes https://github.com/rust-lang/rust/issues/62628.

Other commits fix regressions from abandoning `MetaItem`s, and make formatting for attributes, macro calls, macro definitions and other delimited token groups better and more consistent.

r? @Mark-Simulacrum
2019-07-15 12:29:53 +00:00
gnzlbg
677cf3de3a Add rtm and f16c features to libcore 2019-07-15 14:05:39 +02:00
gnzlbg
77c14a5c5f Update the stdarch submodule 2019-07-15 14:05:28 +02:00
Nikita Popov
866f409f1b Relax checks in pgo-instrumentation codegen test
Don't require a specific order for the per-function globals, and
don't require the locals to have private linkage (apparently
internal linkage is also possible).
2019-07-15 14:01:26 +02:00
Vadim Petrochenkov
0cdd18d0a7 pprust: Support macro macros 2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
a2a1cd1864 pprust: Fix formatting regressions from the previous commits
Fix some remaining cases of bad formatting
Update some failing tests
2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
75896011dc pprust: Do not convert attributes into MetaItems for printing
Fixes https://github.com/rust-lang/rust/issues/62628
2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
160c40bc88 pprust: Remove the box from print_tts
Wrap the whole attribute into a box instead
2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
11585b598c pprust: Use print_mac_common for delimited token groups 2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
23c5c1bfe7 pprust: Use print_mac_common for attributes 2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
500b00127b pprust: Use print_mac_common for macro_rules definitions 2019-07-15 12:42:07 +03:00
Vadim Petrochenkov
65a714a6a0 pprust: Move some methods to the PrintState trait
So that path and macro argument printing code can be shared
2019-07-15 12:42:07 +03:00
bors
5480b47d7f Auto merge of #62629 - matthewjasper:cleanup-borrowck-errors, r=petrochenkov
Cleanup borrowck errors

This removes some of the unnecessary code that allowed sharing error reporting between two borrow checkers.

closes #59193
2019-07-15 09:05:18 +00:00
Nikita Popov
a5c3956a75 Don't add extra passes into the function pass manager
Exception for specific cases like linting, additional passes should
be going into the module pass manager (even if they are function
passes). The separate function pass manager is only used for very
early optimization passes.

Rather than apparending passes to the MPM, use the OptimizerLast
and EnabledOnOptLevel0 pass manager builder extension hooks, which
allow adding passes directly before finalization (alias
canonicalization and name-anon-globals).

The main effect and purpose of this change is to add sanitizer
passes at the end of the pipeline, which is where they belong.
In LLVM 9 the address sanitizer can't be used as a pass in the
early function pass manager, because it has a dependence on a
module-level analysis pass.
2019-07-15 09:45:14 +02:00
Nikita Popov
2c102cb4ab Disable building of LLDB 2019-07-15 09:45:14 +02:00
Nikita Popov
87040140de Update transparent aggregate codegen test for byval changes 2019-07-15 09:45:14 +02:00
bors
9bb855cda0 Auto merge of #62674 - RalfJung:miri-abi, r=eddyb
RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust

r? @eddyb
2019-07-15 05:40:41 +00:00
Alessandro Decina
acfe99a98e Add missing trailing newline 2019-07-15 14:27:08 +10:00
nathanwhit
c221e93fcd Add info about undefined behavior to as_ref suggestions 2019-07-14 23:05:03 -04:00
bors
e452e2929d Auto merge of #62670 - estebank:extern-fn-with-body, r=petrochenkov
Detect `fn` with a body in an `extern` block

Fix #62109.
2019-07-15 02:13:55 +00:00
Caio
5ad4901bc9 Add newline 2019-07-14 22:28:42 -03:00
Andrei Homescu
0c981e0a8a Make VaListImpl<'f> invariant over the 'f lifetime 2019-07-14 18:14:15 -07:00
Caio
d326d53d90 Chapter for param_attrs 2019-07-14 22:03:19 -03:00
Alessandro Decina
a907b7c519 Normalize type parameters in create_mono_items_for_default_impls.
Fixes http://github.com/rust-lang/rust/issues/58375
2019-07-15 10:28:17 +10:00
bors
d82fd9ecd3 Auto merge of #62643 - estebank:parse-recovery-type-errs, r=petrochenkov
Do not emit type errors after parse error in last statement of block

When recovering from a parse error inside a block, do not emit type
errors generating on that block's recovered return expression.

Fix #57383.
2019-07-14 22:51:05 +00:00
Dylan MacKenzie
2ce227dcc6 Actually call visit_block_entry in DataflowResultsConsumer
Previously, this callback was never actually called.
2019-07-14 13:45:43 -07:00
Matthew Jasper
9709b73561 pub(crate) -> crate
The borrow checker code is already using `crate` extensively, so prefer
being consistent with it.
2019-07-14 20:22:20 +01:00
Matthew Jasper
abfd4d1e55 Move suggest_ref_mut into rustc_mir::borrow_check 2019-07-14 20:22:19 +01:00
Matthew Jasper
2cc2b942cf Remove BorrowckErrors trait
Its methods are now inherent methods of `MirBorrowckCtxt`
2019-07-14 20:22:19 +01:00
Matthew Jasper
37a99038d0 Remove rustc_mir::borrowck_errors::Origin 2019-07-14 20:20:50 +01:00
Matthew Jasper
2975c01747 Remove unused BorrowckErrors methods 2019-07-14 20:19:16 +01:00
bors
83e4eed16e Auto merge of #62638 - estebank:issue-62554, r=petrochenkov
Use snippet instead of pprinting statement

Fix #62554.
2019-07-14 17:29:17 +00:00
bors
85a360e0ea Auto merge of #62610 - Stargateur:fix-miri-error-cstring-into_inner, r=RalfJung
Fix miri error in into_inner() of CString

Fix #62553

I choice to not transmute because I think it's more unsafe and in case the structure change this code should always work.

r? @RalfJung
2019-07-14 13:52:40 +00:00
Andre Bogus
cb3aa4ce2c Less unsafe in the array example of MaybeUninit docs 2019-07-14 13:32:14 +02:00
Ralf Jung
6c293d8101 remove outdated comment 2019-07-14 12:23:52 +02:00
bors
7d41ebf768 Auto merge of #62464 - GuillaumeGomez:add-missing-urls-osstr, r=QuietMisdreavus
Add missing urls for osstr

r? @QuietMisdreavus
2019-07-14 10:23:05 +00:00
Ralf Jung
26528b969f RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust 2019-07-14 11:58:12 +02:00
Ralf Jung
5db782767c miri validation: better error messages for dangling references 2019-07-14 11:39:10 +02:00
Esteban Küber
f2a6a4e5af review comment 2019-07-13 22:25:23 -07:00
bors
03a68d6973 Auto merge of #62331 - wesleywiser:fix_early_return_leak, r=matthewjasper
Fix leak when early returning out of `box` syntax

Fixes #62289

r? @matthewjasper
2019-07-14 05:25:08 +00:00
Esteban Küber
c8d9cd99fa Detect fn with a body in an extern block 2019-07-13 22:24:11 -07:00
Lzu Tao
d649ff3c0c Check for lldb existences 2019-07-14 04:19:39 +00:00
Esteban Küber
6b9580b651 Suggest assoc type on type not found in trait method definition 2019-07-13 21:17:38 -07:00
Jonathan Goodman
7111328556 Don't drop DiagnosticBuilder if parsing fails
If the explicitly given type of a `self` parameter fails to parse correctly,
we need to propagate the error rather than dropping it and causing an ICE.

Fixes #62660.
2019-07-13 19:46:13 -05:00
bors
fa6b70658e Auto merge of #62560 - pietroalbini:tools-builders-on-prs, r=alexcrichton
ci: add a pr builder to test tools when submodules are updated

This PR adds the x86_64-gnu-tools builders to PRs where submodules are updated.

Since it's not possible to *start* the builder only when submodule changes are detected, I opted into adding a "decider" task at the start of the job which sets the `SKIP_JOB` environment variable when submodules are not updated, and I gated the most time-consuming tasks (the actual build and artifacts upload) on the variable not being there. All of this is conditionally included in the `steps/run.yml` only when a template parameter is present, so it should only affect that builder on PRs.

The cost for this should be a dummy builder running for 2/3 minutes for each PR, and we should be able to handle it.

Fixes https://github.com/rust-lang/rust/issues/61837
r? @alexcrichton
2019-07-14 00:20:54 +00:00