Commit Graph

105377 Commits

Author SHA1 Message Date
SOFe
33bc9ef513
Use 3.6 instead of 3.5 in float fract() documentation
It is not self-explanatory whether the fract() function inverts the fractional part of negative numbers.

Co-Authored-By: Mateusz Mikuła <mati865@users.noreply.github.com>
2020-01-15 18:46:44 +00:00
bors
cb6122db3f Auto merge of #67076 - mbrubeck:condvar, r=dtolnay
Stabilize Condvar::wait_while and wait_timeout_while (previously wait_until, wait_timeout_until)

Closes #47960.
2020-01-14 10:34:43 +00:00
bors
c06e4aca19 Auto merge of #68201 - JohnTitor:rollup-26e39gu, r=JohnTitor
Rollup of 10 pull requests

Successful merges:

 - #67854 (Use `report_in_external_macro` for internal lints)
 - #67989 (rustdoc: Don't allow `#![feature(...)]` on stable or beta)
 - #68036 (libterm: parse extended terminfo format)
 - #68127 (Clarify the relationship between `extended` and `tools` in `config.toml`)
 - #68143 (Forbid elided lifetimes within const generic parameter types)
 - #68150 (Document behavior of set_nonblocking on UnixListener)
 - #68166 (rustdoc: HTML escape arrows on help popup)
 - #68176 (Clean up err codes)
 - #68179 (Remove unneeded scope)
 - #68188 (Tweak assertion note in format check)

Failed merges:

r? @ghost
2020-01-14 07:13:31 +00:00
Yuki Okushi
b8c0e3129c
Rollup merge of #68188 - JohnTitor:tweak-assertion-note, r=Mark-Simulacrum
Tweak assertion note in format check

It's informative to tell the existence of `--bless` flag if we're running `tidy`.
2020-01-14 14:02:31 +09:00
Yuki Okushi
7d1cbc7f7c
Rollup merge of #68179 - JohnTitor:nll-scope, r=varkor
Remove unneeded scope

Now, we can remove this scope.
2020-01-14 14:02:29 +09:00
Yuki Okushi
d6d5b74fb2
Rollup merge of #68176 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Clean up err codes

r? @Dylan-DPC
2020-01-14 14:02:28 +09:00
Yuki Okushi
076d6a0c9a
Rollup merge of #68166 - ollie27:rustdoc_help_escape, r=GuillaumeGomez
rustdoc: HTML escape arrows on help popup

r? @GuillaumeGomez
2020-01-14 14:02:26 +09:00
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
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
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
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
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
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
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
bors
3ebcfa1451 Auto merge of #67831 - mati865:ci-images-upgrade, r=pietroalbini
ci: bump ubuntu 19.04 images to 19.10

Ubuntu 19.04 goes EOL this month.
2020-01-12 14:52:48 +00:00
Till Arnold
c32090c130 Document behavior of set_nonblocking on UnixListener 2020-01-12 12:01:37 +01:00
bors
59c1db0339 Auto merge of #67901 - matthewjasper:split-mir-build, r=nagisa
Split MIR building into its own crate

This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`.
The new crate only has a `provide` function as it's public API.

Based on #67898

cc @Centril @rust-lang/compiler
r? @oli-obk
2020-01-12 09:44:55 +00:00
Matthew Jasper
b358929251 Split rustc_mir::{build, hair, lints} into their own crate 2020-01-12 09:39:26 +00:00
Ben Lewis
82b90bd993 Update test benchmark file 2020-01-12 20:41:03 +13:00
Yuki Okushi
a404cfabc7 Expose context::CheckLintNameResult
Clippy needs it
2020-01-12 15:25:41 +09:00
Ben Lewis
9e46ddc7a2 Added comment about behaviour. 2020-01-12 17:32:50 +13:00
Ben Lewis
b4fddf0f08 Forbid elided lifetimes within const generic parameter types. 2020-01-12 15:59:18 +13:00
bors
0b6c116a84 Auto merge of #68142 - Centril:rollup-dl232e9, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #67494 (Constify more of alloc::Layout)
 - #67867 (Correctly check for opaque types in `assoc_ty_def`)
 - #67948 (Galloping search for binary_search_util)
 - #68045 (Move more of `rustc::lint` into `rustc_lint`)
 - #68089 (Unstabilize `Vec::remove_item`)
 - #68108 (Add suggestions when encountering chained comparisons)

Failed merges:

r? @ghost
2020-01-12 02:28:48 +00:00
Mazdak Farrokhzad
82c19b4388
Rollup merge of #68108 - varkor:chained-comparison-suggestions, r=Centril
Add suggestions when encountering chained comparisons

Ideally, we'd also prevent the type error, which is just extra noise, but that will require moving the error from the parser, and I think the suggestion makes things clear enough for now.

Fixes https://github.com/rust-lang/rust/issues/65659.
2020-01-12 03:28:02 +01:00
Mazdak Farrokhzad
bbd210e6c5
Rollup merge of #68089 - lzutao:revert-remote_item, r=sfackler
Unstabilize `Vec::remove_item`

As concerned by @kornelski, @LukasKalbertodt, and @gnzlbg in #40062.
Reverts #67727
2020-01-12 03:28:00 +01:00
Mazdak Farrokhzad
cc51d0350e
Rollup merge of #68045 - Centril:liberate-lints, r=Mark-Simulacrum
Move more of `rustc::lint` into `rustc_lint`

Based on https://github.com/rust-lang/rust/pull/67806.

Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes:

- We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`.

- `in_derive_expansion` is, and needs to, be moved as a method on `Span`.

- We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined.

- `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after https://github.com/rust-lang/rust/pull/68133).

- `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints.

- `rustc::lint::context` is moved to `rustc_lint::context`.

- The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
2020-01-12 03:27:59 +01:00