Commit Graph

102662 Commits

Author SHA1 Message Date
Esteban Küber
9a595417a2 Tweak multiple allocators error 2019-11-25 13:30:48 -08:00
Esteban Küber
00fe97ad0e Fix capitalization when mentioning different crate versions in E0308 2019-11-25 12:38:45 -08:00
Esteban Küber
e5816a75cc Fix some rustdoc error capitalization 2019-11-24 18:42:22 -08:00
bors
f11759d38c Auto merge of #66610 - alexreg:trait-upcasting-cosmetic, r=Centril
Aggregation of drive-by cosmetic changes for trait-upcasting PR

Cherry-picked from #60900.

As requested by @Centril (and @nikomatsakis, I believe).

r? @Centril
2019-11-21 21:01:14 +00:00
Alexander Regueiro
1b2de17647 Applied suggestions from code review. 2019-11-21 18:50:40 +00:00
Alexander Regueiro
51cb60cd3f Aggregation of drive-by cosmetic changes. 2019-11-21 18:50:38 +00:00
bors
53712f8637 Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov
Specific labels when referring to "expected" and "found" types
2019-11-21 17:53:19 +00:00
bors
35ef33a89d Auto merge of #66607 - Centril:rollup-yb7cl73, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #65355 (Stabilize `!` in Rust 1.41.0)
 - #65730 (Suggest to add lifetime constraint at explicit ouput of functions)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
 - #66602 (Revert "Update Source Code Pro and include italics")

Failed merges:

r? @ghost
2019-11-21 14:30:02 +00:00
Mazdak Farrokhzad
5ab2bccbcd
Rollup merge of #66602 - GuillaumeGomez:revert-font, r=GuillaumeGomez
Revert "Update Source Code Pro and include italics"

This reverts commit ea9519bf16.
2019-11-21 15:29:08 +01:00
Mazdak Farrokhzad
d7bb37d663
Rollup merge of #66515 - Centril:cheaper-inline-asm, r=oli-obk
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`

r? @oli-obk
2019-11-21 15:29:07 +01:00
Mazdak Farrokhzad
02b38ac0ff
Rollup merge of #66468 - RalfJung:simd-cleanup, r=oli-obk
Cleanup Miri SIMD intrinsics

r? @oli-obk @eddyb Cc @gnzlbg
2019-11-21 15:29:05 +01:00
Mazdak Farrokhzad
e4a634189e
Rollup merge of #65730 - csmoe:return-lifetime, r=nikomatsakis
Suggest to add lifetime constraint at explicit ouput of functions

Closes #62097
2019-11-21 15:29:02 +01:00
Mazdak Farrokhzad
0828d5327b
Rollup merge of #65355 - Centril:almost-is-never-enough, r=oli-obk
Stabilize `!` in Rust 1.41.0

This PR stabilizes the `never_type` (written `!`). The type represents computations that we know diverge in the type system and therefore has no values / inhabitants / elements / members.

The current nightly version is 1.40.0 which will become stable on 2019-12-19.

Tracking issue: https://github.com/rust-lang/rust/issues/35121.
Closes https://github.com/rust-lang/rust/issues/57012.
Closes https://github.com/rust-lang/rust/issues/58184.
Original stabilization report: https://github.com/rust-lang/rust/issues/57012#issuecomment-452398538

Additional notes:

- In #62661 we reserved `impl<T> From<!> for T` so this concern should be resolved.
- The type inference fallback change is moved to `#![feature(never_type_fallback)]` (https://github.com/rust-lang/rust/issues/65992).
- You can find all of the tests referencing `never_type` in this PR which also reorganizes these tests whereas they were more scattered before.

r? @nikomatsakis
2019-11-21 15:29:00 +01:00
Mazdak Farrokhzad
238d03b3a3 never_type: test interaction with auto traits 2019-11-21 15:09:18 +01:00
Mazdak Farrokhzad
089229a193 Redefine core::convert::Infallible as !. 2019-11-21 14:55:33 +01:00
Mazdak Farrokhzad
6eb0627b49 Gate fallback via #![feature(never_type_fallback)]. 2019-11-21 14:55:33 +01:00
Mazdak Farrokhzad
8f6197f39f Remove #![feature(never_type)] from tests.
Also remove `never_type` the feature-gate test.
2019-11-21 14:55:32 +01:00
Mazdak Farrokhzad
15c30ddd69 Stabilize the never_type, written !. 2019-11-21 14:55:32 +01:00
Guillaume Gomez
d0b67ddc0f Revert "Update Source Code Pro and include italics"
This reverts commit ea9519bf16.
2019-11-21 11:18:23 +01:00
Mazdak Farrokhzad
44cebe5970 reduce size of hir::ExprKind 2019-11-21 01:23:29 +01:00
bors
f1b882b558 Auto merge of #66578 - Centril:rollup-pgz1v7t, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #66060 (Making ICEs and test them in incremental)
 - #66298 (rustdoc: fixes #64305: disable search field instead of hidding it)
 - #66457 (Just derive Hashstable in librustc)
 - #66496 (rustc_metadata: Privatize more things)
 - #66514 (Fix selected crate search filter)
 - #66535 (Avoid ICE when `break`ing to an unreachable label)
 - #66573 (Ignore run-make reproducible-build-2 on Mac)

Failed merges:

r? @ghost
2019-11-20 19:15:41 +00:00
Mazdak Farrokhzad
8754409159
Rollup merge of #66573 - pnkfelix:issue-66568-ignore-reproducible-build-2-on-macos, r=alexcrichton
Ignore run-make reproducible-build-2 on Mac

Ignore run-make reproducible-build-2 on Mac (we already ignore it on Windows).

Until we can dedicate resources to fixing this properly, I think we are best off just ignoring this test on platforms/contexts where it does not matter as much.

cc #66568
2019-11-20 18:32:13 +01:00
Mazdak Farrokhzad
52ed2c6dea
Rollup merge of #66535 - estebank:issue-62480, r=matthewjasper
Avoid ICE when `break`ing to an unreachable label

Fix #62480.
2019-11-20 18:32:12 +01:00
Mazdak Farrokhzad
4bd9168d7f
Rollup merge of #66514 - GuillaumeGomez:fix-search-filter-save, r=kinnison
Fix selected crate search filter

Fixes #62929.

r? @kinnison
2019-11-20 18:32:10 +01:00
Mazdak Farrokhzad
5a84f9b86e
Rollup merge of #66496 - petrochenkov:metapriv2, r=eddyb
rustc_metadata: Privatize more things

Continuation of https://github.com/rust-lang/rust/pull/66056.

The most notable change here is that `CrateMetadata` is moved from `cstore.rs` to `decoder.rs`.
Most of uses of `CrateMetadata` fields are in the decoder and uses of `root: CrateRoot` and other fields are so intertwined with each other that it would be hard to move a part of them into `cstore.rs` to privatize `CrateMetadata` fields, so we are going the other way round.

`cstore.rs` can probably be dismantled now, but I'll leave this to some other day.
Similarly, remaining `CrateMetadata` fields can be privatized by introducing some getter/setter methods, but not today.

r? @eddyb
2019-11-20 18:32:09 +01:00
Mazdak Farrokhzad
647eda17e8
Rollup merge of #66457 - cjgillot:just_hashstable, r=Zoxc
Just derive Hashstable in librustc

Split out of #66279

r? @Zoxc
2019-11-20 18:32:07 +01:00
Mazdak Farrokhzad
00cbc75c74
Rollup merge of #66298 - Ppjet6:disable-search-field, r=GuillaumeGomez
rustdoc: fixes #64305: disable search field instead of hidding it

The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.

@GuillaumeGomez

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20 18:32:06 +01:00
Mazdak Farrokhzad
e32397a754
Rollup merge of #66060 - traxys:test_65401, r=michaelwoerister
Making ICEs and test them in incremental

This adds:
 - A way to make the compiler ICE
 - A way to check for ICE in `cfail` tests with `should-ice`
 - A regression test for issue #65401

I am not sure the attribute added `should-ice` is the best for this job
2019-11-20 18:32:04 +01:00
bors
b9cf541789 Auto merge of #66571 - Centril:rollup-41tn2fw, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #65665 (Update Source Code Pro and include italics)
 - #66478 (rustc_plugin: Remove the compatibility shim)
 - #66497 (Fix #53820)
 - #66526 (Add more context to `async fn` trait error)
 - #66532 (Generate DWARF address ranges for faster lookups)
 - #66546 (Remove duplicate function)
 - #66548 ([RISCV] Disable Atomics on all Non-A RISC-V targets)
 - #66553 (remove HermitCore leftovers from sys/unix)

Failed merges:

r? @ghost
2019-11-20 14:04:12 +00:00
Felix S. Klock II
6ab28b50da Ignore run-make reproducible-build-2 on Mac (we already ignore it on Windows).
Until we can dedicate resources to fixing this properly, I think we are
best off just ignoring this test on platforms/contexts where it does not
matter as much.
2019-11-20 14:07:01 +01:00
Mazdak Farrokhzad
ebd0ef9a39
Rollup merge of #66553 - hermitcore:hermit, r=rkruppe
remove HermitCore leftovers from sys/unix

HermitCore support is already moved to the directory "sys/hermit". => remove leftovers
2019-11-20 12:58:37 +01:00
Mazdak Farrokhzad
fff8ae1aa8
Rollup merge of #66548 - lenary:riscv/disable-atomics-non-a, r=alexcrichton
[RISCV] Disable Atomics on all Non-A RISC-V targets

In a `TargetOptions` configuration, `max_atomic_width: None` causes `max_atomic_width()` to return `Some(target_pointer_width)`. So, contrary to assumptions, `max_atomic_width: None` means you do have atomic support!

RISC-V's rv32i and rv32imc do not have architectural support for atomic memory accesses of any size, because they do not include the `A` architecture extension. This means the values in the target definition should be `Some(0)`.

This bug has been observed via a build failure with oreboot/oreboot#191, where LLVM was still generating libcalls for atomic operations. According to rust-lang/compiler-builtins, "Rust only exposes atomic types on platforms that support them, and therefore does not need to fall back to software implementations." - so this PR tries to bring rustc inline with this decision.

This commit also removes the outdated bug link, which references a now irrelevant GCC bug.

I will likely also have to revisit the `min_atomic_width` of all the RISC-V targets so they are correct and match what the hardware is capable of (which is more restricted than one might imagine).

r? @alexcrichton
2019-11-20 12:58:35 +01:00
Mazdak Farrokhzad
4997604503
Rollup merge of #66546 - aradzie:remove_duplicate_function, r=Dylan-DPC
Remove duplicate function

Function `source_name` declared in file

[src/librustc_driver/lib.rs](https://github.com/rust-lang/rust/blob/master/src/librustc_driver/lib.rs#L87)

is a duplicate of the function by the same name declared in file

[src/librustc/session/config.rs](https://github.com/rust-lang/rust/blob/master/src/librustc/session/config.rs#L511)
2019-11-20 12:58:33 +01:00
Mazdak Farrokhzad
1346557ba1
Rollup merge of #66532 - cuviper:dwarf-aranges, r=michaelwoerister
Generate DWARF address ranges for faster lookups

This adds a new option `-Zgenerate-arange-section`, enabled by default,
corresponding to LLVM's `-generate-arange-section`. This creates a
`.debug_aranges` section with DWARF address ranges, which some tools
depend on to optimize address lookups (elfutils [22288], [25173]).

This only has effect when debuginfo is enabled, and the additional data
is small compared to the other debug sections. For example, libstd.so
with full debuginfo is about 11MB, with just 61kB in aranges.

[22288]: https://sourceware.org/bugzilla/show_bug.cgi?id=22288
[25173]: https://sourceware.org/bugzilla/show_bug.cgi?id=25173

Closes #45246.
r? @michaelwoerister
2019-11-20 12:58:32 +01:00
Mazdak Farrokhzad
0a0d07a1fc
Rollup merge of #66526 - estebank:async-fn-trait-information, r=Centril
Add more context to `async fn` trait error

Follow up to #65937. Fix #65899.
2019-11-20 12:58:30 +01:00
Mazdak Farrokhzad
2d6e3764b4
Rollup merge of #66497 - Nadrieril:fix-53820, r=varkor
Fix #53820

This fixes ICE #53820 by being more clever when matching large arrays with slice patterns.
In particular, it avoids treating large arrays like large tuples, and instead reuses the `VarLenSlice` constructor behaviour to only consider as little values as needed.
As a side-effect, such matches also get improved diagnostics, by reporting `[true, ..]` missing instead of `[true, _, _, _, _, _, _, _]`.
2019-11-20 12:58:29 +01:00
Mazdak Farrokhzad
3ef2384e50
Rollup merge of #66478 - petrochenkov:rmplugin, r=davidtwco
rustc_plugin: Remove the compatibility shim

The compatibility crate was introduced in https://github.com/rust-lang/rust/pull/62727 to migrate Cargo and some other tools, but now it's no longer necessary.
2019-11-20 12:58:27 +01:00
Mazdak Farrokhzad
423137b779
Rollup merge of #65665 - tspiteri:italic-and-update-SourceCodePro, r=GuillaumeGomez
Update Source Code Pro and include italics

Fixes #65502.

A few notes:
  * As stated in #65502, this does increase the download size.
  * Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged.
  * The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600)).
2019-11-20 12:58:26 +01:00
Guillaume Gomez
572133845a Change background-color of search input if disabled 2019-11-20 12:57:47 +01:00
bors
ea540b0892 Auto merge of #66392 - estebank:trait-alias-ice, r=eddyb
Do not ICE on trait aliases with missing obligations

Fix #65673.
2019-11-20 10:51:26 +00:00
Maxime “pep” Buquet
5cbd406a14 rustdoc: fixes #64305: disable search field instead of hidding it
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20 11:32:58 +01:00
bors
f50d6ea348 Auto merge of #66104 - yodaldevoid:generic-arg-disambiguation, r=petrochenkov
Generic arg disambiguation

Using the tactic suggested by @petrochenkov in https://github.com/rust-lang/rust/issues/60804#issuecomment-516769465 and on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/generic.20argument.20disambiguation), this change checks type arguments to see if they are really incorrectly-parsed const arguments.

it should be noted that `segments.len() == 1 && segments[0].arg.is_none()` was reduced to `segments.len() == 1` as suggested by @petrochenkov in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/generic.20argument.20disambiguation/near/177848002). This change allowed a few more existing tests to have their braces removed.

There are a couple of "problems" with these changes that I should note. First, there was a regression in the error messages found in "src/test/ui/privacy-ns1.rs" and "src/test/ui/privacy-ns1.rs". Second, some braces were unable to be removed from "src/test/ui/const-generics/fn-const-param-infer.rs". Those on line 24 caused the statement to stop equating when removed, and those on line 20 cause a statement that should not equate to produce no error when removed.

I have not looked further into any of these issues yet, though I would be willing to look into them before landing this. I simply wanted to get some other eyes on this before going further.

Fixes #60804

cc @varkor @jplatte
2019-11-20 03:07:39 +00:00
Camille GILLOT
579625b9e7 Revert expansion of impl HashStable for Frame. 2019-11-19 20:48:11 +01:00
Camille GILLOT
4da5fe7fdb Fix derive syntax. 2019-11-19 20:48:08 +01:00
Camille GILLOT
7db84e8504 Fix project syntax. 2019-11-19 20:48:06 +01:00
Camille GILLOT
d9eaaf5973 Derive HashStable in librustc_mir. 2019-11-19 20:48:02 +01:00
Camille GILLOT
e1522fa183 Derive HashStable more. 2019-11-19 20:47:57 +01:00
Camille GILLOT
781866f3a9 More HashStable. 2019-11-19 20:47:31 +01:00
Stefan Lankes
ab6cb01971 HermitCore support is moved to sys/hermit, remove obsolete statement in sys/unix 2019-11-19 20:43:06 +01:00
Camille GILLOT
c4bc3f05f5 More HashStable. 2019-11-19 20:40:28 +01:00