Commit Graph

92632 Commits

Author SHA1 Message Date
Mazdak Farrokhzad 2171250ca4 Rollup merge of #60041 - jnferner:patch-1, r=shepmaster
Simplify the returning of a Result a bit
2019-04-19 06:03:14 +02:00
Mazdak Farrokhzad ee511f2b92 Rollup merge of #60032 - rust-lang:remove-unwanted-z-index, r=QuietMisdreavus
Remove unwanted z-index change

Fixes #60031.

r? @QuietMisdreavus
2019-04-19 06:03:13 +02:00
Mazdak Farrokhzad 291e44b381 Rollup merge of #60023 - koalatux:nth-back, r=scottmcm
implement specialized nth_back() for Bytes, Fuse and Enumerate

Hi,

After my first PR has been successfully merged, here is my second pull request :-)

Also this PR contains some specializations for the problem discussed in #54054.
2019-04-19 06:03:12 +02:00
Mazdak Farrokhzad 7f450bd3ca Rollup merge of #59933 - sourcefrog:doc-fmt, r=shepmaster
Make clear that format padding doesn't work for Debug

As mentioned in
https://github.com/rust-lang/rust/issues/46006#issuecomment-345260633
2019-04-19 06:03:10 +02:00
Mazdak Farrokhzad 1669f53dbb Rollup merge of #59915 - michaelwoerister:sp-event-filters-1, r=wesleywiser
Implement event filtering for self-profiler.

This is a first sketch for event filtering in the self-profiler, something that we'll want in order to keep profiling overhead low in the common case. The PR contains the commits from https://github.com/rust-lang/rust/pull/59515 and, for the moment, is meant for performance testing.

r? @wesleywiser
2019-04-19 06:03:09 +02:00
Esteban Küber 6aa4c992bc Suggest appropriate path when calling associated item on bare types
When looking at the documentation for `std::f32` or `std::str`, for
example, it is easy to get confused and assume `std::f32` and `f32`
are the same thing. Because of this, it is not uncommon to attempt
writing `f32::consts::PI` instead of the correct
`std::f32::consts::PI`. When encountering the former, which results
in an access error due to it being an inexistent path, try to access
the same path under `std`. If this succeeds, this information is
stored for later tweaking of the final E0599 to provide an
appropriate suggestion.

This suggestion applies to both E0233 and E0599 and is only checked
when the first ident of a path corresponds to a primitive type.
2019-04-18 19:18:26 -07:00
Esteban Küber 2f4035d27e Fix rebase 2019-04-18 18:57:16 -07:00
Esteban Küber 7b050fe831 review comments: change wording 2019-04-18 18:39:56 -07:00
Esteban Küber 248fe949af Change suggestion of field when not in self context 2019-04-18 18:39:56 -07:00
Mazdak Farrokhzad dbfbadeac4 libcore: deny more... 2019-04-19 01:37:12 +02:00
Josh Stone a1099ae73e Remove the unused LLVMRustIsRustLLVM 2019-04-18 15:28:18 -07:00
Josh Stone eed3619f8d Use -mergefunc-use-aliases for any LLVM >= 8 2019-04-18 15:01:10 -07:00
bors e928e94411 Auto merge of #60046 - euclio:missing-error-code-descriptions, r=estebank
hide `--explain` hint if error has no extended info

Fixes #59848.

r? @estebank
2019-04-18 21:26:53 +00:00
bors 5d20ff4d27 Auto merge of #58702 - taiki-e:libcore-2018, r=Centril
libcore => 2018

Transitions `libcore` to Rust 2018; cc #58099

r? @Centril
2019-04-18 17:48:21 +00:00
varkor 048ba28ad1 Update tests 2019-04-18 18:35:18 +01:00
Andy Russell b6f148c8bd hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
Tim Diekmann ae1f2b571a Update miri 2019-04-18 18:06:39 +02:00
Michael Woerister 08efbac758 Implement event filtering for self-profiler. 2019-04-18 17:03:53 +02:00
bors d6f513ec7d Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkov
Rename files about error codes

fixes #60017

This PR will be failed in tidy.

<details>
<summary>The log is here:</summary>

```
tidy check
tidy error: duplicate error code: 411
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83:             __diagnostic_used!(E0411);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84:             err.code(DiagnosticId::Error("E0411".to_owned()));
tidy error: duplicate error code: 424
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90:             debug!("smart_resolve_path_fragment: E0424, source={:?}", source);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92:             __diagnostic_used!(E0424);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93:             err.code(DiagnosticId::Error("E0424".to_owned()));
some tidy checks failed
```

</details>

I'd like to fix this but I don't know what to do.
I will work on later. Please let me know if you have any solutions.

r? @petrochenkov
2019-04-18 14:52:45 +00:00
Michael Woerister cc77087d6f Use new needs-(profiler|sanitizer)-support compiletest directive to clean up some run-make tests. 2019-04-18 15:49:41 +02:00
Nathan Kleyn d98afc51dc Fix small errors in docs for rchunks_exact and rchunks_exact_mut.
The documentation for `rchunks_exact` said it started at the beginning
of the slice, bit it actually starts at the end of the slice.

In addition, there were a couple of "of the slice of the slice"
duplicate phrases going on for `rchunks_exact` and `rchunks_exact_mut`.

This fixes #60068.
2019-04-18 14:48:15 +01:00
Michael Woerister e2acaee8bb Add codegen test that makes sure PGO instrumentation is emitted as expected. 2019-04-18 15:33:59 +02:00
Michael Woerister 227be657cd compiletest: Allow for tests requiring profiler-rt or sanitizer-rt support. 2019-04-18 15:32:49 +02:00
Michael Woerister 4269be382f Prefix PROFILER_SUPPORT and SANITIZER_SUPPORT test env vars with RUSTC_ to make things clearer. 2019-04-18 15:32:49 +02:00
Michael Woerister 553ec5d3eb Update run-make PGO test to new commandline syntax. 2019-04-18 15:32:49 +02:00
Aleksey Kladov be69785ea2 Use more realistic example for thread builder
Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.
2019-04-18 14:58:38 +03:00
bors bf843eb9c2 Auto merge of #60071 - RalfJung:miri, r=oli-obk
update miri

Fixes https://github.com/rust-lang/rust/issues/60040
2019-04-18 11:55:13 +00:00
Ralf Jung 29eed6b931 make liballoc internal test suite mostly pass in Miri 2019-04-18 13:37:14 +02:00
Ralf Jung fc0cfdbc2a update miri 2019-04-18 11:05:10 +02:00
bors e577e49b9f Auto merge of #60058 - varkor:const-generics-ty-refactor, r=cramertj
Make const parameters enforce no variance constraints

Fixes https://github.com/rust-lang/rust/issues/60047. Also includes some minor const refactoring for convenience.
2019-04-18 08:58:45 +00:00
bors be1dbaffed Auto merge of #60048 - estebank:issue-54954, r=sanxiyn
Fix ICE on const evaluation of const method

Fix #54954.
2019-04-18 06:00:06 +00:00
Taiki Endo e28bce7a51 Update stdsimd 2019-04-18 14:51:11 +09:00
Taiki Endo 360432f1e8 libcore => 2018 2019-04-18 14:47:35 +09:00
Jan Nils Ferner 379c5412ef Simplify the returning of a Result a bit 2019-04-18 07:33:31 +02:00
bors fb1b222f04 Auto merge of #60051 - estebank:fn-sugg, r=davidtwco
Do not mention missing `PartialOrd` impl when involving uncalled fns
2019-04-18 03:06:17 +00:00
Esteban Küber 1e99b2ec9d Give custom error for E0277 on ? error case 2019-04-17 19:50:50 -07:00
Esteban Küber 007b40be01 Point at try ? on errors affecting the err match arm of the desugared code 2019-04-17 18:30:26 -07:00
Santiago Pastorino 0a386baa5f Make PlaceProjectionsIter a proper iterator 2019-04-18 03:04:57 +02:00
tyler 365a48a8bf whitelist rtm x86 cpu feature 2019-04-17 17:10:24 -07:00
Esteban Küber 84af684b48 review comment: add extra doc 2019-04-17 16:42:52 -07:00
varkor 318a10e906 Add a test for unused const parameters 2019-04-18 00:30:50 +01:00
varkor 15033a9ba7 Const parameters should impose no variance constraints 2019-04-18 00:30:50 +01:00
varkor 3b7dd97e26 Add a FIXME to collector 2019-04-18 00:30:50 +01:00
varkor a759e2cc12 Add own_requires_monomorphization 2019-04-18 00:30:50 +01:00
topecongiro ca19ffe13f Update rustfmt to 1.2.1 2019-04-18 07:46:16 +09:00
bors 9387927ae2 Auto merge of #60054 - Centril:rollup-o40xxaa, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #59908 (Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in std)
 - #59984 (Remove collection-specific `with_capacity` documentation from `std::collections`)
 - #60036 (Remove nrc from toolstate pings)
 - #60037 (Resolve inconsistency in error messages between "parameter" and "variable".)

Failed merges:

r? @ghost
2019-04-17 22:24:11 +00:00
Mazdak Farrokhzad 42b3cf107d Rollup merge of #60037 - eddyb:actually-its-param, r=estebank
Resolve inconsistency in error messages between "parameter" and "variable".

The inconsistency was introduced in 104fe1c4db (#33619), when a label saying `type variable` was added to an error with a message talking about `type parameters`.
Given that `parameter` is far more prevalent when referring to generics in the context of Rust, IMO it should be that in both the message and the label.

r? @nikomatsakis or @estebank
2019-04-18 00:23:40 +02:00
Mazdak Farrokhzad 4664a50089 Rollup merge of #60036 - rust-lang:nrc-patch-1, r=Xanewok
Remove nrc from toolstate pings

🙉
2019-04-18 00:23:39 +02:00
Mazdak Farrokhzad 43985d965a Rollup merge of #59984 - gluyas:collections-with_capacity-doc-fix, r=rkruppe
Remove collection-specific `with_capacity` documentation from `std::collections`

Fixes #59931

The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle.

The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.
2019-04-18 00:23:38 +02:00
Mazdak Farrokhzad a20438773b Rollup merge of #59908 - lzutao:str_escape, r=SimonSapin
Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in std

cc #59893
2019-04-18 00:23:36 +02:00