Commit Graph

105224 Commits

Author SHA1 Message Date
Matthew Healy
1c9f999157 Add llvm-skip-rebuild to opts 2020-01-09 23:26:49 +01:00
Esteban Küber
c751961d29 Extend support of _ in type parameters
- Account for `impl Trait<_>`.
 - Provide a reasonable `Span` for empty `Generics` in `impl`s.
 - Account for `fn foo<_>(_: _) {}` to suggest `fn foo<T>(_: T) {}`.
 - Fix #67995.
2020-01-09 14:20:53 -08:00
John Kåre Alsaker
5918c18785 Tweak timers 2020-01-09 23:19:20 +01:00
Mazdak Farrokhzad
915db7ae64 expect fn after const unsafe / const extern 2020-01-09 23:02:34 +01:00
John Kåre Alsaker
b650e91cf4 Label unmarked time 2020-01-09 22:38:40 +01:00
bors
72b2bd55ed Auto merge of #68067 - JohnTitor:rollup-vsj5won, r=JohnTitor
Rollup of 10 pull requests

Successful merges:

 - #66254 (Make Layout::new const)
 - #67122 (Do not deduplicate diagnostics in UI tests)
 - #67358 (Add HashSet::get_or_insert_owned)
 - #67725 (Simplify into_key_slice_mut)
 - #67935 (Relax the Sized bounds on Pin::map_unchecked(_mut))
 - #67967 (Delay bug to prevent ICE in MIR borrowck)
 - #67975 (Export public scalar statics in wasm)
 - #68006 (Recognise riscv64 in compiletest)
 - #68040 (Cleanup)
 - #68054 (doc: add Null-unchecked version section to mut pointer as_mut method)

Failed merges:

 - #67258 (Introduce `X..`, `..X`, and `..=X` range patterns)

r? @ghost
2020-01-09 19:21:58 +00:00
Yuki Okushi
9e83df0f69
Rollup merge of #68054 - tspiteri:null-unchecked-as_mut, r=cramertj
doc: add Null-unchecked version section to mut pointer as_mut method

The [`as_ref`](https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref-1) method already has a *Null-unchecked version* section, its example is a modification of the example in the main `as_ref` section. Similarly the example in this PR is a modification of the example in main [`as_mut`](https://doc.rust-lang.org/std/primitive.pointer.html#method.as_mut) section.

Fixes #68032.
2020-01-10 04:18:43 +09:00
Yuki Okushi
a366aa6249
Rollup merge of #68040 - sinkuu:unused, r=petrochenkov
Cleanup
2020-01-10 04:18:42 +09:00
Yuki Okushi
2bade5dd7d
Rollup merge of #68006 - infinity0:master, r=nikomatsakis
Recognise riscv64 in compiletest

Otherwise tests can't run, fails with "Cannot determine Architecture from triple"
2020-01-10 04:18:40 +09:00
Yuki Okushi
8de73bc10c
Rollup merge of #67975 - EmbarkStudios:export-statics-wasm, r=alexcrichton
Export public scalar statics in wasm

Fixes #67453

I am not sure which export level statics should get when exporting them in wasm. This small change fixes the issue that I had, but this might not be the correct way to implement this.
2020-01-10 04:18:39 +09:00
Yuki Okushi
08c5999dc4
Rollup merge of #67967 - JohnTitor:fix-ice-0107, r=matthewjasper
Delay bug to prevent ICE in MIR borrowck

Fixes #67947

r? @matthewjasper
2020-01-10 04:18:37 +09:00
Yuki Okushi
ee90f09ea0
Rollup merge of #67935 - Thomasdezeeuw:issue_67669, r=withoutboats
Relax the Sized bounds on Pin::map_unchecked(_mut)

Fixes #67669.
2020-01-10 04:18:36 +09:00
Yuki Okushi
78db333f9d
Rollup merge of #67725 - ssomers:into_key_slice_mut, r=RalfJung
Simplify into_key_slice_mut

Remove a rare and tiny but superfluous run-time check from into_key_slice_mut.

In #67459, I wrote that "`get_mut` [...] does visit `into_key_slice_mut`" and that was wrong. No function that operates on a map that (still) has a shared root ever dives into `into_key_slice_mut`.  So it's more clear to remove the (previously existing, and always incomplete) code it has for dealing with shared roots, as well as a petty performance improvement for those using exotically aligned key types.

~~Also, some testing of the `range` function initially added to #67686 but hardly related.~~

r? @RalfJung
2020-01-10 04:18:34 +09:00
Yuki Okushi
02ef0dcf69
Rollup merge of #67358 - cuviper:get_or_insert_owned, r=LukasKalbertodt
Add HashSet::get_or_insert_owned

This is an extension for tracking issue #60896. The more-general `get_or_insert_with` has potential for misuse, so we might remove it, but I think `get_or_insert_owned` covers most use cases.
2020-01-10 04:18:32 +09:00
Yuki Okushi
68ae55bfac
Rollup merge of #67122 - petrochenkov:nodedup, r=estebank
Do not deduplicate diagnostics in UI tests

Error reporting infrastructure deduplicates identical diagnostics with identical spans.

While it's preferable to do this in "release"/"user-facing" mode, it sometimes brings [confusion](https://github.com/rust-lang/rust/pull/50682#issuecomment-390949878) and hides details that may be important during development.

Do we run some passes multiple times when we could do it once?
How many times we run them exactly? Can this number be large? Can the multiplied error construction be expensive? Can speculative checks be made cheaper if they don't report errors?

*Relying* on this mechanism to deduplicate some specific error never looks like a proper solution to me personally.

In this PR I attempt to disable this deduplication by applying `-Z deduplicate-diagnostics=no` to UI tests.
2020-01-10 04:18:30 +09:00
Yuki Okushi
92bd267ba8
Rollup merge of #66254 - CAD97:patch-1, r=KodrAus
Make Layout::new const

This seems like a reasonable change to make. If we don't provide `Layout:🆕:<T>` as `const`, then users can just instead do the more error prone `Layout::from_size_align_unchecked(mem::size_of::<T>(), mem::align_of::<T>())` for the same effect and an extra `unsafe { }` incantation.
2020-01-10 04:18:29 +09:00
Vadim Petrochenkov
b82cd9f639 Address review comments + Update NLL tests 2020-01-09 21:49:32 +03:00
CAD97
d860def8e2 Mark Layout::new as const stable 2020-01-09 13:41:43 -05:00
Christopher Durham
e47fec56dd Make Layout::new const 2020-01-09 13:41:40 -05:00
Vadim Petrochenkov
642669c74d Update tests 2020-01-09 21:23:12 +03:00
Vadim Petrochenkov
41318e9a26 compiletest: Do not deduplicate diagnostics in UI tests 2020-01-09 21:23:12 +03:00
bors
59eb49d0da Auto merge of #68047 - pietroalbini:fix-toolstate-again, r=Mark-Simulacrum
ci: another take at fixing toolstate

Seems like the variable showed by `$(ciCheckoutPath)` on Azure Pipelines was wrong, making the toolstate script fail. This commit changes that function to return the variable previously used by the toolstate script. Other uses of the function were audited, and there should be no conflict.

Failure log: https://dev.azure.com/rust-lang/rust/_build/results?buildId=17933
r? @Mark-Simulacrum
2020-01-09 16:10:01 +00:00
Trevor Spiteri
f8428cf8d8 doc: add Null-unchecked version section to mut pointer as_mut method
The as_ref method already has a Null-unchecked version section, its
example is a modification of the example in the main as_ref section.
Similarly the example in this commit is a modification of the example
in main as_mut section.
2020-01-09 14:51:58 +01:00
bors
c404ce689f Auto merge of #67988 - Zoxc:prof-fix, r=michaelwoerister
Change -Z time event naming scheme and make them generic activities

I made the `-Z time-passes` only events (which encodes argument in the event id) use a `extra_verbose_generic_activity` function which does not emit self-profiling events.

r? @michaelwoerister
cc @wesleywiser
2020-01-09 11:36:44 +00:00
Oliver Scherer
c5c4fa8e76 Switch assertion order to be more helpful to ppl that encounter them 2020-01-09 12:04:15 +01:00
Oliver Scherer
a4fa5bb6a0 Rename Unsized to Meta 2020-01-09 12:04:15 +01:00
Stein Somers
9b92bf8315
Apply suggestions from code review
Co-Authored-By: Ralf Jung <post@ralfj.de>
2020-01-09 12:03:49 +01:00
Stein Somers
37b5cca3d5 Simplify into_key_slice_mut and document bits and bobs 2020-01-09 11:45:32 +01:00
Oliver Scherer
e632940a41
Update src/librustc_mir/interpret/place.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
2020-01-09 10:56:05 +01:00
Pietro Albini
cdbb60e6a8
ci: another take at fixing toolstate
Seems like the variable showed by $(ciCheckoutPath) on Azure Pipelines
was wrong, making the toolstate script fail. This commit changes that
function to return the variable previously used by the toolstate script.
Other uses of the function were audited, and there should be no
conflict.
2020-01-09 09:49:25 +01:00
Tomasz Miąsko
e88f071ed3 Document sanitizers in unstable-book 2020-01-09 09:33:49 +01:00
Mazdak Farrokhzad
5dafa6a464 add CStore::item_generics_num_lifetimes 2020-01-09 09:26:55 +01:00
Mazdak Farrokhzad
b743af6a24 rename a method in Resolver trait 2020-01-09 08:57:25 +01:00
Mazdak Farrokhzad
7472f9ef13 lowering: remove dep on CrateStore 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
402907f273 lowering: rustc::session -> rustc_session 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
69b1e5cc3d {rustc::util -> rustc_data_structures}::captures 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
2db97ede27 refactor 'Output = $ty' & reduce rustc dep 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
4e6329ec3a extract path lowering -> path.rs 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
ae6e31b1a3 move lower_binding_mode -> pat.rs 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
f75ccdef10 extract pattern lowering -> pat.rs 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
956265d55b lowering: elide some lifetimes 2020-01-09 08:57:24 +01:00
Mazdak Farrokhzad
bcab59ed83 lowering: simplify HoFs 2020-01-09 08:57:24 +01:00
Tomasz Miąsko
ae57259403 Add bootstrap step for building sanitizer runtimes 2020-01-09 07:54:02 +01:00
Tomasz Miąsko
0c6b1a7e3c Link sanitizer runtimes instead of injecting crate dependencies 2020-01-09 07:54:02 +01:00
Tomasz Miąsko
36d0812570 Remove sanitizer_runtime attribute 2020-01-09 07:54:02 +01:00
Tomasz Miąsko
78e7eeeaa1 Remove sanitizer runtime crates 2020-01-09 07:54:02 +01:00
John Kåre Alsaker
7db4b7efa2 More comments 2020-01-09 07:06:41 +01:00
John Kåre Alsaker
5427601e9e Change -Z time event naming scheme and make them generic activities 2020-01-09 07:06:40 +01:00
Shotaro Yamada
f443ae68c2 Remove unused dependencies 2020-01-09 11:52:03 +09:00
Shotaro Yamada
dbcce10bb1 Remove unused struct ClosureUpvar 2020-01-09 11:47:32 +09:00