]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoClean up E0191 explanation
Guillaume Gomez [Mon, 13 Jan 2020 12:32:32 +0000 (13:32 +0100)]
Clean up E0191 explanation

4 years agoRemove unneeded scope
Yuki Okushi [Mon, 13 Jan 2020 07:54:58 +0000 (16:54 +0900)]
Remove unneeded scope

4 years agoFix destructor in emcc.rs
Amanieu d'Antras [Mon, 13 Jan 2020 08:04:48 +0000 (08:04 +0000)]
Fix destructor in emcc.rs

4 years agoAuto merge of #67850 - GuillaumeGomez:err-codes-checkup, r=Mark-Simulacrum
bors [Mon, 13 Jan 2020 12:49:12 +0000 (12:49 +0000)]
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

4 years agoMove to new crate rustc_ty.
Camille GILLOT [Mon, 13 Jan 2020 12:40:30 +0000 (13:40 +0100)]
Move to new crate rustc_ty.

4 years agoUse TraitQueryMode::Canonical when testing predicates in const prop
Aaron Hill [Mon, 13 Jan 2020 11:06:42 +0000 (06:06 -0500)]
Use TraitQueryMode::Canonical when testing predicates in const prop

4 years agoAdd "--emit=link"
Aaron Hill [Sat, 11 Jan 2020 19:17:42 +0000 (14:17 -0500)]
Add "--emit=link"

This avoids a strange linker error that we get with only "--emit=mir"
and "check-pass"

4 years agoConvert test to check-pass
Aaron Hill [Sat, 11 Jan 2020 18:20:09 +0000 (13:20 -0500)]
Convert test to check-pass

4 years agoFix typo
Aaron Hill [Tue, 7 Jan 2020 15:53:04 +0000 (10:53 -0500)]
Fix typo

4 years agoAdd additional regression test
Aaron Hill [Tue, 7 Jan 2020 15:01:52 +0000 (10:01 -0500)]
Add additional regression test

4 years agoDon't run const propagation on items with inconsistent bounds
Aaron Hill [Mon, 6 Jan 2020 03:32:53 +0000 (22:32 -0500)]
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.

4 years agoAuto merge of #68174 - JohnTitor:rollup-ix4amrj, r=JohnTitor
bors [Mon, 13 Jan 2020 08:20:49 +0000 (08:20 +0000)]
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

4 years agoRollup merge of #68161 - ruuda:fix-instant-docs, r=rkruppe
Yuki Okushi [Mon, 13 Jan 2020 07:44:24 +0000 (16:44 +0900)]
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: https://github.com/rust-lang/rust/blob/3ebcfa1451cfedc13a07e6353d8ade9742dfdc2a/src/libstd/sys/unix/time.rs#L274
https://github.com/rust-lang/rust/blob/3ebcfa1451cfedc13a07e6353d8ade9742dfdc2a/src/libstd/sys/unix/time.rs#L348-L352

r? @steveklabnik

4 years agoRollup merge of #68157 - GuillaumeGomez:clean-up-e0186, r=Dylan-DPC
Yuki Okushi [Mon, 13 Jan 2020 07:44:23 +0000 (16:44 +0900)]
Rollup merge of #68157 - GuillaumeGomez:clean-up-e0186, r=Dylan-DPC

Clean up E0186 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68156 - JohnTitor:fix-path-in-doc, r=Dylan-DPC
Yuki Okushi [Mon, 13 Jan 2020 07:44:21 +0000 (16:44 +0900)]
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

4 years agoRollup merge of #68145 - JohnTitor:pub-check-lint-name-result, r=Centril
Yuki Okushi [Mon, 13 Jan 2020 07:44:20 +0000 (16:44 +0900)]
Rollup merge of #68145 - JohnTitor:pub-check-lint-name-result, r=Centril

Expose `context::CheckLintNameResult`

Clippy needs it

r? @Centril

4 years agoRollup merge of #68135 - calebcartwright:rustc-parse-visibilities, r=Centril
Yuki Okushi [Mon, 13 Jan 2020 07:44:18 +0000 (16:44 +0900)]
Rollup merge of #68135 - calebcartwright:rustc-parse-visibilities, r=Centril

restore some rustc_parse visibilities for rustfmt

In https://github.com/rust-lang/rust/pull/65495/commits/c189565edc5c9fc516170885b3a3061b936205fb 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

4 years agoRollup merge of #68097 - MikailBag:master, r=shepmaster
Yuki Okushi [Mon, 13 Jan 2020 07:44:17 +0000 (16:44 +0900)]
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.

4 years agoRollup merge of #67959 - liigo:patch-13, r=GuillaumeGomez
Yuki Okushi [Mon, 13 Jan 2020 07:44:15 +0000 (16:44 +0900)]
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)

4 years agoRollup merge of #67313 - oli-obk:document_all_the_t̶h̶i̶n̶g̶s̶dataflow, r=ecstatic...
Yuki Okushi [Mon, 13 Jan 2020 07:44:13 +0000 (16:44 +0900)]
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

4 years agoUse `report_in_external_macro` for internal lints
Afnan Enayet [Sat, 4 Jan 2020 01:27:14 +0000 (17:27 -0800)]
Use `report_in_external_macro` for internal lints

Add the option to report lints in external macros for rustc internal
lints

4 years agoAuto merge of #67900 - nikic:prepare-llvm-10, r=nagisa
bors [Mon, 13 Jan 2020 04:01:00 +0000 (04:01 +0000)]
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

4 years agoFix destructor return value in emcc.rs
Amanieu d'Antras [Mon, 13 Jan 2020 00:39:41 +0000 (00:39 +0000)]
Fix destructor return value in emcc.rs

4 years agorustdoc: HTML escape arrows on help popup
Oliver Middleton [Sun, 12 Jan 2020 23:37:47 +0000 (23:37 +0000)]
rustdoc: HTML escape arrows on help popup

4 years agoFix system call docs for time::Instant
Ruud van Asseldonk [Sun, 12 Jan 2020 20:24:31 +0000 (21:24 +0100)]
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.

4 years agoDon't include __rust_drop_panic when testing libstd
Amanieu d'Antras [Sun, 12 Jan 2020 16:59:44 +0000 (16:59 +0000)]
Don't include __rust_drop_panic when testing libstd

4 years agoClean up E0186 explanation
Guillaume Gomez [Sun, 12 Jan 2020 16:50:14 +0000 (17:50 +0100)]
Clean up E0186 explanation

4 years agoFix error codes explanation' code examples
Guillaume Gomez [Sat, 4 Jan 2020 00:41:25 +0000 (01:41 +0100)]
Fix error codes explanation' code examples

4 years agoFix crate paths in comments
Yuki Okushi [Sun, 12 Jan 2020 15:51:15 +0000 (00:51 +0900)]
Fix crate paths in comments

4 years agoUpdate `output-default.json` and rustdoc test
varkor [Fri, 10 Jan 2020 18:24:34 +0000 (18:24 +0000)]
Update `output-default.json` and rustdoc test

4 years agoAppease tidy
varkor [Fri, 10 Jan 2020 16:27:37 +0000 (16:27 +0000)]
Appease tidy

4 years agoFix formatting ellipses at the end of some diagnostics
varkor [Fri, 10 Jan 2020 15:13:56 +0000 (15:13 +0000)]
Fix formatting ellipses at the end of some diagnostics

4 years agoAdd backticks in appropriate places
varkor [Fri, 10 Jan 2020 14:57:36 +0000 (14:57 +0000)]
Add backticks in appropriate places

4 years agoDiagnostics should not end with a full stop
varkor [Fri, 10 Jan 2020 14:36:22 +0000 (14:36 +0000)]
Diagnostics should not end with a full stop

4 years agoDiagnostics should start lowercase
varkor [Fri, 10 Jan 2020 14:13:05 +0000 (14:13 +0000)]
Diagnostics should start lowercase

4 years agoAuto merge of #67831 - mati865:ci-images-upgrade, r=pietroalbini
bors [Sun, 12 Jan 2020 14:52:48 +0000 (14:52 +0000)]
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.

4 years agoDocument behavior of set_nonblocking on UnixListener
Till Arnold [Sun, 12 Jan 2020 11:01:37 +0000 (12:01 +0100)]
Document behavior of set_nonblocking on UnixListener

4 years agoAddress review comments.
Charles Lew [Sun, 12 Jan 2020 10:01:24 +0000 (18:01 +0800)]
Address review comments.

4 years agoAuto merge of #67901 - matthewjasper:split-mir-build, r=nagisa
bors [Sun, 12 Jan 2020 09:44:55 +0000 (09:44 +0000)]
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

4 years agoSplit `rustc_mir::{build, hair, lints}` into their own crate
Matthew Jasper [Sun, 5 Jan 2020 15:46:44 +0000 (15:46 +0000)]
Split `rustc_mir::{build, hair, lints}` into their own crate

4 years agoUpdate test benchmark file
Ben Lewis [Sun, 12 Jan 2020 07:41:03 +0000 (20:41 +1300)]
Update test benchmark file

4 years agoExpose `context::CheckLintNameResult`
Yuki Okushi [Sun, 12 Jan 2020 06:25:41 +0000 (15:25 +0900)]
Expose `context::CheckLintNameResult`

Clippy needs it

4 years agoAddress review comments.
Charles Lew [Sun, 12 Jan 2020 05:15:00 +0000 (13:15 +0800)]
Address review comments.

4 years agoAdded comment about behaviour.
Ben Lewis [Sun, 12 Jan 2020 04:32:50 +0000 (17:32 +1300)]
Added comment about behaviour.

4 years agoForbid elided lifetimes within const generic parameter types.
Ben Lewis [Sun, 12 Jan 2020 02:55:12 +0000 (15:55 +1300)]
Forbid elided lifetimes within const generic parameter types.

4 years agoAuto merge of #68142 - Centril:rollup-dl232e9, r=Centril
bors [Sun, 12 Jan 2020 02:28:48 +0000 (02:28 +0000)]
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

4 years agoRollup merge of #68108 - varkor:chained-comparison-suggestions, r=Centril
Mazdak Farrokhzad [Sun, 12 Jan 2020 02:28:02 +0000 (03:28 +0100)]
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.

4 years agoRollup merge of #68089 - lzutao:revert-remote_item, r=sfackler
Mazdak Farrokhzad [Sun, 12 Jan 2020 02:28:00 +0000 (03:28 +0100)]
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

4 years agoRollup merge of #68045 - Centril:liberate-lints, r=Mark-Simulacrum
Mazdak Farrokhzad [Sun, 12 Jan 2020 02:27:59 +0000 (03:27 +0100)]
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`.

4 years agoRollup merge of #67948 - llogiq:gallop, r=Mark-Simulacrum
Mazdak Farrokhzad [Sun, 12 Jan 2020 02:27:57 +0000 (03:27 +0100)]
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.

4 years agoRollup merge of #67867 - matthewjasper:opaque-assoc-lookup, r=oli-obk
Mazdak Farrokhzad [Sun, 12 Jan 2020 02:27:56 +0000 (03:27 +0100)]
Rollup merge of #67867 - matthewjasper:opaque-assoc-lookup, r=oli-obk

Correctly check for opaque types in `assoc_ty_def`

Closes #67856

4 years agoRollup merge of #67494 - lukaslueg:const_alloc, r=oli-obk
Mazdak Farrokhzad [Sun, 12 Jan 2020 02:27:54 +0000 (03:27 +0100)]
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.

4 years agouse winapi for non-stdlib Windows bindings
Andy Russell [Sat, 4 Jan 2020 21:46:47 +0000 (16:46 -0500)]
use winapi for non-stdlib Windows bindings

4 years agoGalloping search for binary_search_util
Andre Bogus [Mon, 6 Jan 2020 18:51:01 +0000 (19:51 +0100)]
Galloping search for binary_search_util

4 years agoAuto merge of #67458 - pnkfelix:fix-66530-by-propagating-fatal-error-from-worker...
bors [Sat, 11 Jan 2020 21:01:02 +0000 (21:01 +0000)]
Auto merge of #67458 - pnkfelix:fix-66530-by-propagating-fatal-error-from-worker, r=matthewjasper

When a codegen worker has a FatalError, propagate it instead of ICE'ing.

Fix #66530

4 years agoparse extended terminfo format
Andy Russell [Tue, 7 Jan 2020 19:32:37 +0000 (14:32 -0500)]
parse extended terminfo format

4 years agorestore some rustc_parse visibilities
Caleb Cartwright [Sat, 11 Jan 2020 19:19:57 +0000 (13:19 -0600)]
restore some rustc_parse visibilities

4 years agoImplement Cursor for linked lists. (RFC 2570).
Charles Lew [Sat, 11 Jan 2020 08:56:21 +0000 (16:56 +0800)]
Implement Cursor for linked lists. (RFC 2570).

4 years agoMove some queries from rustc::ty to librustc_passes.
Camille GILLOT [Wed, 1 Jan 2020 18:10:11 +0000 (19:10 +0100)]
Move some queries from rustc::ty to librustc_passes.

4 years agoConstify alloc::Layout
Lukas Lueg [Tue, 31 Dec 2019 23:25:20 +0000 (00:25 +0100)]
Constify alloc::Layout

Tracking issue #67521, Layout::new in #66254

4 years agoAuto merge of #67000 - spastorino:remove-promoted-from-place, r=oli-obk
bors [Sat, 11 Jan 2020 14:46:17 +0000 (14:46 +0000)]
Auto merge of #67000 - spastorino:remove-promoted-from-place, r=oli-obk

Promote references to constants instead of statics

r? @oli-obk

4 years agoMake codegen tests wordsize independent
Oliver Scherer [Sat, 11 Jan 2020 13:40:07 +0000 (14:40 +0100)]
Make codegen tests wordsize independent

4 years agoClarify the relationship between `extended` and `tools` in `config.toml`
varkor [Sat, 11 Jan 2020 13:04:06 +0000 (13:04 +0000)]
Clarify the relationship between `extended` and `tools` in `config.toml`

4 years agoAuto merge of #68126 - Centril:rollup-cz5u7xx, r=Centril
bors [Sat, 11 Jan 2020 11:36:39 +0000 (11:36 +0000)]
Auto merge of #68126 - Centril:rollup-cz5u7xx, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #67756 (Collector tweaks)
 - #67889 (Compile some CGUs in parallel at the start of codegen)
 - #67930 (Rename Result::as_deref_ok to as_deref)
 - #68018 (feature_gate: Remove `GateStrength`)
 - #68070 (clean up E0185 explanation)
 - #68072 (Fix ICE #68058)
 - #68114 (Don't require `allow_internal_unstable` unless `staged_api` is enabled.)
 - #68120 (Ban `...X` pats, harden tests, and improve diagnostics)

Failed merges:

r? @ghost

4 years agoRollup merge of #68120 - Centril:ban-range-to-dotdotdot, r=oli-obk
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:15 +0000 (12:36 +0100)]
Rollup merge of #68120 - Centril:ban-range-to-dotdotdot, r=oli-obk

Ban `...X` pats, harden tests, and improve diagnostics

Follow up to https://github.com/rust-lang/rust/pull/67258#issuecomment-565656155 and https://github.com/rust-lang/rust/pull/67258#discussion_r357879932.

r? @cramertj @oli-obk

4 years agoRollup merge of #68114 - ecstatic-morse:fix-feature-gating, r=Centril
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:14 +0000 (12:36 +0100)]
Rollup merge of #68114 - ecstatic-morse:fix-feature-gating, r=Centril

Don't require `allow_internal_unstable` unless `staged_api` is enabled.

#63770 changed `qualify_min_const_fn` to require `allow_internal_unstable` for *all* crates that used an unstable feature, regardless of whether `staged_api` was enabled or the `fn` that used that feature was stably const. In practice, this meant that every crate in the ecosystem that wanted to use nightly features added `#![feature(const_fn)]`, which skips `qualify_min_const_fn` entirely.

After this PR, crates that do not have `#![feature(staged_api)]` will only need to enable the feature they are interested in. For example, `#![feature(const_if_match)]` will be enough to enable `if` and `match` in constants. Crates with `staged_api` (e.g., `libstd`) require `#[allow_internal_unstable]` to be added to a function if it uses nightly features unless that function is also marked `#[rustc_const_unstable]`. This prevents proliferation of `#[allow_internal_unstable]` into functions that are not callable in a `const` context on stable.

r? @oli-obk (author of #63770)
cc @Centril

4 years agoRollup merge of #68072 - JohnTitor:fix-macro-ice, r=petrochenkov
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:12 +0000 (12:36 +0100)]
Rollup merge of #68072 - JohnTitor:fix-macro-ice, r=petrochenkov

Fix ICE #68058

Fixes #68058

r? @petrochenkov

4 years agoRollup merge of #68070 - GuillaumeGomez:clean-up-e0185, r=Dylan-DPC
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:10 +0000 (12:36 +0100)]
Rollup merge of #68070 - GuillaumeGomez:clean-up-e0185, r=Dylan-DPC

clean up E0185 explanation

r? @Dylan-DPC

4 years agoRollup merge of #68018 - petrochenkov:nosoft, r=Centril
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:09 +0000 (12:36 +0100)]
Rollup merge of #68018 - petrochenkov:nosoft, r=Centril

feature_gate: Remove `GateStrength`

The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](https://github.com/rust-lang/rust/issues/64266) would be a better way to do this.

cc https://github.com/rust-lang/rust/pull/67806#discussion_r363091701
r? @Centril

4 years agoRollup merge of #67930 - lzutao:result-as_deref, r=dtolnay
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:07 +0000 (12:36 +0100)]
Rollup merge of #67930 - lzutao:result-as_deref, r=dtolnay

Rename Result::as_deref_ok to as_deref

Addresses https://github.com/rust-lang/rust/issues/50264#issuecomment-533952247
r? @dtolnay

4 years agoRollup merge of #67889 - Zoxc:parallel-cgus, r=michaelwoerister
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:06 +0000 (12:36 +0100)]
Rollup merge of #67889 - Zoxc:parallel-cgus, r=michaelwoerister

Compile some CGUs in parallel at the start of codegen

This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`.

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

r? @michaelwoerister
cc @alexcrichton @Mark-Simulacrum

4 years agoRollup merge of #67756 - Zoxc:collector-tweaks, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 11 Jan 2020 11:36:04 +0000 (12:36 +0100)]
Rollup merge of #67756 - Zoxc:collector-tweaks, r=Mark-Simulacrum

Collector tweaks

r? @Mark-Simulacrum

4 years agoAbort if C++ tries to swallow a Rust panic
Amanieu d'Antras [Fri, 10 Jan 2020 00:19:40 +0000 (00:19 +0000)]
Abort if C++ tries to swallow a Rust panic

4 years agoApply review feedback
Amanieu d'Antras [Tue, 7 Jan 2020 10:36:57 +0000 (11:36 +0100)]
Apply review feedback

4 years agoExplain flag value of 8 for msvc_try
Amanieu d'Antras [Wed, 1 Jan 2020 21:24:39 +0000 (22:24 +0100)]
Explain flag value of 8 for msvc_try

4 years agoExplain the panic! in exception_copy
Amanieu d'Antras [Wed, 1 Jan 2020 21:14:37 +0000 (22:14 +0100)]
Explain the panic! in exception_copy

4 years agoAdd a test to check that swallowed Rust panics are dropped properly.
Amanieu d'Antras [Sun, 29 Dec 2019 22:23:40 +0000 (23:23 +0100)]
Add a test to check that swallowed Rust panics are dropped properly.

4 years agoFix a memory leak in SEH unwinding if a Rust panic is caught by C++ and discarded
Amanieu d'Antras [Sun, 29 Dec 2019 20:16:20 +0000 (21:16 +0100)]
Fix a memory leak in SEH unwinding if a Rust panic is caught by C++ and discarded

4 years agoSimplify exception cleanup for libunwind-style unwinding
Amanieu d'Antras [Thu, 26 Dec 2019 09:26:53 +0000 (10:26 +0100)]
Simplify exception cleanup for libunwind-style unwinding

4 years agoFix a memory leak in emcc if a Rust panic is caught by C++ and discarded
Amanieu d'Antras [Thu, 26 Dec 2019 15:46:32 +0000 (10:46 -0500)]
Fix a memory leak in emcc if a Rust panic is caught by C++ and discarded

4 years agofeature_gate: Remove `GateStrength`
Vadim Petrochenkov [Wed, 8 Jan 2020 17:27:06 +0000 (20:27 +0300)]
feature_gate: Remove `GateStrength`

4 years agoBan `...X` pats, harden tests, and improve diagnostics.
Mazdak Farrokhzad [Sat, 11 Jan 2020 05:49:43 +0000 (06:49 +0100)]
Ban `...X` pats, harden tests, and improve diagnostics.

Also fix a bug with the span passed in `mk_range`.

4 years agofix ui-fulldeps & tests fallout
Mazdak Farrokhzad [Fri, 10 Jan 2020 05:53:07 +0000 (06:53 +0100)]
fix ui-fulldeps & tests fallout

4 years agopacify the parallel compiler
Mazdak Farrokhzad [Thu, 9 Jan 2020 08:40:55 +0000 (09:40 +0100)]
pacify the parallel compiler

4 years agolints: move a comment
Mazdak Farrokhzad [Thu, 9 Jan 2020 06:58:48 +0000 (07:58 +0100)]
lints: move a comment

4 years agomove rustc::lint::{context, passes} to rustc_lint.
Mazdak Farrokhzad [Thu, 9 Jan 2020 06:52:01 +0000 (07:52 +0100)]
move rustc::lint::{context, passes} to rustc_lint.

Also do some cleanup of the interface.

4 years ago{rustc::lint -> rustc_lint}::internal
Mazdak Farrokhzad [Thu, 9 Jan 2020 05:49:49 +0000 (06:49 +0100)]
{rustc::lint -> rustc_lint}::internal

4 years agolints: promote levels.rs to lint.rs & extract passes.rs
Mazdak Farrokhzad [Thu, 9 Jan 2020 05:42:42 +0000 (06:42 +0100)]
lints: promote levels.rs to lint.rs & extract passes.rs

4 years agoinline maybe_lint_level_root
Mazdak Farrokhzad [Thu, 9 Jan 2020 05:08:07 +0000 (06:08 +0100)]
inline maybe_lint_level_root

4 years agomove struct_lint_level to levels.rs
Mazdak Farrokhzad [Thu, 9 Jan 2020 04:57:07 +0000 (05:57 +0100)]
move struct_lint_level to levels.rs

4 years agomove LintSource to levels
Mazdak Farrokhzad [Thu, 9 Jan 2020 04:20:28 +0000 (05:20 +0100)]
move LintSource to levels

4 years agomove logic to LintLevelsBuilder
Mazdak Farrokhzad [Thu, 9 Jan 2020 03:06:33 +0000 (04:06 +0100)]
move logic to LintLevelsBuilder

4 years agoGlobalCtxt: Erase `LintStore` type.
Mazdak Farrokhzad [Thu, 9 Jan 2020 02:45:42 +0000 (03:45 +0100)]
GlobalCtxt: Erase `LintStore` type.

4 years agoreduce diversity in linting methods
Mazdak Farrokhzad [Thu, 9 Jan 2020 02:28:45 +0000 (03:28 +0100)]
reduce diversity in linting methods

4 years agomove in_derive_expansion as Span method
Mazdak Farrokhzad [Thu, 9 Jan 2020 02:03:48 +0000 (03:03 +0100)]
move in_derive_expansion as Span method

4 years agocanonicalize some lint imports
Mazdak Farrokhzad [Sun, 5 Jan 2020 09:58:44 +0000 (10:58 +0100)]
canonicalize some lint imports

4 years agoAuto merge of #65912 - estebank:variants-orig, r=petrochenkov
bors [Sat, 11 Jan 2020 06:15:59 +0000 (06:15 +0000)]
Auto merge of #65912 - estebank:variants-orig, r=petrochenkov

Point at the span for the definition of crate foreign ADTs

Follow up to #65421. Partially addresses #65386. Blocked on #53081.

4 years agoExpand comment
ecstatic-morse [Sat, 11 Jan 2020 03:29:16 +0000 (19:29 -0800)]
Expand comment

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoUpdate test after renaming Result::as_deref
Lzu Tao [Tue, 7 Jan 2020 06:57:08 +0000 (06:57 +0000)]
Update test after renaming Result::as_deref

4 years agoRename Result::as_deref_ok to as_deref
Lzu Tao [Mon, 6 Jan 2020 12:59:46 +0000 (12:59 +0000)]
Rename Result::as_deref_ok to as_deref