Commit Graph

83315 Commits

Author SHA1 Message Date
bors
7625c03167 Auto merge of #53648 - japaric:thumb-lld, r=alexcrichton
change the default linker of the ARM Cortex-M targets

to rust-lld so users won't need an external linker to build programs

This will break nightly builds.

We discussed this within the embedded WG and with the embedded community in
rust-embedded/wg#160 and there was consensus in that this breaking change is
worthwhile and that we should do it now before it becomes impossible to do
without breaking stable builds.

We have already written an announcement (see rust-embedded/wg#196) that explains
the breakage and instructs the users how to fix their builds. The TL;DR is that
they can switch to the old behavior by passing the `-C linker` flag to rustc.
We'll post the announcement as soon as this change makes into nightly.

closes rust-embedded/wg#160

r? @alexcrichton
2018-08-27 06:30:10 +00:00
John Kåre Alsaker
0972658578 Update clippy 2018-08-27 06:48:15 +02:00
bors
3a2c603eea Auto merge of #53640 - alexcrichton:more-symbol-tweaks, r=michaelwoerister
rustc: Continue to tweak "std internal symbols"

In investigating [an issue][1] with `panic_implementation` defined in an
executable that's optimized I once again got to rethinking a bit about the
`rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of
been non-stop tweaking these items ever since their inception, and this
continues to the trend.

The crux of the bug was that in the reachability we have a [different branch][2]
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.

Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of `CodegenFnAttrs`. That way most code no longer even considers weak
lang items and they're simply considered normal functions with attributes about
the ABI.

In the end this fixes the final comment of #51342

[1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019
[2]: 35bf1ae257/src/librustc/middle/reachable.rs (L225-L238)
2018-08-27 01:28:52 +00:00
Esteban Kuber
a2722f3261
readd final newline 2018-08-26 18:03:57 -07:00
John Kåre Alsaker
bd04796d6e Move with_globals setup from run_compiler to run 2018-08-27 02:19:07 +02:00
Esteban Küber
26f38c0f34 Do not suggest dereferencing in macro 2018-08-26 16:54:06 -07:00
Alex Crichton
0a2282e128 rustc: Continue to tweak "std internal symbols"
In investigating [an issue][1] with `panic_implementation` defined in an
executable that's optimized I once again got to rethinking a bit about the
`rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of
been non-stop tweaking these items ever since their inception, and this
continues to the trend.

The crux of the bug was that in the reachability we have a [different branch][2]
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.

Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of `CodegenFnAttrs`. That way most code no longer even considers weak
lang items and they're simply considered normal functions with attributes about
the ABI.

In the end this fixes the final comment of #51342

[1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019
[2]: 35bf1ae257/src/librustc/middle/reachable.rs (L225-L238)
2018-08-26 16:34:14 -07:00
bors
51777b188d Auto merge of #53715 - pietroalbini:missing-components-manifest, r=alexcrichton
Include missing tools in the manifest and mark them as unavailable

This PR changes the `build-manifest` tool to always include the missing components in the manifest, marking them as `available = false`. This blocks rustup from updating to a different nightly if the component is installed.

The code builds and _should_ be correct, but I don't know a way to test the changes locally.

r? @alexcrichton
cc @kennytm https://github.com/rust-lang-nursery/rustup.rs/issues/1486
2018-08-26 22:49:47 +00:00
bors
7219130677 Auto merge of #53717 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

Successful merges:

 - #53043 (Improve unstable message display)
 - #53428 (libtest terse format: show how far in we are)
 - #53626 (Automatically expand a section even after page load)
 - #53651 (Add struct keyword doc)
 - #53706 (rustdoc: Fix gap on section anchor symbol when hovering.)

Failed merges:

 - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)

r? @ghost
2018-08-26 20:10:43 +00:00
Tobias Bucher
09a615c097 Reduce number of syscalls in rand
In case that it is statically known that the OS doesn't support
`getrandom` (non-Linux) or becomes clear at runtime that `getrandom`
isn't available (`ENOSYS`), the opened fd ("/dev/urandom") isn't closed
after the function, so that future calls can reuse it. This saves
repeated `open`/`close` system calls at the cost of one permanently open
fd.

Additionally, this skips the initial zero-length `getrandom` call and
directly hands the user buffer to the operating system, saving one
`getrandom` syscall.
2018-08-26 21:22:54 +02:00
Ariel Ben-Yehuda
025d01432f use an incremental-fulldeps test instead of a run-make test 2018-08-26 18:48:41 +03:00
Ariel Ben-Yehuda
5415bb6e8f create a valid DefIdTable for proc macro crates
At least the incremental compilation code, and a few other places in the
compiler, require the CrateMetadata for a loaded target crate to contain a
valid DefIdTable for the DefIds in the target.

Previously, the CrateMetadata for a proc macro contained the crate's
"host" DefIdTable, which is of course incompatible with the "target"
DefIdTable, causing ICEs. This creates a DefIdTable that properly refers
to the "proc macro" DefIds.

Fixes #49482.
2018-08-26 18:48:41 +03:00
Ariel Ben-Yehuda
993e7e2622 fix is_non_exhaustive confusion between structs and enums
Structs and enums can both be non-exhaustive, with a very different
meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1
for structs, and another for enums, and fixes the places that got the
usage confused.

Fixes #53549.
2018-08-26 18:24:51 +03:00
Guillaume Gomez
f9eef71986
Rollup merge of #53706 - ehuss:rustdoc-section-anchor, r=GuillaumeGomez
rustdoc: Fix gap on section anchor symbol when hovering.

Fixes #49485 for section headings.
2018-08-26 12:05:27 +02:00
Guillaume Gomez
91755d1f91
Rollup merge of #53651 - GuillaumeGomez:struct-keyword, r=QuietMisdreavus
Add struct keyword doc

Slowly, one keyword at a time.

r? @QuietMisdreavus
2018-08-26 12:05:26 +02:00
Guillaume Gomez
9c20f06f73
Rollup merge of #53626 - kzys:hashchange, r=GuillaumeGomez
Automatically expand a section even after page load

Fixes #52774
2018-08-26 12:05:25 +02:00
Guillaume Gomez
e166e6131a
Rollup merge of #53428 - RalfJung:libtest-terse, r=KodrAus
libtest terse format: show how far in we are

So for example `./x.py test src/libcore` looks like
```
running 881 tests
.................................................................................................... 100/881
.................................................................................................... 200/881
.................................................................................................... 300/881
.............................................................i.i.................................... 400/881
.................................................................................................... 500/881
.................................................................................................... 600/881
.................................................................................................... 700/881
.................................................................................................... 800/881
.................................................................................
test result: ok. 879 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out
```
When I am waiting for 3500 ui tests to complete, I am often missing some sense of how far in these 3500 it is.

Getting the total count in `write_run_start` is a bit hacky; I did that to not change the "public interface" of the formatters. I can also give them an extra argument in their constructor so that they know from the beginning how many tests there will be. Would you prefer that? (I think I would, but I wanted to get feedback first.)
2018-08-26 12:05:23 +02:00
Guillaume Gomez
49944aea3f
Rollup merge of #53043 - GuillaumeGomez:improve-unstable-msg-display, r=QuietMisdreavus
Improve unstable message display

Fixes #51387.
Reopening of #51563.

New display:

<img width="1440" alt="screen shot 2018-08-04 at 00 01 39" src="https://user-images.githubusercontent.com/3050060/43667793-dc14f708-9779-11e8-9808-f3ff126fc213.png">

r? @QuietMisdreavus
2018-08-26 12:05:21 +02:00
bors
caed80ba4b Auto merge of #53629 - nnethercote:lazier-SparseBitMatrix, r=nikomatsakis
Lazier sparse bit matrix

A small NLL win.

r? @nikomatsakis
2018-08-26 09:41:28 +00:00
Jorge Aparicio
521df797d5 add the other two targets to the manifest 2018-08-26 11:27:05 +02:00
Jorge Aparicio
264c47a2aa remove no longer needed Docker images 2018-08-26 11:27:05 +02:00
Jorge Aparicio
e2e72cc3ef fix docker build for the armebv7r-none-eabi target 2018-08-26 11:27:05 +02:00
Jorge Aparicio
a597b6a45c more consistent llvm triples 2018-08-26 11:27:05 +02:00
Jorge Aparicio
c9d8e28b8c add armebv7r-none-eabi target 2018-08-26 11:27:05 +02:00
Jorge Aparicio
84fa5d8037 build rust-std components for the Cortex-R targets 2018-08-26 11:27:05 +02:00
Jorge Aparicio
3537d7b54c set a default linker for the other Cortex-R targets 2018-08-26 11:27:05 +02:00
Jorge Aparicio
2c3a693dfa make the armebv7r target more consistent with the armv7r one
by removing the redundant +v7 feature
2018-08-26 11:27:05 +02:00
Jorge Aparicio
63d94905fa add armv7r-none-eabi target 2018-08-26 11:27:05 +02:00
Paolo Teti
7c1723c012 Add target for Little-endian ARM Cortex-R4F/R5F MCUs
Similar to `armebv7r-none-eabihf`, but for Little-endian MCUs.

As example TI RM4x/RM5x are Little-endian Cortex-R4F/R5F MCUs.

CI/Dockerfile is intentionally in the disabled folder.
2018-08-26 11:27:05 +02:00
bors
ede5551843 Auto merge of #53623 - cramertj:libc-update, r=alexcrichton
Update libc to include Fuchsia fixes

cc https://github.com/rust-lang/libc/pull/1067, @sulanov

r? @alexcrichton
2018-08-26 07:34:13 +00:00
Joseph Post
1f421d6456 call span_suggestion with applicability 2018-08-25 23:28:26 -05:00
bors
691638582a Auto merge of #53619 - japaric:panic-handler, r=SimonSapin
add #[panic_handler]; deprecate #[panic_implementation]

r? @SimonSapin
cc #44489
2018-08-26 04:02:19 +00:00
bors
36f14b95a2 Auto merge of #53567 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update Cargo submodule

Also update Cargo's dependencies while we're at it
2018-08-26 00:58:07 +00:00
Alex Crichton
2863b75425 Update Cargo submodule
Also update Cargo's dependencies while we're at it
2018-08-25 16:26:28 -07:00
bors
f272688bbb Auto merge of #53612 - mark-i-m:anon_param_disallowed_2018, r=petrochenkov
Remove anonymous trait params from 2018 and beyond

cc @Centril @nikomatsakis
cc #41686 rust-lang/rfcs#2522 #53272

This PR removes support for anonymous trait parameters syntactically in rust 2018 and onward.

TODO:
- [x] Add tests
2018-08-25 22:50:12 +00:00
Pietro Albini
dc03139e66
Include missing tools in the manifest and mark them as unavailable 2018-08-25 23:38:18 +02:00
Eric Huss
1c888d51f9 rustdoc: Fix gap on section anchor symbol when hovering.
Fixes #49485 for section headings.
2018-08-25 14:15:49 -07:00
bors
39e6ba8218 Auto merge of #53701 - Xanewok:update-rls, r=kennytm
Update RLS

Continuation of https://github.com/rust-lang/rust/pull/53610.
Workspaces are tricky - the `json_internal` problem was only reproducible in Rust CI (not sure why it was only relevant to Windows?) and it seems that this was fixed by updating serde_json workspace-wide.

Tested locally in Rust repo and it seems to be working.

Nightlies are currently shipping without RLS, so it'd be great to include this in the next nightlies if possible.
2018-08-25 19:30:10 +00:00
Igor Matuszewski
3a17cf7f8f Bump serde_json 1.0.24 -> 1.0.25
This fixes 'cannot find macro `json_internal!` in this scope' RLS
compilation error in Rust CI, presumably due to a local macro fix in
serde_json 1.0.25
(e40cbad70b)
2018-08-25 19:44:15 +02:00
Jakub Kozlowski
9395a02b5a Fix stabilisation version for macro_vis_matcher. 2018-08-25 17:49:45 +01:00
Igor Matuszewski
f67c776d40 Update RLS 2018-08-25 18:08:00 +02:00
Oliver Schneider
2d2b69d499 Satisfy tidy 2018-08-25 15:54:09 +02:00
Oliver Schneider
dba1c717ba Check cross crate stability of const fn 2018-08-25 15:31:24 +02:00
bors
545f22340f Auto merge of #53584 - mcr431:Fix-#53525, r=varkor
Fix #53525  - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107

Fix #53525

This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.
2018-08-25 13:00:20 +00:00
Oliver Schneider
458f5a21e2 Properly prevent the promotion of unstable const fns 2018-08-25 14:58:39 +02:00
Matthew Jasper
9309e2ef07 Use smaller span for adjustments on block expressions 2018-08-25 12:13:28 +01:00
Kazuyoshi Kato
2c61f3ce9e Expand a collapsed element on onclick
Doing the expansion on onhashchange seems too late.

Fixes #48726
2018-08-25 03:36:17 -07:00
bors
af2be23fd1 Auto merge of #53385 - matklad:stabilize-find-map, r=KodrAus
Stablize Iterator::find_map

Stabilization PR for https://github.com/rust-lang/rust/issues/49602
2018-08-25 08:53:04 +00:00
bors
e41f41142b Auto merge of #53609 - bemeurer:tidy-ctfe, r=RalfJung
Tidy CFTE/MIRI

Fixes #53596
2018-08-25 06:48:14 +00:00
bors
f87d9135b4 Auto merge of #53577 - GuillaumeGomez:rustdoc-substring-search, r=QuietMisdreavus
Search a substring instead of start of string in rustdoc search

Fixes #49762.

r? @QuietMisdreavus
2018-08-25 02:40:14 +00:00