Commit Graph

120181 Commits

Author SHA1 Message Date
csmoe
2e2aac4f57 add try trait as lang item 2020-05-10 22:37:24 +08:00
csmoe
32a46e9115 add test case for issue-61076 2020-05-10 22:37:24 +08:00
Jonas Schievink
62116c31cd Emit a warning when optimization fuel runs out
`eprintln!` gets swallowed by Cargo too easily.
2020-05-10 15:40:17 +02:00
bors
9912925c25 Auto merge of #72074 - RalfJung:rollup-1ns58no, r=RalfJung
Rollup of 4 pull requests

Successful merges:

 - #71840 (Rework MIR drop tree lowering)
 - #71882 (Update the `cc` crate)
 - #71945 (Sort "implementations on foreign types" section in the sidebar)
 - #72043 (Add missing backtick in E0569 explanation)

Failed merges:

r? @ghost
2020-05-10 12:07:34 +00:00
Guillaume Gomez
0aaff14ae3 Improve E0571 wording 2020-05-10 12:40:11 +02:00
Sébastien Marie
a26335b2a0 update stacker to 0.1.9 to unbreak build on OpenBSD 2020-05-10 10:23:13 +00:00
Faris Sufyan
d80ac6416d
Fix link to map documentation in example
Co-authored-by: Timo <timorcb@gmail.com>
2020-05-10 18:06:30 +08:00
Ralf Jung
e73ee41241 rebase fallout 2020-05-10 11:48:46 +02:00
Ralf Jung
a06740cbea Typo
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2020-05-10 11:48:45 +02:00
Ralf Jung
d3b2e1fb9e fmt 2020-05-10 11:48:41 +02:00
Ralf Jung
ff39457364 avoid raising interpreter errors from interning 2020-05-10 11:47:20 +02:00
Ralf Jung
8e48a304dc remove some dead code, and assert we do not swallow allocating errors 2020-05-10 11:45:48 +02:00
Ralf Jung
c400f758e5 Miri interning: replace ICEs by proper errors, make intern_shallow type signature more precise 2020-05-10 11:45:43 +02:00
Ralf Jung
f2b655f110
Rollup merge of #72043 - GuillaumeGomez:clean-up-e0569, r=Dylan-DPC
Add missing backtick in E0569 explanation

r? @Dylan-DPC
2020-05-10 11:34:36 +02:00
Ralf Jung
d22c18b396
Rollup merge of #71945 - GuillaumeGomez:sort-impl-on-foreign-types-section, r=kinnison,ollie27
Sort "implementations on foreign types" section in the sidebar

Fixes #71926.

We were sorting by the ID instead of sorting by the name. They're not in the same order as the implementations but I think it makes more sense this way considering this is what we do for the methods as well.

r? @kinnison

cc @rust-lang/rustdoc
2020-05-10 11:34:34 +02:00
Ralf Jung
37a9192826
Rollup merge of #71882 - alexcrichton:update-cc, r=Mark-Simulacrum
Update the `cc` crate

Pulls in updated MSVC detection logic landed in alexcrichton/cc-rs#488
2020-05-10 11:34:32 +02:00
Ralf Jung
62353071af
Rollup merge of #71840 - matthewjasper:drop-trees, r=oli-obk
Rework MIR drop tree lowering

This PR changes how drops are generated in MIR construction. This is the first half of the fix for #47949.

Rather than generating the drops for a given unwind/break/continue/return/generator drop path as soon as they are needed, the required drops are recorded and get generated later.

The motivation for this is
* It simplifies the caching scheme, because it's now possible to walk up the currently scheduled drop tree to recover state.
* The basic block order for MIR more closely resembles execution order.

This PR also:
* Highlights cleanup blocks in the graphviz MIR output.
* Removes some unnecessary drop flag assignments.
2020-05-10 11:34:30 +02:00
Ralf Jung
c82103cb21 use min_specialization for some rustc crates where it requires no changes 2020-05-10 11:25:00 +02:00
Trevor Spiteri
0ceacd022c doc: minus (U+2212) instead of dash (U+002D) for negative infinity 2020-05-10 11:24:06 +02:00
YI
a6c2f73b6e add linking option strip
move strip option to "Z"

add more strip options, remove strip-debuginfo-if-disabled

merge strip and debuginfo
2020-05-10 16:44:46 +08:00
bors
8d16eeb8c9 Auto merge of #71775 - petrochenkov:crtcfg, r=matthewjasper
Enable `cfg` predicate for `target_feature = "crt-static"` only if the target supports it

That's what all other `target_feature`s do.
2020-05-10 08:25:32 +00:00
bors
b3269536d0 Auto merge of #72020 - alexcrichton:fix-incremental-linker-plugin-lto, r=oli-obk
Fix disagreeement about CGU reuse and LTO

This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006
2020-05-10 04:41:01 +00:00
Alex Crichton
c7bd5a635e Fix disagreeement about CGU reuse and LTO
This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006
2020-05-09 19:30:48 -07:00
bors
6f5c7827b7 Auto merge of #71557 - matthewjasper:mir-asymmetric-or-pattern, r=oli-obk
Fix ICE for broken or-pattern in async fn

closes #71297
2020-05-10 01:12:21 +00:00
bors
0a3619c9e5 Auto merge of #69530 - Aaron1011:perf/skip-coerce-var, r=nikomatsakis
[perf] Skip attempting to run coerce_unsized on an inference variable

See the included comment for a detailed explanation of why this is
sound.
2020-05-09 21:01:19 +00:00
Marko Mijalkovic
8961b08376 Formatting 2020-05-09 16:39:45 -04:00
Marko Mijalkovic
20a6691323 Update stdarch 2020-05-09 16:03:40 -04:00
Marko Mijalkovic
b6e4581937 Add mipsel-sony-psp target 2020-05-09 15:41:49 -04:00
Bastian Kauschke
bb6a6e0832 move ty::List into a new submodule 2020-05-09 21:06:48 +02:00
bors
43a1777b89 Auto merge of #5564 - MrAwesome:master, r=flip1995
Allow `use super::*;` glob imports

changelog: Allow super::* glob imports

fixes #5554
fixes #5569

A first pass at #5554 - this allows all `use super::*` to pass, which may or may not be desirable. The original issue was around allowing test modules to import their entire parent modules - I'm happy to modify this to do that instead, may just need some guidance on how to implement that (I played around a bit with #[cfg(test)] but from what I can gather, clippy itself isn't in test mode when running, even if the code in question is being checked for the test target).
2020-05-09 18:43:28 +00:00
Glenn Hope
b69200b846 Move is_test_module check to top of function 2020-05-09 11:10:16 -07:00
Glenn Hope
0ba61c612e Check is_macro inside check_exceptions, update references to fix test 2020-05-09 11:10:16 -07:00
Glenn Hope
a339766136 Fix test from auto-formatter fix 2020-05-09 11:10:16 -07:00
Glenn Hope
4db6abcd50 Remove check for Fn, reflect this in test cases, make test cases more robust/explicit 2020-05-09 11:09:38 -07:00
Glenn Hope
152cdcb45b Remove unnecessary field, check for Mod/Fn ItemKind 2020-05-09 11:09:38 -07:00
Glenn Hope
a42a2bdac2 Also have flag disable macro check 2020-05-09 11:09:38 -07:00
Glenn Hope
ad92486d52 Add check for "test" in parent name. Include flag for disabling wildcard import exceptions 2020-05-09 11:09:38 -07:00
Glenn Hope
56f4e1c3a8 Check if the parent module name contains "test" 2020-05-09 11:09:38 -07:00
Glenn Hope
bdc75dbb7b Run cargo dev fmt 2020-05-09 11:09:38 -07:00
Glenn Hope
0c14ea8ed7 Allow 'use super::*;' imports 2020-05-09 11:09:38 -07:00
bors
bad3bf622b Auto merge of #72041 - RalfJung:rollup-xivrvy2, r=RalfJung
Rollup of 5 pull requests

Successful merges:

 - #69406 (upgrade chalk and use chalk-solve/chalk-ir/chalk-rust-ir)
 - #71185 (Move tests from `test/run-fail` to UI)
 - #71234 (rustllvm: Use .init_array rather than .ctors)
 - #71508 (Simplify the `tcx.alloc_map` API)
 - #71555 (Remove ast::{Ident, Name} reexports.)

Failed merges:

r? @ghost
2020-05-09 17:31:08 +00:00
Bastian Kauschke
0db2aec14a display ConstKind::Param 2020-05-09 17:10:40 +02:00
Jonas Schievink
e22cc993fb Visit move out of _0 when visiting return 2020-05-09 16:08:04 +02:00
bors
43d9cdc7b3 Auto merge of #5580 - matthiaskrgr:regex_dep, r=flip1995
deps: remove unused regex dependency from root crate

changelog: none
2020-05-09 12:41:19 +00:00
Ralf Jung
6a8cf4a17c adjust tests 2020-05-09 14:40:17 +02:00
Ralf Jung
1fce20340a expand "incomplete feature" message to include unsoundness and link to tracking issue 2020-05-09 14:06:10 +02:00
Guillaume Gomez
e0c0c3b96f Add missing backtick in E0569 explanation 2020-05-09 13:51:46 +02:00
Guillaume Gomez
b865db0462 Sort "implementations on foreign types" section in the sidebar 2020-05-09 13:50:24 +02:00
Julian Wollersberger
e734e31340 Small doc improvements.
The phrasing is from the commit description of 395ee0b79f by @Matklad.
2020-05-09 13:46:03 +02:00
Ralf Jung
366c1786e6
Rollup merge of #71555 - cjgillot:nameless, r=matthewjasper
Remove ast::{Ident, Name} reexports.

The reexport of `Symbol` into `Name` confused me.
2020-05-09 13:36:39 +02:00