Commit Graph

107692 Commits

Author SHA1 Message Date
bors
de362d88ea Auto merge of #67925 - petertodd:2020-fromstr-infallible, r=LukasKalbertodt
Change FromStr for String to use Infallible directly

Fixes the confusing documentation on `ParseError` by making it irrelevant.

It might be fine to mark it as depreciated right now too - I can't imagine much code uses `ParseError` directly.
2020-02-20 05:18:18 +00:00
Esteban Küber
c816430f99 Tweak binding lifetime suggestion text
We already have a structured suggestion, but the wording made it seem
like that wasn't the case.
Fix #65286. r? @varkor
2020-02-19 18:04:03 -08:00
bors
183e893aaa Auto merge of #69256 - nnethercote:misc-inlining, r=Centril
Miscellaneous inlining improvements

These commits inline some hot functions that aren't currently inlined, for some speed wins.

r? @Centril
2020-02-20 02:00:31 +00:00
Wesley Wiser
9f3bc82fe4 Check RUSTC_CTFE_BACKTRACE much less by generating fewer errors
Before this change, `get_size_and_align()`  calls `get_fn_alloc()` *a
lot* in CTFE heavy code. This previously returned an `Error` which would
check if `RUSTC_CTFE_BACKTRACE` was set on construction. Doing this
turned out to be a performance hotspot as @nnethercote discovered in
#68792.

This is an alternate take on that PR which resolves the performance
issue by generating *many* fewer errors. Previously, `ctfe-stress-4`
would generate over 5,000,000 errors each of which would check for the
presence of the environment variable. With these changes, that number is
reduced to 30.
2020-02-19 18:28:37 -05:00
Jonas Schievink
fc2702c96c Add regression test 2020-02-20 00:14:55 +01:00
Jonas Schievink
66b1ae4060 Add more comments to SuspensionPoint 2020-02-19 23:39:00 +01:00
Jonas Schievink
6896157245 Remap the resume place if necessary 2020-02-19 23:38:31 +01:00
bors
d5638142b3 Auto merge of #68988 - Zoxc:query-caches, r=eddyb
Add an abstraction for custom query caches

r? @eddyb
2020-02-19 22:29:07 +00:00
Jonas Schievink
71c4f76153 Reorder yield visitation order to match call 2020-02-19 23:19:15 +01:00
Jonas Schievink
d4c6dfe6d6 Handle resume args in RequiresStorage analysis 2020-02-19 23:19:15 +01:00
Jonas Schievink
3723fc1e45 Use match ergonomics to simplify match 2020-02-19 23:17:50 +01:00
Jonas Schievink
f77d1076ab Match MIR statements exhaustively 2020-02-19 23:13:51 +01:00
Peter Todd
883e69db95
Change FromStr for String to use Infallible directly
Fixes the confusing documentation on `ParseError` by making it
irrelevant.
2020-02-19 16:37:58 -05:00
Dylan MacKenzie
a0212ba40f Construct AssociatedItems from an iterator instead of a Vec 2020-02-19 12:55:59 -08:00
Ralf Jung
88d14bfbc9 fix 32bit-only test 2020-02-19 20:12:01 +01:00
bors
7760cd0fbb Auto merge of #69293 - Dylan-DPC:rollup-imcbvgo, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #68863 (ci: switch macOS builders to 10.15)
 - #69142 (Add shared script for linkchecking books.)
 - #69248 (Don't eliminate frame pointers on thumb targets)
 - #69280 (Remove special case for `simd_shuffle` arg promotion)
 - #69284 (Reword OpenOptions::{create, create_new} doc.)

Failed merges:

r? @ghost
2020-02-19 19:10:58 +00:00
Dylan MacKenzie
186cbfad89 Replace FIXME with explanation 2020-02-19 10:51:40 -08:00
Dylan MacKenzie
7f3ec5e50b Make lookup of associated item by name O(log n) 2020-02-19 10:51:40 -08:00
Dylan MacKenzie
3bb7da2e4f Replace rustc_typeck::Namespace with rustc_hir::def::Namespace 2020-02-19 10:51:40 -08:00
Dylan MacKenzie
ea3c9d27cf Implement an insertion-order preserving, efficient multi-map 2020-02-19 10:51:40 -08:00
Dylan MacKenzie
19801b12c9 Update tests 2020-02-19 09:39:29 -08:00
Dylan DPC
a97f354767
Rollup merge of #69284 - jumbatm:openoptions-create-doc, r=Dylan-DPC
Reword OpenOptions::{create, create_new} doc.

Closes #69254.

Currently, the doc comment for `fs::OpenOptions::create` doesn't mention its behaviour when opening an existing file, and `fs::OpenOptions::create_new`'s doc comment is worded in a way that doesn't make it clear that it actually _fails_ if the file already exists, not overwrite the existing file with a new one.

This PR addresses addresses this by rewording the doc comments to be more explicit.

r? @GuillaumeGomez
2020-02-19 18:12:13 +01:00
Dylan DPC
61d3b6dedb
Rollup merge of #69280 - ecstatic-morse:promote-shuffle-no-special-case, r=petrochenkov
Remove special case for `simd_shuffle` arg promotion

After rust-lang/stdarch#825, these intrinsics are now defined with `#[rustc_args_required_const(2)]`, so the special-case is no longer necessary.
2020-02-19 18:12:11 +01:00
Dylan DPC
c6ad1e2c2a
Rollup merge of #69248 - jonas-schievink:thumb-fp, r=japaric
Don't eliminate frame pointers on thumb targets

This should hopefully fix issues https://github.com/rust-lang/rust/issues/69231 and https://github.com/rust-embedded/cortex-m-rt/issues/139.

~~I couldn't test this locally as the rustc I produced does not create binaries (no idea why).~~ Resolved.
2020-02-19 18:12:10 +01:00
Dylan DPC
1761b39fb0
Rollup merge of #69142 - ehuss:linkcheck-script, r=alexcrichton
Add shared script for linkchecking books.

This adds a script that can be used on each book's CI to ensure they don't break local links.

I've been running something similar on the reference CI.  The intent here is to add this to all the external books' CI scripts. This will help avoid dealing with broken links when updating submodules on rust-lang/rust.
2020-02-19 18:12:09 +01:00
Dylan DPC
2f914bf327
Rollup merge of #68863 - pietroalbini:azure-macos-10.15, r=Mark-Simulacrum
ci: switch macOS builders to 10.15

Azure Pipelines is deprecating the macOS 10.13 image we're currently running, [and they plan to remove them](https://devblogs.microsoft.com/devops/removing-older-images-in-azure-pipelines-hosted-pools/) on March 23, 2020. This PR switches our macOS builders to macOS 10.15.

r? @Mark-Simulacrum
2020-02-19 18:12:07 +01:00
Camille GILLOT
310f4707e5 Make is_object_safe a method. 2020-02-19 17:59:24 +01:00
Bijan Tabatabai
c797ce7877 Add LinkedList::remove()
LinkedList::remove() removes the element at the specified index and returns it.

Signed-off-by: Bijan Tabatabai <bijan311@yahoo.com>
2020-02-19 10:29:12 -06:00
bors
7d6b8c414e Auto merge of #69198 - ollie27:rustbuild_rustdoc-js, r=Mark-Simulacrum
Fix running rustdoc-js test suite individually

Without `Compiletest.path` set running `x.py test src/test/rustdoc-js` would run the `rustdoc-js` test suite with everything filtered out.

As this was the only place setting `Compiletest.path` to `None` this removes the `Option` wrapper as well.
2020-02-19 15:55:57 +00:00
Guillaume Gomez
1b342f70df Clean up E0317 explanation 2020-02-19 16:09:28 +01:00
John Kåre Alsaker
d924a251f1 Use a constructor function per dep node instead of an enum and a single function 2020-02-19 16:03:22 +01:00
John Kåre Alsaker
b248767a07 Remove support for dep node structs 2020-02-19 16:03:22 +01:00
John Kåre Alsaker
a8522256c5 Tune inlining 2020-02-19 16:03:21 +01:00
John Kåre Alsaker
19170cd217 Fix cache hit stats 2020-02-19 16:03:21 +01:00
John Kåre Alsaker
52872ca1cb Add a stat for local DefId density 2020-02-19 16:03:21 +01:00
John Kåre Alsaker
d1a81c779d Split query stats into its own file 2020-02-19 16:03:21 +01:00
John Kåre Alsaker
8a2ad75a60 Add a storage query modifier to override the query cache 2020-02-19 16:03:19 +01:00
John Kåre Alsaker
e2a8589e01 Add an abstraction for custom query caches 2020-02-19 16:01:46 +01:00
John Kåre Alsaker
6bf014ec99 Make try_get_cached take closures 2020-02-19 16:01:46 +01:00
John Kåre Alsaker
545e290a93 Split query execution into hot and cold paths 2020-02-19 16:01:46 +01:00
bors
7710ae0e26 Auto merge of #69278 - matthiaskrgr:submodule_upd, r=Dylan-DPC
submodules: update clippy from b91ae16e to 2855b214

Changes:
````
Rustup to rust-lang/rust#69194
Rustup to rust-lang/rust#69181
Add `LOG2_10` and `LOG10_2` to `approx_const` lint
Clean up imports
Use `Vec::with_capacity()` as possible
needless_doctest_main: False positive for async fn
Remove use of `TyKind`.
Use `if_chain`.
Fix ICE.
Add tests and improve checks.
Add `Future` detection for `missing_errors_doc`.
````

Fixes #69269
2020-02-19 11:16:01 +00:00
Ralf Jung
58bb47ebe5 avoid excessive number of revisions 2020-02-19 11:25:41 +01:00
jumbatm
c899dc1401 Reword OpenOptions::{create, create_new} doc. 2020-02-19 19:57:32 +10:00
bors
ae5467826d Auto merge of #69265 - ehuss:update-cargo, r=Dylan-DPC
Update cargo

9 commits in 3c53211c3d7fee4f430f170115af5baad17a3da9..e02974078a692d7484f510eaec0e88d1b6cc0203
2020-02-07 15:35:03 +0000 to 2020-02-18 15:24:43 +0000
- Set an environment variable for tests to find executables. (rust-lang/cargo#7697)
- Rework internal errors. (rust-lang/cargo#7896)
- Improvements to StringList config handling. (rust-lang/cargo#7891)
- Add new/old rustflags to fingerprint log. (rust-lang/cargo#7890)
- Fix inaccurate doc comment on `env_args`. (rust-lang/cargo#7889)
- Add some extra fingerprint debug information. (rust-lang/cargo#7888)
- Link the licenses into crates/cargo-platform (rust-lang/cargo#7886)
- Modify test to make `rustc` PR mergeable (rust-lang/cargo#7883)
- Keep environment variables in a BTreeMap to preserve sort order (rust-lang/cargo#7877)
2020-02-19 08:07:42 +00:00
Dylan MacKenzie
b43dc806ae Add #[rustc_args_required_const] to simd_shuffle tests 2020-02-18 23:36:09 -08:00
Nicholas Nethercote
139c3cab28 Inline some encoding and decoding methods.
This is a small performance win.
2020-02-19 16:54:36 +11:00
Dylan MacKenzie
f581b559a3 Remove mention of simd_shuffle promotion from comments 2020-02-18 21:32:38 -08:00
Dylan MacKenzie
d194676667 Remove special case for simd_shuffle arg promotion
After rust-lang/stdarch#825, these intrinsics are now defined with
`#[rustc_args_required_const(2)]`, so the special-case is no longer
necessary.
2020-02-18 21:29:06 -08:00
Dylan MacKenzie
5f06ce2c0f Prevent const trait methods from being marked stable 2020-02-18 21:03:29 -08:00
Dylan MacKenzie
cb81712d10 Make fn_queries helpers module-private 2020-02-18 21:03:29 -08:00