Commit Graph

105541 Commits

Author SHA1 Message Date
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
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
Charles Lew
d2c509a3c6 Address review comments. 2020-01-12 18:34:35 +08: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
Charles Lew
091ba6daa0 Address review comments. 2020-01-12 13:15:00 +08: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
Mazdak Farrokhzad
1b208b12f8
Rollup merge of #67948 - llogiq:gallop, r=Mark-Simulacrum
Galloping search for binary_search_util

This is unlikely to improve perf much unless for synthetic benchmarks, but I figure it likely won't hurt either.
2020-01-12 03:27:57 +01:00
Mazdak Farrokhzad
1d9c69fb89
Rollup merge of #67867 - matthewjasper:opaque-assoc-lookup, r=oli-obk
Correctly check for opaque types in `assoc_ty_def`

Closes #67856
2020-01-12 03:27:56 +01:00
Mazdak Farrokhzad
019790c72a
Rollup merge of #67494 - lukaslueg:const_alloc, r=oli-obk
Constify more of alloc::Layout

Making more methods of `alloc::Layout` const would allow us to compute alignment/size information for arbitrary (sized) types at compile-time, including placing the information in associated constants. While `mem::size_of` and `mem::align_of` are already const and `Layout` is solely based on those, there is no guarantee in the implementation that a const derived from these functions will be exactly the same as what `Layout` uses and is subsequently used in a call to `alloc::alloc`. Constifying `Layout` makes this possible.

First contribution to core, excuse my ignorance.
2020-01-12 03:27:54 +01:00