]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoCleanup Deref impls and add ?Sized bound to &mut T impls
Taylor Cramer [Tue, 18 Sep 2018 18:48:03 +0000 (11:48 -0700)]
Cleanup Deref impls and add ?Sized bound to &mut T impls

5 years agoRemove outdated rustdoc PinBox tests
Taylor Cramer [Tue, 18 Sep 2018 08:42:27 +0000 (01:42 -0700)]
Remove outdated rustdoc PinBox tests

5 years agoCleanup and fix method resolution issue
Taylor Cramer [Sat, 15 Sep 2018 00:40:52 +0000 (17:40 -0700)]
Cleanup and fix method resolution issue

5 years agoUpdate to a new pinning API.
Without Boats [Sat, 1 Sep 2018 04:12:10 +0000 (06:12 +0200)]
Update to a new pinning API.

5 years agoAuto merge of #53758 - oli-obk:clippy, r=kennytm
bors [Wed, 29 Aug 2018 13:35:25 +0000 (13:35 +0000)]
Auto merge of #53758 - oli-obk:clippy, r=kennytm

Update clippy submodule

r? @Manishearth @nrc @kennytm

5 years agoAdd more features to the workspace so that all tools pick up on it
Oliver Schneider [Wed, 29 Aug 2018 11:17:48 +0000 (13:17 +0200)]
Add more features to the workspace so that all tools pick up on it

5 years agoUpdate clippy submodule
Oliver Schneider [Tue, 28 Aug 2018 11:19:01 +0000 (13:19 +0200)]
Update clippy submodule

5 years agoAuto merge of #53245 - michaelwoerister:thinlto-rust-llvm, r=alexcrichton
bors [Wed, 29 Aug 2018 10:55:27 +0000 (10:55 +0000)]
Auto merge of #53245 - michaelwoerister:thinlto-rust-llvm, r=alexcrichton

[experimental]: Build LLVM with ThinLTO enabled (2nd attempt)

This is https://github.com/rust-lang/rust/pull/51207 revived. This time, I'd like to run actual performance tests to see if it improves compile times.

5 years agobootstrap: Link LLVM tools dynamically in order to save time in ThinLTO builds.
Michael Woerister [Tue, 14 Aug 2018 12:31:12 +0000 (14:31 +0200)]
bootstrap: Link LLVM tools dynamically in order to save time in ThinLTO builds.

5 years agoAuto merge of #53711 - arielb1:macro-table, r=michaelwoerister
bors [Wed, 29 Aug 2018 08:42:20 +0000 (08:42 +0000)]
Auto merge of #53711 - arielb1:macro-table, r=michaelwoerister

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.

r? @michaelwoerister

Should we beta-nominate this?

5 years agoAuto merge of #53684 - alexcrichton:suggest-remove, r=oli-obk
bors [Wed, 29 Aug 2018 06:24:30 +0000 (06:24 +0000)]
Auto merge of #53684 - alexcrichton:suggest-remove, r=oli-obk

rustc: Suggest removing `extern crate` in 2018

This commit updates the `unused_extern_crates` lint to make automatic
suggestions about removing `extern crate` annotations in the 2018 edition. This
ended up being a little easier than originally though due to what's likely been
fixed issues in the resolver!

Closes #52829

5 years agoAuto merge of #53659 - nnethercote:rm-AccumulateVec, r=Mark-Simulacrum
bors [Wed, 29 Aug 2018 04:20:01 +0000 (04:20 +0000)]
Auto merge of #53659 - nnethercote:rm-AccumulateVec, r=Mark-Simulacrum

Remove `AccumulateVec` and its uses.

It's basically just a less capable version of `SmallVec`.

FWIW, the only use of `ArrayVec` is now within `HybridIdxSet`.

r? @Mark-Simulacrum

5 years agoAuto merge of #53642 - alexcrichton:fix-target-cpu-native, r=arielb1
bors [Wed, 29 Aug 2018 02:08:02 +0000 (02:08 +0000)]
Auto merge of #53642 - alexcrichton:fix-target-cpu-native, r=arielb1

Fix warnings about the `native` target-cpu

This fixes a regression from #53031 where specifying `-C target-cpu=native` is
printing a lot of warnings from LLVM about `native` being an unknown CPU. It
turns out that `native` is indeed an unknown CPU and we have to perform a
mapping to an actual CPU name, but this mapping is only performed in one
location rather than all locations we inform LLVM about the target CPU.

This commit centralizes the mapping of `native` to LLVM's value of the native
CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's
never `native`.

Closes #53322

5 years agoAuto merge of #53671 - RalfJung:miri-refactor, r=oli-obk
bors [Wed, 29 Aug 2018 00:02:37 +0000 (00:02 +0000)]
Auto merge of #53671 - RalfJung:miri-refactor, r=oli-obk

Miri engine cleanup

* Unify the two maps in memory to store the allocation and its kind together.
* Share the handling of statics between CTFE and miri: The miri engine always
      uses "lazy" `AllocType::Static` when encountering a static.  Acessing that
      static invokes CTFE (no matter the machine).  The machine only has any
      influence when writing to a static, which CTFE outright rejects (but miri
      makes a copy-on-write).
* Add an `AllocId` to by-ref consts so miri can use them as operands without
      making copies.
* Move responsibilities around for the `eval_fn_call` machine hook: The hook
      just has to find the MIR (or entirely take care of everything); pushing the
      new stack frame is taken care of by the miri engine.
* Expose the intrinsics and lang items implemented by CTFE so miri does not
      have to reimplement them.
* Allow Machine to hook into foreign statics (used by miri to get rid of some other hacks).
* Clean up function calling.
* Switch const sanity check to work on operands, not mplaces.
* Move const_eval out of rustc_mir::interpret, to make sure that it does not access private implementation details.

In particular, we can finally make `eval_operand` take `&self`. :-)

Should be merged after https://github.com/rust-lang/rust/pull/53609, across which I will rebase.

5 years agoRemove `AccumulateVec` and its uses.
Nicholas Nethercote [Fri, 24 Aug 2018 03:51:32 +0000 (13:51 +1000)]
Remove `AccumulateVec` and its uses.

It's basically just a less capable version of `SmallVec`.

5 years agoFix warnings about the `native` target-cpu
Alex Crichton [Thu, 23 Aug 2018 18:03:22 +0000 (11:03 -0700)]
Fix warnings about the `native` target-cpu

This fixes a regression from #53031 where specifying `-C target-cpu=native` is
printing a lot of warnings from LLVM about `native` being an unknown CPU. It
turns out that `native` is indeed an unknown CPU and we have to perform a
mapping to an actual CPU name, but this mapping is only performed in one
location rather than all locations we inform LLVM about the target CPU.

This commit centralizes the mapping of `native` to LLVM's value of the native
CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's
never `native`.

Closes #53322

5 years agofirst test const-ness, then hook fn call
Ralf Jung [Mon, 27 Aug 2018 15:57:30 +0000 (17:57 +0200)]
first test const-ness, then hook fn call

5 years agofix const_prop detecting unary neg underflows
Ralf Jung [Sun, 26 Aug 2018 14:36:18 +0000 (16:36 +0200)]
fix const_prop detecting unary neg underflows

5 years agorestructure unary_op to also dispatch on type first; fix promotion with unary '-...
Ralf Jung [Sun, 26 Aug 2018 13:13:01 +0000 (15:13 +0200)]
restructure unary_op to also dispatch on type first; fix promotion with unary '-' overflowing

5 years agofix unsized extern types
Ralf Jung [Sun, 26 Aug 2018 12:35:15 +0000 (14:35 +0200)]
fix unsized extern types

5 years agoaddress nits
Ralf Jung [Sun, 26 Aug 2018 12:22:59 +0000 (14:22 +0200)]
address nits

5 years agoAuto merge of #53679 - japaric:cortex-r, r=alexcrichton
bors [Tue, 28 Aug 2018 16:23:27 +0000 (16:23 +0000)]
Auto merge of #53679 - japaric:cortex-r, r=alexcrichton

add more Cortex-R targets

This expands on PR #53663 to complete the set of Cortex-R targets and builds
rust-std components for them.

r? @alexcrichton

each extra rust-std component (there's 4 of them) takes about 3 minutes to build
on my local machine. In terms of stability (LLVM codegen bugs) these new targets
should be as stable as the Cortex-M ones (e.g. `thumbv7m-none-eabi`).

If the extra build time is too much we can leave the rust-std components out for
now

closes #53663
cc @paoloteti

5 years agoAuto merge of #53493 - matthewjasper:hair-spans, r=nikomatsakis
bors [Tue, 28 Aug 2018 13:12:16 +0000 (13:12 +0000)]
Auto merge of #53493 - matthewjasper:hair-spans, r=nikomatsakis

Use smaller span for adjustments on block expressions

When returning a mutable reference don't use the entire body of the function as the span for the adjustments at the end.

The error [in this case](https://github.com/rust-lang/rust/compare/master...matthewjasper:hair-spans?expand=1#diff-ecef8b1f15622fb48a803c9b61605c78) is worse, but neither error message is really what we want. I have some ideas on how to get a better error message that will have to wait for a future PR.

5 years agoAuto merge of #53314 - nikomatsakis:nll-invert-liveness, r=pnkfelix
bors [Tue, 28 Aug 2018 10:58:10 +0000 (10:58 +0000)]
Auto merge of #53314 - nikomatsakis:nll-invert-liveness, r=pnkfelix

NLL: experiment with inverting liveness

I got inspired to see what would happen here.

Fixes #52460

r? @pnkfelix

5 years agoFix definition of `LocalUseMapBuild` so that it can build under stage0,
Felix S. Klock II [Tue, 28 Aug 2018 08:59:15 +0000 (10:59 +0200)]
Fix definition of `LocalUseMapBuild` so that it can build under stage0,
which does not have as many feature gates enabled.

5 years agoAuto merge of #53616 - varkor:hir-map-rename, r=nikomatsakis
bors [Tue, 28 Aug 2018 06:44:12 +0000 (06:44 +0000)]
Auto merge of #53616 - varkor:hir-map-rename, r=nikomatsakis

Restructure hir::map::Node and hir::map::Entry

- Moves `hir::map::Node` to `hir::Node` and removes the `Node*` prefix from its variants.
- Changes `hir::map::Entry` to a struct `hir::map::Entry`.
- Removes the `Node*` prefix from each of `AnnNode`s variants.

r? @eddyb

5 years agoAuto merge of #53404 - oconnor663:current_dir_behavior, r=alexcrichton
bors [Tue, 28 Aug 2018 03:22:21 +0000 (03:22 +0000)]
Auto merge of #53404 - oconnor663:current_dir_behavior, r=alexcrichton

document the platform-specific behavior of Command::current_dir

See also https://github.com/rust-lang/rust/issues/37868.

Here's my initial wording:

> Note that if the program path is relative (e.g. `"./script.sh"`), the interaction between that path and `current_dir` varies across platforms. Windows currently ignores `current_dir` when locating the program, but Unix-like systems interpret the program path relative to `current_dir`. These implementation details aren't considered stable, and it's recommended to call `canonicalize` to get an absolute program path instead of using relative paths and `current_dir` together.

I'd like to get feedback on:

- _Should_ we consider those details stable? It might be disruptive to change them, regardless of what I can get away with claiming in docs :)
- Is `canonicalize` an appropriate recommendation? As discussed in #37868 above, there are reasons it's not called automatically in the `Command` implementation.

5 years agoAuto merge of #53272 - mark-i-m:anon_param_error_now, r=nikomatsakis
bors [Tue, 28 Aug 2018 01:04:05 +0000 (01:04 +0000)]
Auto merge of #53272 - mark-i-m:anon_param_error_now, r=nikomatsakis

Warn on anon params in 2015 edition

cc #41686 https://github.com/rust-lang/rfcs/pull/2522
cc  @Centril @nikomatsakis

TODO:
- [x] Make sure the tests pass.
- [x] Make sure there is rustfix-able suggestion. Current plan is to just suggest `_ : Foo`
- [x] Add a rustfix ui test.

EDIT: It seems I already did the last two in #48309

5 years agoAuto merge of #53227 - nivkner:pin_move, r=RalfJung
bors [Mon, 27 Aug 2018 22:56:15 +0000 (22:56 +0000)]
Auto merge of #53227 - nivkner:pin_move, r=RalfJung

move the Pin API into its own module for centralized documentation

This implements the change proposed by @withoutboats in #49150, as suggested by @RalfJung in the review of #53104,
along with the documentation that was originally in it, that was deemed more appropriate in module-level documentation.

r? @RalfJung

5 years agoRevert crate root changes
varkor [Sat, 25 Aug 2018 23:20:24 +0000 (00:20 +0100)]
Revert crate root changes

5 years agoMake small modifications
varkor [Sat, 25 Aug 2018 22:10:01 +0000 (23:10 +0100)]
Make small modifications

5 years agoRename hir::map::NodeKind to hir::Node
varkor [Sat, 25 Aug 2018 14:56:16 +0000 (15:56 +0100)]
Rename hir::map::NodeKind to hir::Node

5 years agoConvert EntryKind to a struct, Entry
varkor [Sat, 25 Aug 2018 14:48:42 +0000 (15:48 +0100)]
Convert EntryKind to a struct, Entry

5 years agoRemove path prefixes from NodeKind
varkor [Wed, 22 Aug 2018 22:05:26 +0000 (23:05 +0100)]
Remove path prefixes from NodeKind

5 years agoRemove Node* prefix from AnnNode
varkor [Wed, 22 Aug 2018 21:05:19 +0000 (22:05 +0100)]
Remove Node* prefix from AnnNode

5 years agoRename hir::map::Node to hir::map::NodeKind
varkor [Wed, 22 Aug 2018 20:55:53 +0000 (21:55 +0100)]
Rename hir::map::Node to hir::map::NodeKind

5 years agoRename MapEntry to EntryKind
varkor [Wed, 22 Aug 2018 20:35:43 +0000 (21:35 +0100)]
Rename MapEntry to EntryKind

5 years agoAuto merge of #51456 - qmx:crate-in-path, r=nikomatsakis
bors [Mon, 27 Aug 2018 19:51:01 +0000 (19:51 +0000)]
Auto merge of #51456 - qmx:crate-in-path, r=nikomatsakis

resolve suggestions should use `crate::` when enabled

I couldn't find a way to add a specific assertion for the ui test, so the expected output is living under the `crates-in-path.stderr` ui test.

- is this the right place for the test?

fixes #51212

5 years agofix test stderrs
Mark Mansi [Mon, 27 Aug 2018 18:06:26 +0000 (13:06 -0500)]
fix test stderrs

5 years agomake `to_location` O(1)
Niko Matsakis [Wed, 22 Aug 2018 11:41:59 +0000 (07:41 -0400)]
make `to_location` O(1)

5 years agomerge `PointIndexMap` and `RegionValueElements`
Niko Matsakis [Tue, 21 Aug 2018 20:48:16 +0000 (16:48 -0400)]
merge `PointIndexMap` and `RegionValueElements`

5 years agomicro-optimize dominator code
Niko Matsakis [Mon, 13 Aug 2018 23:05:07 +0000 (19:05 -0400)]
micro-optimize dominator code

5 years agokill dead code from `util/liveness`
Niko Matsakis [Mon, 20 Aug 2018 20:44:48 +0000 (13:44 -0700)]
kill dead code from `util/liveness`

5 years agoimprove comment on `LiveVar`
Niko Matsakis [Mon, 20 Aug 2018 20:35:43 +0000 (13:35 -0700)]
improve comment on `LiveVar`

5 years agorename `LocalWithRegion` to `LiveVar`
Niko Matsakis [Mon, 20 Aug 2018 20:32:55 +0000 (13:32 -0700)]
rename `LocalWithRegion` to `LiveVar`

5 years agocomment what `trace` does
Niko Matsakis [Sun, 19 Aug 2018 14:45:59 +0000 (07:45 -0700)]
comment what `trace` does

5 years agofix comment
Niko Matsakis [Sun, 19 Aug 2018 14:42:22 +0000 (07:42 -0700)]
fix comment

5 years agoenable feature `impl_header_lifetime_elision`
Niko Matsakis [Mon, 13 Aug 2018 21:30:50 +0000 (17:30 -0400)]
enable feature `impl_header_lifetime_elision`

5 years agoliveness.rs: rustfmt
Niko Matsakis [Mon, 13 Aug 2018 21:50:34 +0000 (17:50 -0400)]
liveness.rs: rustfmt

5 years agoimplement liveness tracing, remove old liveness system
Niko Matsakis [Sun, 12 Aug 2018 17:07:14 +0000 (13:07 -0400)]
implement liveness tracing, remove old liveness system

5 years agorustc: Suggest removing `extern crate` in 2018
Alex Crichton [Fri, 24 Aug 2018 21:00:15 +0000 (14:00 -0700)]
rustc: Suggest removing `extern crate` in 2018

This commit updates the `unused_extern_crates` lint to make automatic
suggestions about removing `extern crate` annotations in the 2018 edition. This
ended up being a little easier than originally though due to what's likely been
fixed issues in the resolver!

Closes #52829

5 years agoupdate comment in the interest of precision
Niko Matsakis [Mon, 13 Aug 2018 16:02:38 +0000 (09:02 -0700)]
update comment in the interest of precision

5 years agoremove the liveness mode and simplify `categorize`
Niko Matsakis [Fri, 10 Aug 2018 16:42:48 +0000 (12:42 -0400)]
remove the liveness mode and simplify `categorize`

Less modes!

5 years agoAuto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakis
bors [Mon, 27 Aug 2018 17:42:45 +0000 (17:42 +0000)]
Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakis

fix for late-bound regions

Fix for https://github.com/rust-lang/rust/issues/53419

r? @nikomatsakis

5 years agoFix anon param + make it allow-by-def
Mark Mansi [Mon, 27 Aug 2018 17:14:31 +0000 (12:14 -0500)]
Fix anon param + make it allow-by-def

5 years agofix another
Mark Mansi [Sat, 11 Aug 2018 17:44:35 +0000 (12:44 -0500)]
fix another

5 years agofix some anon params
Mark Mansi [Sat, 11 Aug 2018 17:28:35 +0000 (12:28 -0500)]
fix some anon params

5 years agooops
Mark Mansi [Sat, 11 Aug 2018 16:39:10 +0000 (11:39 -0500)]
oops

5 years agowarn on anon params in 015
Mark Mansi [Sat, 11 Aug 2018 16:15:57 +0000 (11:15 -0500)]
warn on anon params in 015

5 years agouse associated const for machine controlling mutable statics
Ralf Jung [Sun, 26 Aug 2018 10:59:59 +0000 (12:59 +0200)]
use associated const for machine controlling mutable statics

So get rid of the IsStatic trait again

5 years agoget rid of *most* of the fn call hack by honoring mir.spread_arg
Ralf Jung [Sat, 25 Aug 2018 19:22:00 +0000 (21:22 +0200)]
get rid of *most* of the fn call hack by honoring mir.spread_arg

5 years agofix len() on non-array but array-layout types (e.g. SIMD)
Ralf Jung [Sat, 25 Aug 2018 16:32:01 +0000 (18:32 +0200)]
fix len() on non-array but array-layout types (e.g. SIMD)

5 years agoexpand comment on how statics work
Ralf Jung [Sat, 25 Aug 2018 15:10:08 +0000 (17:10 +0200)]
expand comment on how statics work

5 years agofix handling of unsized types in validation; validate str to be UTF-8
Ralf Jung [Sat, 25 Aug 2018 12:36:24 +0000 (14:36 +0200)]
fix handling of unsized types in validation; validate str to be UTF-8

5 years agovalidate enum discriminant whenever it is read
Ralf Jung [Sat, 25 Aug 2018 09:07:03 +0000 (11:07 +0200)]
validate enum discriminant whenever it is read

5 years agodedicated handling for binops on bool and char (UB if they are not valid)
Ralf Jung [Fri, 24 Aug 2018 16:36:52 +0000 (18:36 +0200)]
dedicated handling for binops on bool and char (UB if they are not valid)

5 years agoget rid of FinishStatic hack from stack clenaup; const_eval can do that itself
Ralf Jung [Fri, 24 Aug 2018 15:36:18 +0000 (17:36 +0200)]
get rid of FinishStatic hack from stack clenaup; const_eval can do that itself

5 years agomove const_eval out of rustc_mir::interpret
Ralf Jung [Fri, 24 Aug 2018 14:39:25 +0000 (16:39 +0200)]
move const_eval out of rustc_mir::interpret

to make sure that it does not access private implementation details

5 years agoswitch validation to use operand, not mplace
Ralf Jung [Fri, 24 Aug 2018 13:27:05 +0000 (15:27 +0200)]
switch validation to use operand, not mplace

this means we can get rid of the public allocate_op, and make OpTy only
constructible in librustc_mir

5 years agoterminator/drop.rs is just one fn... merge it together with the other terminator...
Ralf Jung [Fri, 24 Aug 2018 12:44:30 +0000 (14:44 +0200)]
terminator/drop.rs is just one fn... merge it together with the other terminator stuff

5 years agoClean up function calling
Ralf Jung [Fri, 24 Aug 2018 12:40:55 +0000 (14:40 +0200)]
Clean up function calling

Still not as clean as I'd like it, but better

5 years agosimplify const_to_allocation_provider because it is used for statics only
Ralf Jung [Thu, 23 Aug 2018 21:38:47 +0000 (23:38 +0200)]
simplify const_to_allocation_provider because it is used for statics only

5 years agoallow Machine to hook into foreign statics; remove unused HasMemory trait
Ralf Jung [Thu, 23 Aug 2018 19:22:27 +0000 (21:22 +0200)]
allow Machine to hook into foreign statics; remove unused HasMemory trait

5 years agowithout all those copies of constants, we can finally make eval_operand take &self
Ralf Jung [Thu, 23 Aug 2018 17:27:14 +0000 (19:27 +0200)]
without all those copies of constants, we can finally make eval_operand take &self

5 years agoMiri Memory Work
Ralf Jung [Thu, 23 Aug 2018 17:04:33 +0000 (19:04 +0200)]
Miri Memory Work

* Unify the two maps in memory to store the allocation and its kind together.
* Share the handling of statics between CTFE and miri: The miri engine always
  uses "lazy" `AllocType::Static` when encountering a static.  Acessing that
  static invokes CTFE (no matter the machine).  The machine only has any
  influence when writing to a static, which CTFE outright rejects (but miri
  makes a copy-on-write).
* Add an `AllocId` to by-ref consts so miri can use them as operands without
  making copies.
* Move responsibilities around for the `eval_fn_call` machine hook: The hook
  just has to find the MIR (or entirely take care of everything); pushing the
  new stack frame is taken care of by the miri engine.
* Expose the intrinsics and lang items implemented by CTFE so miri does not
  have to reimplement them.

5 years agoAuto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelix
bors [Mon, 27 Aug 2018 14:44:13 +0000 (14:44 +0000)]
Auto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelix

fix NLL ICEs

Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.

Also, use the type-op machinery for implied outlives bounds.

Fixes #53568
Fixes #52992
Fixes #53680

5 years agoadd test for the suggestion from prelude
Douglas Campos [Mon, 27 Aug 2018 14:12:31 +0000 (14:12 +0000)]
add test for the suggestion from prelude

5 years agono need to special case std
Douglas Campos [Mon, 27 Aug 2018 12:36:30 +0000 (12:36 +0000)]
no need to special case std

5 years agoAuto merge of #53656 - nnethercote:HybridIdxSet-tweaks, r=nikomatsakis
bors [Mon, 27 Aug 2018 11:47:03 +0000 (11:47 +0000)]
Auto merge of #53656 - nnethercote:HybridIdxSet-tweaks, r=nikomatsakis

`HybridIdxSet` tweaks

A couple of tweaks to `HybridIdxSet`.

r? @nikomatsakis

5 years agoAlso use smaller spans for unsize adjustments
Matthew Jasper [Mon, 27 Aug 2018 11:36:49 +0000 (12:36 +0100)]
Also use smaller spans for unsize adjustments

5 years agoAuto merge of #53624 - Zoxc:ice-fix, r=oli-obk
bors [Mon, 27 Aug 2018 09:08:27 +0000 (09:08 +0000)]
Auto merge of #53624 - Zoxc:ice-fix, r=oli-obk

Move with_globals setup from run_compiler to run

An alternative to https://github.com/rust-lang/rust/pull/53526

Note this breaks some miri stuff and clippy since they call `run_compiler` directly, and they now need to also call `with_globals ` cc @rust-lang/dev-tools

r? @oli-obk

5 years agoAuto merge of #53648 - japaric:thumb-lld, r=alexcrichton
bors [Mon, 27 Aug 2018 06:30:10 +0000 (06:30 +0000)]
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

5 years agoUpdate clippy
John Kåre Alsaker [Mon, 27 Aug 2018 00:26:09 +0000 (02:26 +0200)]
Update clippy

5 years agoAuto merge of #53640 - alexcrichton:more-symbol-tweaks, r=michaelwoerister
bors [Mon, 27 Aug 2018 01:28:52 +0000 (01:28 +0000)]
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]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238

5 years agoMove with_globals setup from run_compiler to run
John Kåre Alsaker [Thu, 23 Aug 2018 03:05:37 +0000 (05:05 +0200)]
Move with_globals setup from run_compiler to run

5 years agorustc: Continue to tweak "std internal symbols"
Alex Crichton [Thu, 23 Aug 2018 07:33:32 +0000 (00:33 -0700)]
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]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238

5 years agoAuto merge of #53715 - pietroalbini:missing-components-manifest, r=alexcrichton
bors [Sun, 26 Aug 2018 22:49:47 +0000 (22:49 +0000)]
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

5 years agoAuto merge of #53717 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sun, 26 Aug 2018 20:10:43 +0000 (20:10 +0000)]
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

5 years agouse an incremental-fulldeps test instead of a run-make test
Ariel Ben-Yehuda [Sun, 26 Aug 2018 12:13:47 +0000 (15:13 +0300)]
use an incremental-fulldeps test instead of a run-make test

5 years agocreate a valid DefIdTable for proc macro crates
Ariel Ben-Yehuda [Sat, 25 Aug 2018 22:53:48 +0000 (01:53 +0300)]
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.

5 years agoRollup merge of #53706 - ehuss:rustdoc-section-anchor, r=GuillaumeGomez
Guillaume Gomez [Sun, 26 Aug 2018 10:05:27 +0000 (12:05 +0200)]
Rollup merge of #53706 - ehuss:rustdoc-section-anchor, r=GuillaumeGomez

rustdoc: Fix gap on section anchor symbol when hovering.

Fixes #49485 for section headings.

5 years agoRollup merge of #53651 - GuillaumeGomez:struct-keyword, r=QuietMisdreavus
Guillaume Gomez [Sun, 26 Aug 2018 10:05:26 +0000 (12:05 +0200)]
Rollup merge of #53651 - GuillaumeGomez:struct-keyword, r=QuietMisdreavus

Add struct keyword doc

Slowly, one keyword at a time.

r? @QuietMisdreavus

5 years agoRollup merge of #53626 - kzys:hashchange, r=GuillaumeGomez
Guillaume Gomez [Sun, 26 Aug 2018 10:05:25 +0000 (12:05 +0200)]
Rollup merge of #53626 - kzys:hashchange, r=GuillaumeGomez

Automatically expand a section even after page load

Fixes #52774

5 years agoRollup merge of #53428 - RalfJung:libtest-terse, r=KodrAus
Guillaume Gomez [Sun, 26 Aug 2018 10:05:23 +0000 (12:05 +0200)]
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.)

5 years agoRollup merge of #53043 - GuillaumeGomez:improve-unstable-msg-display, r=QuietMisdreavus
Guillaume Gomez [Sun, 26 Aug 2018 10:05:21 +0000 (12:05 +0200)]
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

5 years agoAuto merge of #53629 - nnethercote:lazier-SparseBitMatrix, r=nikomatsakis
bors [Sun, 26 Aug 2018 09:41:28 +0000 (09:41 +0000)]
Auto merge of #53629 - nnethercote:lazier-SparseBitMatrix, r=nikomatsakis

Lazier sparse bit matrix

A small NLL win.

r? @nikomatsakis

5 years agoadd the other two targets to the manifest
Jorge Aparicio [Fri, 24 Aug 2018 18:48:44 +0000 (20:48 +0200)]
add the other two targets to the manifest

5 years agoremove no longer needed Docker images
Jorge Aparicio [Fri, 24 Aug 2018 18:08:22 +0000 (20:08 +0200)]
remove no longer needed Docker images

5 years agofix docker build for the armebv7r-none-eabi target
Jorge Aparicio [Fri, 24 Aug 2018 18:07:56 +0000 (20:07 +0200)]
fix docker build for the armebv7r-none-eabi target

5 years agomore consistent llvm triples
Jorge Aparicio [Fri, 24 Aug 2018 17:34:13 +0000 (19:34 +0200)]
more consistent llvm triples