Commit Graph

105506 Commits

Author SHA1 Message Date
Yuki Okushi
725f88b09c
Rollup merge of #68150 - tillarnold:master, r=cramertj
Document behavior of set_nonblocking on UnixListener

The description on `set_nonblocking` in `UnixListener` was rather brief so I adapted it to be more like the documentation of  `set_nonblocking` in `TcpListener`.
2020-01-14 14:02:24 +09:00
Yuki Okushi
d7e599203c
Rollup merge of #68143 - skinny121:const-param-type-elided-lifetime, r=petrochenkov
Forbid elided lifetimes within const generic parameter types

Disallows `fn foo<const T: &u32>()`, the lifetime must be explicitly given, i.e. `fn foo<const T: &'static u32>()`.

Fixes #67883
2020-01-14 14:02:23 +09:00
Yuki Okushi
7da1dcc3e0
Rollup merge of #68127 - varkor:clarify-extended-option, r=alexcrichton
Clarify the relationship between `extended` and `tools` in `config.toml`

I.e. `tools` is only effective if `extended = true`. Alternatively, we could make `tools = []` by default and remove `extended` (although we'd want to list the possible options), but improving the description seems sufficient to solve the issue.

Fixes https://github.com/rust-lang/rust/issues/61194.
2020-01-14 14:02:21 +09:00
Yuki Okushi
974b69927b
Rollup merge of #68036 - euclio:libterm-ncurses6-fix, r=KodrAus
libterm: parse extended terminfo format

Fixes #45728.

Modifies libterm to parse the extended terminfo format introduced in ncurses 6.1. This fixes the lack of color in test output for users with newer ncurses versions.

The ideal fix for this would be to migrate libtest to use `termcolor` (https://github.com/rust-lang/rust/issues/60349), but that's blocked for the foreseeable future.
2020-01-14 14:02:20 +09:00
Yuki Okushi
9e47ddd399
Rollup merge of #67989 - ollie27:rustdoc_unstable, r=GuillaumeGomez
rustdoc: Don't allow `#![feature(...)]` on stable or beta

Fixes #67647

r? @GuillaumeGomez
2020-01-14 14:02:18 +09:00
Yuki Okushi
fd162a48bc
Rollup merge of #67854 - afnanenayet:afnan/report-external-macro-lints, r=petrochenkov
Use `report_in_external_macro` for internal lints

Add the option to report lints in external macros for rustc internal lints to resolve #66370
2020-01-14 14:02:16 +09:00
Yuki Okushi
d975228ced Tweak assertion note in fmt 2020-01-14 07:09:15 +09:00
bors
30ca215b4e Auto merge of #68183 - JohnTitor:clippy-up, r=JohnTitor
Update Clippy

Fixes #68107

r? @ghost
2020-01-13 20:56:44 +00:00
Ben Lewis
02fffc1556 Code review changes and fix rustdoc test. 2020-01-14 07:47:45 +13:00
Ben Lewis
a6c4025fac perf: eagerly convert literals to consts, this avoids creating loads on unevaluated consts
which requires a lot of unnecessary work to evaluate them further down the line.
2020-01-14 07:47:45 +13:00
bors
31dd4f4acb Auto merge of #68088 - oli-obk:fix_miri, r=RalfJung
Don't try to force_ptr pointers to zsts

r? @RalfJung

cc @wesleywiser

This is required to fix miri after https://github.com/rust-lang/rust/pull/67501 broke it. The reason only miri sees this is that it uses validation on values during interpretation and not just on the final value of constants, which never contain such values.
2020-01-13 17:39:01 +00:00
Oliver Scherer
19b9b26986 Early abort validation of arrays of zsts because there is no data to be checked 2020-01-13 16:12:10 +01:00
Yuki Okushi
19f8c5824f Update Clippy 2020-01-13 23:45:20 +09:00
Camille GILLOT
894dc2d3d2 Do not forget to provide queries. 2020-01-13 15:36:05 +01:00
Guillaume Gomez
3ec0a84e6e Clean up E0192 explanation 2020-01-13 15:02:49 +01:00
Guillaume Gomez
11f74189f1 Clean up E0191 explanation 2020-01-13 15:02:49 +01:00
Yuki Okushi
13785c4c2e Remove unneeded scope 2020-01-13 22:51:57 +09:00
Amanieu d'Antras
25519e5290 Fix destructor in emcc.rs 2020-01-13 12:54:16 +00:00
bors
bf84eb538f Auto merge of #67850 - GuillaumeGomez:err-codes-checkup, r=Mark-Simulacrum
Error codes checkup and rustdoc test fix

This PR does a few things:

 * fix how rustdoc checks that an error code has been thrown (it only checked for "E0XXX" so if it appeared in the output because the file has it in its name or wherever, it passed the test, which was incorrect)
 * fix the failing code examples that weren't throwing the expected error code
2020-01-13 12:49:12 +00:00
Camille GILLOT
9908a87367 Move to new crate rustc_ty. 2020-01-13 13:41:25 +01:00
Aaron Hill
e390b91e57
Use TraitQueryMode::Canonical when testing predicates in const prop 2020-01-13 06:06:42 -05:00
Aaron Hill
6a0bb1867b
Add "--emit=link"
This avoids a strange linker error that we get with only "--emit=mir"
and "check-pass"
2020-01-13 05:00:56 -05:00
Aaron Hill
7df8ca2954
Convert test to check-pass 2020-01-13 05:00:56 -05:00
Aaron Hill
92d86cc9b8
Fix typo 2020-01-13 05:00:55 -05:00
Aaron Hill
e1fc22c4eb
Add additional regression test 2020-01-13 05:00:55 -05:00
Aaron Hill
5896998e76
Don't run const propagation on items with inconsistent bounds
Using `#![feature(trivial_bounds)]`, it's possible to write functions
with unsatisfiable 'where' clauses, making them uncallable. However, the
user can act as if these 'where' clauses are true inside the body of the
function, leading to code that would normally be impossible to write.

Since const propgation can run even without any user-written calls to a
function, we need to explcitly check for these uncallable functions.
2020-01-13 05:00:55 -05:00
bors
af958046e5 Auto merge of #68174 - JohnTitor:rollup-ix4amrj, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #67313 (Document more use cases of dataflow)
 - #67959 (rustdoc: improve stability mark arrows)
 - #68097 (Specify units for test timeout environment variables)
 - #68135 (restore some rustc_parse visibilities for rustfmt)
 - #68145 (Expose `context::CheckLintNameResult`)
 - #68156 (Fix crate paths in comments)
 - #68157 (Clean up E0186 explanation)
 - #68161 (Fix system call docs for time::Instant)

Failed merges:

r? @ghost
2020-01-13 08:20:49 +00:00
Yuki Okushi
87bdc8eb73
Rollup merge of #68161 - ruuda:fix-instant-docs, r=rkruppe
Fix system call docs for time::Instant

The link for UNIX was pointing to the Cloud ABI docs. It should have been pointing to the `clock_gettime` docs instead. A similar table is repeated in the docs for `SystemTime`, but there the UNIX entry was already correct.

`clock_gettime(CLOCK_MONOTONIC)` is the current implementation: 3ebcfa1451/src/libstd/sys/unix/time.rs (L274)
3ebcfa1451/src/libstd/sys/unix/time.rs (L348-L352)

r? @steveklabnik
2020-01-13 16:44:24 +09:00
Yuki Okushi
574ef55ea7
Rollup merge of #68157 - GuillaumeGomez:clean-up-e0186, r=Dylan-DPC
Clean up E0186 explanation

r? @Dylan-DPC
2020-01-13 16:44:23 +09:00
Yuki Okushi
0c25ab051c
Rollup merge of #68156 - JohnTitor:fix-path-in-doc, r=Dylan-DPC
Fix crate paths in comments

Tiny follow-up of #67806 and others

r? @Centril
2020-01-13 16:44:21 +09:00
Yuki Okushi
ce8f320793
Rollup merge of #68145 - JohnTitor:pub-check-lint-name-result, r=Centril
Expose `context::CheckLintNameResult`

Clippy needs it

r? @Centril
2020-01-13 16:44:20 +09:00
Yuki Okushi
ca806cfe45
Rollup merge of #68135 - calebcartwright:rustc-parse-visibilities, r=Centril
restore some rustc_parse visibilities for rustfmt

In c189565edc some visibilities were reduced on the parse mod (which now resides in the rustc_parse crate) as part of some refactoring and splitting up of libsyntax. However, rustfmt needs access to a few of those items that are no longer visible.

This restores the visibility on those items rustfmt depends on.

https://github.com/rust-lang/rustfmt/issues/3903#issuecomment-563596269
https://github.com/rust-lang/rustfmt/issues/4009

cc @topecongiro
2020-01-13 16:44:18 +09:00
Yuki Okushi
7d3fa29633
Rollup merge of #68097 - MikailBag:master, r=shepmaster
Specify units for test timeout environment variables

I think it is not obvious (I got it from reading libtest sources), so it is worth mentioning in docs.
2020-01-13 16:44:17 +09:00
Yuki Okushi
bc031e30fa
Rollup merge of #67959 - liigo:patch-13, r=GuillaumeGomez
rustdoc: improve stability mark arrows

### current

![old-stability-arrow](https://user-images.githubusercontent.com/346530/71863520-134d8b00-3138-11ea-86f9-a98068b3cff9.png)

### new

![new-stability-arrow](https://user-images.githubusercontent.com/346530/71863539-1b0d2f80-3138-11ea-843e-d79b9e5d9eec.png)

### new dark

![dark-stability-arrow](https://user-images.githubusercontent.com/346530/71863563-26f8f180-3138-11ea-9514-050e2c779f90.png)
2020-01-13 16:44:15 +09:00
Yuki Okushi
ac8acd856e
Rollup merge of #67313 - oli-obk:document_all_the_t̶h̶i̶n̶g̶s̶dataflow, r=ecstatic-morse
Document more use cases of dataflow

r? @ecstatic-morse
2020-01-13 16:44:13 +09:00
Afnan Enayet
9d95eaa49b
Use report_in_external_macro for internal lints
Add the option to report lints in external macros for rustc internal
lints
2020-01-12 23:21:02 -08:00
bors
e82febc78e Auto merge of #67900 - nikic:prepare-llvm-10, r=nagisa
Prepare for LLVM 10 upgrade

Split off from #67759, this just adds the necessary compatibility bits and updates codegen tests, without performing the actual LLVM upgrade.

r? @alexcrichton
2020-01-13 04:01:00 +00:00
Amanieu d'Antras
4f163afed6 Fix destructor return value in emcc.rs 2020-01-13 00:39:41 +00:00
Oliver Middleton
79f59fa820 rustdoc: HTML escape arrows on help popup 2020-01-12 23:37:47 +00:00
Ruud van Asseldonk
827ee7a70a Fix system call docs for time::Instant
The link for UNIX was pointing to the Cloud ABI docs. It should have
been pointing to the clock_gettime docs instead. The table is repeated
in the docs for SystemTime, but there the UNIX entry was already correct.
2020-01-12 21:24:31 +01:00
Amanieu d'Antras
8f60db8da8 Don't include __rust_drop_panic when testing libstd 2020-01-12 16:59:44 +00:00
Guillaume Gomez
34186ef642 Clean up E0186 explanation 2020-01-12 17:50:14 +01:00
Guillaume Gomez
5b7d64e947 Fix error codes explanation' code examples 2020-01-12 17:22:42 +01:00
Yuki Okushi
27b99d4050 Fix crate paths in comments 2020-01-13 01:07:43 +09:00
varkor
1faa05daac Update output-default.json and rustdoc test 2020-01-12 15:37:50 +00:00
varkor
117443ec0a Appease tidy 2020-01-12 15:37:50 +00:00
varkor
3de9b8a3b7 Fix formatting ellipses at the end of some diagnostics 2020-01-12 15:37:50 +00:00
varkor
e84248921b Add backticks in appropriate places 2020-01-12 15:37:50 +00:00
varkor
8461fa5119 Diagnostics should not end with a full stop 2020-01-12 15:37:50 +00:00
varkor
0810210bcb Diagnostics should start lowercase 2020-01-12 15:36:40 +00:00