121383 Commits

Author SHA1 Message Date
Felix S. Klock II
8dabff84d7 placate tidy. 2020-06-04 12:25:18 -04:00
Felix S. Klock II
e1ebdeeefb Revert "Defer creating drop trees in MIR lowering until leaving that scope"
This reverts commit 611988551fba1bcbb33ae2e1e0171cb8d2e70d5a.
2020-06-04 11:34:42 -04:00
Felix S. Klock II
7cde4ab0d0 Revert "Reduce the number of drop-flag assignments in unwind paths"
This reverts commit 54aa418a6082b364b90feee70b07381ea266c4d5.
2020-06-04 11:31:43 -04:00
Felix S. Klock II
336d812761 Revert "Add some more comments"
This reverts commit 1a19c1da735eb1cb574ab55a3568e8c13498c490.
2020-06-04 11:31:24 -04:00
Felix S. Klock II
34c0f0599d Revert "Bless mir-opt tests"
This reverts commit a030c923412b0a0f7b02a585debe7bf60357370d.
2020-06-04 11:29:10 -04:00
Felix S. Klock II
bbe1bc4a08 Revert "Address review comments"
This reverts commit b998497bd41d6de71ec035433247dee856d1f3a5.
2020-06-04 11:27:25 -04:00
Tom Eccles
41bfd18e02 resolve: Sort E0408 errors by Symbol str
Previously errors were sorted by Symbol index instead of the string. The
indexes are not the same between architectures because Symbols for
architecture extensions (e.g. x86 AVX or RISC-V d) are interned before
the source file is parsed. RISC-V's naming of extensions after single
letters led to it having errors sorted differently for test cases using
single letter variable names. Instead sort the errors by the Symbol
string so that it is stable across architectures.
2020-06-04 16:00:31 +01:00
Tom Eccles
8edb05c2a0 test: ui: skip tests which aren't appropriate for RISC-V 2020-06-04 15:59:59 +01:00
bors
3d5d0f898c Auto merge of #72882 - marmeladema:save-analysis-hir-tree, r=Xanewok
save_analysis: work on HIR tree instead of AST

In order to reduce the uses of `NodeId`s in the compiler, `save_analysis` crate has been reworked to operate on the HIR tree instead of the AST.

cc #50928
2020-06-04 14:16:13 +00:00
Felix S. Klock II
94605b97e7 run-make regression test for issue #70924. 2020-06-04 08:57:08 -04:00
Tom Eccles
08529aff80 test: codegen: skip catch-unwind on riscv64
It isn't clear to me if this is a bug or not, hence the FIXME
2020-06-04 12:15:26 +01:00
Tom Eccles
37e8e05712 test: codegen: Add riscv abi llvm intrinsics test 2020-06-04 12:02:03 +01:00
Tom Eccles
c872dcf956 test: codegen: riscv64-abi: print value numbers for unnamed func args
LLVM 10 includes a009a60a917bc30940422bcef73f8270566d78db which will
print value numbers for unnamed func args.

Update these tests to be in line with the referenced clang tests.
2020-06-04 12:02:03 +01:00
Tom Eccles
95e9768da1 test: codegen: skip tests inappropriate for riscv64 2020-06-04 12:02:03 +01:00
bors
2a5cbb0e42 Auto merge of #72975 - Dylan-DPC:rollup-6zvco5x, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #72718 (Add regression test for #72554)
 - #72782 (rustc_target: Remove `pre_link_args_crt`)
 - #72923 (Improve E0433, so that it suggests missing imports)
 - #72950 (fix `AdtDef` docs)
 - #72951 (Add Camelid per request)
 - #72964 (Bump libc dependency to latest version (0.2.71))

Failed merges:

r? @ghost
2020-06-04 10:17:38 +00:00
Dylan DPC
26f0d7f5ff
Rollup merge of #72964 - sajattack:libc-0.2.71-bump, r=Mark-Simulacrum
Bump libc dependency to latest version (0.2.71)

Hello,

Just a quick version bump PR. The rust-psp group had some changes merged to libc recently but they haven't made it into the compiler. We're looking to remove our forked version from our Xargo.toml. Thanks.
2020-06-04 12:12:52 +02:00
Dylan DPC
1c648f6776
Rollup merge of #72951 - rust-lang:Camelid-RustThanks, r=Mark-Simulacrum
Add Camelid per request

Email from @camelid:

> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
>
> Thanks!
>
> Camelid
2020-06-04 12:12:51 +02:00
Dylan DPC
8fe23a7726
Rollup merge of #72950 - lcnr:fix_doc, r=davidtwco
fix `AdtDef` docs
2020-06-04 12:12:49 +02:00
Dylan DPC
085c16d552
Rollup merge of #72923 - Patryk27:fix/52468, r=estebank
Improve E0433, so that it suggests missing imports

Closes #52468
2020-06-04 12:12:47 +02:00
Dylan DPC
adc321a1e3
Rollup merge of #72782 - petrochenkov:crtargs, r=varkor
rustc_target: Remove `pre_link_args_crt`

To regain some more control over the definition of `+crt-static` (https://github.com/rust-lang/rust/pull/71586).

After https://github.com/rust-lang/rust/pull/71769 this target option wasn't used anywhere except for VxWorks, and I suspect that for VxWorks its use may be redundant as well.
2020-06-04 12:12:45 +02:00
Dylan DPC
21ac561ab7
Rollup merge of #72718 - estebank:impl-trait-obligation-failure, r=matthewjasper
Add regression test for #72554

Fix #72554.
2020-06-04 12:12:40 +02:00
marmeladema
70228f97ab Update rls submodule 2020-06-04 08:31:45 +01:00
marmeladema
8ec687611b save_analysis: work on HIR tree instead of AST 2020-06-04 08:31:41 +01:00
bors
627957100c Auto merge of #72618 - Aaron1011:feature/early-sourcemap, r=petrochenkov
Make `SourceMap` available for early debug-printing of `Span`s

Normally, we debug-print `Spans` using the `SourceMap` retrieved from
the global `TyCtxt`. However, we fall back to printing out the `Span`'s
raw fields (instead of a file and line number) when we try to print a
`Span` before a `TyCtxt` is available. This makes debugging early phases
of the compile, such as parsing, much more difficult.

This commit stores a `SourceMap` in `rustc_span::GlOBALS` as a fallback.
When a `TyCtxt` is not available, we try to retrieve one from `GLOBALS`
- only if this is not available do we fall back to the raw field output.

I'm not sure how to write a test for this - however, this can be
verified locally by setting `RUSTC_LOG="rustc_parse=debug"`, and
verifying that the output contains filenames and line numbers.
2020-06-04 04:38:48 +00:00
Brian Cain
d0ee0dc9de Hexagon libstd: fix typo for c_ulonglong 2020-06-03 22:47:48 -05:00
csmoe
9be635306c resolve error code e0760 2020-06-04 09:37:32 +08:00
Paul Sajna
8439e582a5 Bump libc dependency to latest version (0.2.71) 2020-06-03 16:21:16 -07:00
Alexis Bourget
87abe174c4 Added a warning to CString::into_raw too 2020-06-03 23:55:41 +02:00
Alexis Bourget
00a7b56bab Added the documentation about length to CString::from_raw 2020-06-03 23:32:26 +02:00
bors
f3fadf6abd Auto merge of #72754 - lcnr:predicate-fold, r=nikomatsakis
remove trivial `mk_predicate`s

r? @nikomatsakis
2020-06-03 20:12:40 +00:00
Mark Rousskov
7139342249 Bump to 1.46 2020-06-03 15:27:51 -04:00
Kyle J Strand
d3bd2c354d
Add Camelid
Email from @camelid:

> HI there,
>
> I’m a new contributor and I just looked at Rust Thanks and noticed that my contributions are listed under two different capitalizations of my name: “Camelid" and “camelid". Could you make them both “Camelid"?
> 
> Thanks!
> 
> Camelid
2020-06-03 11:44:41 -06:00
Bastian Kauschke
86f8105389 fix AdtDef docs 2020-06-03 19:24:58 +02:00
Vadim Petrochenkov
b628358e9a rustc_target: Remove pre_link_args_crt 2020-06-03 19:51:42 +03:00
bors
56daaf669e Auto merge of #72948 - Dylan-DPC:rollup-fazhw00, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72586 (split select into submodules)
 - #72900 (Don't count pathless --extern for unused-crate-dependencies warnings)
 - #72924 (Stabilize `std::io::Buf{Reader, Writer}::capacity`)
 - #72942 (clean up E0641 explanation)
 - #72945 (Updated documentation for Control Flow Guard)

Failed merges:

r? @ghost
2020-06-03 16:06:30 +00:00
Dylan DPC
b61f3bb66b
Rollup merge of #72945 - ajpaverd:cfguard-docs, r=Mark-Simulacrum
Updated documentation for Control Flow Guard

Update user-facing documentation for the Control Flow Guard (CFG) exploit mitigation in the unstable book, as requested in #68793.
2020-06-03 18:05:44 +02:00
Dylan DPC
77a74ec878
Rollup merge of #72942 - GuillaumeGomez:cleanup-e0641, r=Dylan-DPC
clean up E0641 explanation

r? @Dylan-DPC
2020-06-03 18:05:42 +02:00
Dylan DPC
ec2826cc2e
Rollup merge of #72924 - JohnTitor:stabilize-buf-capacity, r=shepmaster
Stabilize `std::io::Buf{Reader, Writer}::capacity`

Closes #68833
FCP is done here: https://github.com/rust-lang/rust/issues/68833#issuecomment-637596083
2020-06-03 18:05:41 +02:00
Dylan DPC
7973d9381f
Rollup merge of #72900 - jsgf:no-unused-pathless, r=petrochenkov
Don't count pathless --extern for unused-crate-dependencies warnings

`--extern proc_macro` is used to add the proc_macro crate to the extern
prelude for all procmacros. In general pathless `--extern` only references
sysroot/standard libraries and so should be exempt from
unused-crate-dependencies warnings.

r? @petrochenkov
2020-06-03 18:05:39 +02:00
Dylan DPC
f94c0df037
Rollup merge of #72586 - lcnr:winner-winnowing, r=nikomatsakis
split select into submodules

a0f06d11ae/src/librustc_trait_selection/traits/select.rs (L1)

I extracted two submodules:

- confirmation: apart from `pub(super) fn confirm_candidate`, everything else is private
- candidate_assembly: exports `pub(super) fn candidate_from_obligation` and `pub(super) fn assemble_candidates`

I tried to change as little as possible while doing this and hopefully split this into well reviewable commits.
2020-06-03 18:05:37 +02:00
Bastian Kauschke
f3eab4b124 remove outdated fixme 2020-06-03 15:59:10 +02:00
Andrew Paverd
d282fb000b Updated documentation for Control Flow Guard 2020-06-03 14:31:08 +01:00
Bastian Kauschke
b28026447a remove ignore-tidy-filelength 2020-06-03 14:49:35 +02:00
Bastian Kauschke
bf5c62da9e move confirmation into submodule 2020-06-03 14:49:35 +02:00
Bastian Kauschke
b8172ec405 move candidate assembly into a submodule 2020-06-03 14:49:35 +02:00
Bastian Kauschke
634977f8f2 move select into subfolder 2020-06-03 14:49:35 +02:00
bors
6f48888456 Auto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry
Make libunwind build hermetic

We want to avoid exporting any symbols from Rust's version of libunwind,
and to do so we need to disable visibility annotations to make sure that
the -fvisibility=hidden has effect, and also hide global new/delete.

This matches the CMake build of libunwind.
2020-06-03 12:20:45 +00:00
Guillaume Gomez
64b5520757 clean up E0641 explanation 2020-06-03 13:52:09 +02:00
Jonathan Schwender
7bf026eed6
Doc: unstable book - profile.md: improve wording
- mention `--target` flag excludes RUSTFLAGS passing to build scripts and proc macros
2020-06-03 11:05:56 +02:00
bors
ff4aff6ce0 Auto merge of #70107 - lcnr:issue68977, r=eddyb
WF-check all ty::Const's, not just array lengths.

fixes #68977

This PR removes the special case for array length in `wf::compute` and
checks the well formedness of all consts.

Changes `PredicateKind::WellFormed` to take a `GenericArg` and updates `wf::obligations`.
2020-06-03 08:43:11 +00:00