]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #61005 - michaelwoerister:error-pgo-windows-unwind, r=zackmdavis
bors [Thu, 30 May 2019 03:37:37 +0000 (03:37 +0000)]
Auto merge of #61005 - michaelwoerister:error-pgo-windows-unwind, r=zackmdavis

Emit error when trying to use PGO in conjunction with unwinding on Windows.

This PR makes `rustc` emit an error when trying use PGO in conjunction with `-Cpanic=unwind` on Windows, isn't supported by LLVM yet. The error messages points to https://github.com/rust-lang/rust/issues/61002, which documents this known limitation.

5 years agoAuto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbini
bors [Thu, 30 May 2019 00:38:51 +0000 (00:38 +0000)]
Auto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbini

ci: Attempt to skip a full rustc compile on dist*

Currently when we're preparing cross-compiled compilers it can take
quite some time because we have to build the compiler itself three
different times. The first is the normal bootstrap, the second is a
second build for the build platform, and the third is the actual target
architecture compiler. The second compiler was historically built
exclusively for procedural macros, and long ago we didn't actually need
it.

This commit tries out avoiding that second compiled compiler, meaning we
only compile rustc for the build platform only once. Some local testing
shows that this is promising, but bors is of course the ultimate test!

5 years agoAuto merge of #61203 - memoryruins:bare_trait_objects, r=Centril
bors [Wed, 29 May 2019 21:55:59 +0000 (21:55 +0000)]
Auto merge of #61203 - memoryruins:bare_trait_objects, r=Centril

Warn on bare_trait_objects by default

The `bare_trait_objects` lint is set to `warn` by default.
Most ui tests have been updated to use `dyn` to avoid creating noise in stderr files.

r? @Centril

cc #54910

5 years agoAuto merge of #61317 - oli-obk:rollup-tm5qivq, r=oli-obk
bors [Wed, 29 May 2019 19:10:33 +0000 (19:10 +0000)]
Auto merge of #61317 - oli-obk:rollup-tm5qivq, r=oli-obk

Rollup of 7 pull requests

Successful merges:

 - #60549 (do not print panic message on doctest failures)
 - #60885 (strip synstructure consts from compiler docs)
 - #61217 (Account for short-hand init structs when suggesting conversion)
 - #61261 (is_union returns ty to avoid computing it twice)
 - #61293 (Print const generics properly in rustdoc)
 - #61310 (split libcore::mem into multiple files)
 - #61313 (Simplify Set1::insert)

Failed merges:

r? @ghost

5 years agoRollup merge of #61313 - Centril:simplify-set1-insert, r=varkor
Oliver Scherer [Wed, 29 May 2019 12:41:13 +0000 (14:41 +0200)]
Rollup merge of #61313 - Centril:simplify-set1-insert, r=varkor

Simplify Set1::insert

r? @varkor

5 years agoRollup merge of #61310 - RalfJung:mem, r=Centril
Oliver Scherer [Wed, 29 May 2019 12:41:09 +0000 (14:41 +0200)]
Rollup merge of #61310 - RalfJung:mem, r=Centril

split libcore::mem into multiple files

r? @Centril

5 years agoRollup merge of #61293 - varkor:rustdoc-print-const-generic, r=GuillaumeGomez
Oliver Scherer [Wed, 29 May 2019 12:41:08 +0000 (14:41 +0200)]
Rollup merge of #61293 - varkor:rustdoc-print-const-generic, r=GuillaumeGomez

Print const generics properly in rustdoc

Now that https://github.com/rust-lang/rust/pull/59276 is merged, we can print consts properly in rustdoc.

Fixes https://github.com/rust-lang/rust/issues/60737.
Fixes https://github.com/rust-lang/rust/issues/61257.

r? @GuillaumeGomez

5 years agoRollup merge of #61261 - spastorino:is-union-return-ty, r=oli-obk
Oliver Scherer [Wed, 29 May 2019 12:41:06 +0000 (14:41 +0200)]
Rollup merge of #61261 - spastorino:is-union-return-ty, r=oli-obk

is_union returns ty to avoid computing it twice

r? @oli-obk

5 years agoRollup merge of #61217 - estebank:issue-52820, r=Centril
Oliver Scherer [Wed, 29 May 2019 12:41:05 +0000 (14:41 +0200)]
Rollup merge of #61217 - estebank:issue-52820, r=Centril

Account for short-hand init structs when suggesting conversion

Fix #52820.

5 years agoRollup merge of #60885 - euclio:strip-synstructure-consts, r=GuillaumeGomez
Oliver Scherer [Wed, 29 May 2019 12:41:03 +0000 (14:41 +0200)]
Rollup merge of #60885 - euclio:strip-synstructure-consts, r=GuillaumeGomez

strip synstructure consts from compiler docs

Fixes #60150.

Unfortunately this PR depends on the use of the deprecated `--passes` flag in bootstrap to keep the `--strip-hidden` pass while still documenting private items. I've opened #60884 to track stabilization of a new flag that encapsulates this behavior.

r? @QuietMisdreavus

5 years agoRollup merge of #60549 - euclio:doctest-panic-messages, r=GuillaumeGomez
Oliver Scherer [Wed, 29 May 2019 12:41:01 +0000 (14:41 +0200)]
Rollup merge of #60549 - euclio:doctest-panic-messages, r=GuillaumeGomez

do not print panic message on doctest failures

This PR cleans up rustdoc test output by silently unwinding on failure instead of using `panic!`. It also improves the clarity and consistency of the output on test failure, and adds test cases for failure modes that were previously untested.

5 years agoMake run-make PGO tests work on MSVC.
Michael Woerister [Wed, 29 May 2019 12:32:38 +0000 (14:32 +0200)]
Make run-make PGO tests work on MSVC.

5 years agobless you
Ralf Jung [Wed, 29 May 2019 10:28:45 +0000 (12:28 +0200)]
bless you

5 years agoSimplify Set1::insert.
Mazdak Farrokhzad [Wed, 29 May 2019 10:12:09 +0000 (12:12 +0200)]
Simplify Set1::insert.

5 years agosplit libcore::mem into multiple files
Ralf Jung [Wed, 29 May 2019 08:00:13 +0000 (10:00 +0200)]
split libcore::mem into multiple files

5 years agoAuto merge of #61305 - Centril:rollup-t39m00m, r=Centril
bors [Wed, 29 May 2019 07:50:16 +0000 (07:50 +0000)]
Auto merge of #61305 - Centril:rollup-t39m00m, r=Centril

Rollup of 11 pull requests

Successful merges:

 - #58975 (Implement `iter::Sum` and `iter::Product` for `Option`)
 - #60542 (Add Step::sub_usize)
 - #60555 (Implement nth_back for RChunks(Exact)(Mut))
 - #60766 (Weak::into_raw)
 - #61048 (Feature/nth back chunks)
 - #61191 (librustc_errors: Move annotation collection to own impl)
 - #61235 (Stabilize bufreader_buffer feature)
 - #61249 (Rename Place::local to Place::local_or_deref_local)
 - #61291 (Avoid unneeded bug!() call)
 - #61294 (Rename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.)
 - #61297 (Remove LLVM instruction stats and other (obsolete) codegen stats.)

Failed merges:

r? @ghost

5 years agoRollup merge of #61297 - eddyb:forsaken-stats, r=nagisa
Mazdak Farrokhzad [Wed, 29 May 2019 06:16:06 +0000 (08:16 +0200)]
Rollup merge of #61297 - eddyb:forsaken-stats, r=nagisa

Remove LLVM instruction stats and other (obsolete) codegen stats.

Both `-Z count_llvm_insns` and `-Z codegen-stats` are removed, as (AFAIK) they have been of little use in the last few years, especially after the transition to MIR->LLVM codegen.

Other than for the LLVM instruction counts, `-Z codegen-stats` has long been obsoleted anyway.

r? @nagisa cc @rust-lang/compiler

5 years agoRollup merge of #61294 - eddyb:no-trait-nor-impl, r=varkor
Mazdak Farrokhzad [Wed, 29 May 2019 06:16:04 +0000 (08:16 +0200)]
Rollup merge of #61294 - eddyb:no-trait-nor-impl, r=varkor

Rename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.

5 years agoRollup merge of #61291 - spastorino:avoid-unneeded-bug-call, r=estebank
Mazdak Farrokhzad [Wed, 29 May 2019 06:16:02 +0000 (08:16 +0200)]
Rollup merge of #61291 - spastorino:avoid-unneeded-bug-call, r=estebank

Avoid unneeded bug!() call

r? @oli-obk

5 years agoRollup merge of #61249 - spastorino:local-or-deref-local, r=oli-obk,Centril
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:59 +0000 (08:15 +0200)]
Rollup merge of #61249 - spastorino:local-or-deref-local, r=oli-obk,Centril

Rename Place::local to Place::local_or_deref_local

r? @oli-obk

5 years agoRollup merge of #61235 - lzutao:stabilize-bufreader_buffer, r=Centril
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:58 +0000 (08:15 +0200)]
Rollup merge of #61235 - lzutao:stabilize-bufreader_buffer, r=Centril

Stabilize bufreader_buffer feature

FCP done in https://github.com/rust-lang/rust/issues/45323#issuecomment-495937047

Closes #45323

r? @SimonSapin

5 years agoRollup merge of #61191 - phansch:annotate_snippet_refactorings1, r=estebank
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:56 +0000 (08:15 +0200)]
Rollup merge of #61191 - phansch:annotate_snippet_refactorings1, r=estebank

librustc_errors: Move annotation collection to own impl

Extracted from work on #59346. This moves the annotation collection to
the `FileWithAnnotatedLines` impl to allow easier re-use in a separate
EmitterWriter. Even without that new EmitterWriter present, I think it makes
sense to have this as an associated function.

5 years agoRollup merge of #61048 - wizAmit:feature/nth_back_chunks, r=scottmcm
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:55 +0000 (08:15 +0200)]
Rollup merge of #61048 - wizAmit:feature/nth_back_chunks, r=scottmcm

Feature/nth back chunks

A succinct implementation for nth_back on chunks. Thank you @timvermeulen for the guidance.

r? @timvermeulen

5 years agoRollup merge of #60766 - vorner:weak-into-raw, r=sfackler
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:53 +0000 (08:15 +0200)]
Rollup merge of #60766 - vorner:weak-into-raw, r=sfackler

Weak::into_raw

Hello

This is my first shot at #60728. I'd like to consult it a bit before moving further.

The biggest question I have is if this API makes sense. My motivation for it is to be able to store the `Weak` in `AtomicPtr`. For that I don't actually need for the pointer to point to the `T`, any pointer (maybe casted to `usize`) would be good enough, but this mirrors what `Arc` does and could be useful for other things too (like comparing if Arc and Weak point to the same thing without playing with the counts), while some opaque pointer wouldn't.

Some secondary questions, if this is deemed desirable are:
* The weak pointer may be dangling if it is created by `Weak::new()`. It would make sense to treat this as NULL, but that is incompatible with `T: ?Sized` ‒ both `new()` and `ptr::null()` are available only for sized types. The current implementation is therefore also available only for sized `T`s. It would be possible to allow `?Sized` if the API would be `fn into_raw(self) -> Option<NonNull<T>>` and `fn from_raw(NonNull<T>)`, but that's different API than `Arc` has. What would be preferred?
* There's a FIXME in my code about what I suspect could be UB. Is it really UB & how to get the pointer correctly? Is manual offsetting of the pointer the only way?
* Am I missing some other necessary thing around the feature gates and such?
* Is the documentation understandable? I know writing docs is not my strongest skill :-|.

Thinks I'd like to do as part of the PR, but are not yet done:
* Turn the referenced issue into tracking issue for the feature flag.
* Once the `sync::Weak` is considered reasonable, I'd do the equivalent for `rc::Weak`.
* This might call for few more tests than what is currently part of the documentation.

5 years agoRollup merge of #60555 - timvermeulen:rchunks_nth_back, r=scottmcm
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:51 +0000 (08:15 +0200)]
Rollup merge of #60555 - timvermeulen:rchunks_nth_back, r=scottmcm

Implement nth_back for RChunks(Exact)(Mut)

Part of #54054.

These implementations may not be optimal because of the use of `self.len()`, but it's quite cheap and simplifies the code a lot.

There's quite some duplication going on here, I wouldn't mind cleaning this up later. A good next step would probably be to add private `split_off_up_to`/`split_off_from` helper methods for slices since their behavior is commonly useful throughout the `Chunks` types.

r? @scottmcm

5 years agoRollup merge of #60542 - timvermeulen:step_sub_usize, r=scottmcm
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:49 +0000 (08:15 +0200)]
Rollup merge of #60542 - timvermeulen:step_sub_usize, r=scottmcm

Add Step::sub_usize

Required for #54054.

I'm aware that the `Step` trait needs a rework, but this still seems like a reasonable addition?

This currently doesn't compile because Chalk contains a type that implement this trait, and this is a breaking change. How can that be fixed?

5 years agoRollup merge of #58975 - jtdowney:iter_arith_traits_option, r=dtolnay
Mazdak Farrokhzad [Wed, 29 May 2019 06:15:48 +0000 (08:15 +0200)]
Rollup merge of #58975 - jtdowney:iter_arith_traits_option, r=dtolnay

Implement `iter::Sum` and `iter::Product` for `Option`

This is similar to the existing implementation for `Result`. It will take each item into the accumulator unless a `None` is returned.

I based a lot of this on #38580. From that discussion it didn't seem like this addition would be too controversial or difficult. One thing I still don't understand is picking the values for the `stable` attribute. This is my first non-documentation PR for rust so I am open to any feedback on improvements.

5 years agoUpdate libstd doctests to use dyn
memoryruins [Tue, 28 May 2019 18:48:04 +0000 (14:48 -0400)]
Update libstd doctests to use dyn

5 years agoUpdate the rest of the test suites to use dyn
memoryruins [Tue, 28 May 2019 18:47:46 +0000 (14:47 -0400)]
Update the rest of the test suites to use dyn

5 years agoUpdate run-pass test suite to use dyn
memoryruins [Tue, 28 May 2019 18:47:21 +0000 (14:47 -0400)]
Update run-pass test suite to use dyn

5 years agoUpdate ui test suite to use dyn
memoryruins [Tue, 28 May 2019 18:46:13 +0000 (14:46 -0400)]
Update ui test suite to use dyn

5 years agoAuto merge of #61296 - Centril:rollup-5ad68b0, r=Centril
bors [Tue, 28 May 2019 23:07:19 +0000 (23:07 +0000)]
Auto merge of #61296 - Centril:rollup-5ad68b0, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #60742 (Allow const parameters in array sizes to be unified)
 - #60756 (Add better tests for hidden lifetimes in impl trait)
 - #60928 (Changes the type `mir::Mir` into `mir::Body`)
 - #61024 (tests: Centralize proc macros commonly used for testing)
 - #61157 (BufReader: In Seek impl, remove extra discard_buffer call)
 - #61195 (Special-case `.llvm` in mangler)
 - #61202 (Print PermissionExt::mode() in octal in Documentation Examples)
 - #61259 (Mailmap fixes)
 - #61273 (mention that MaybeUninit is a bit like Option)

Failed merges:

r? @ghost

5 years agoBump Sum and Product for Option<T> to 1.37
David Tolnay [Tue, 28 May 2019 23:00:39 +0000 (16:00 -0700)]
Bump Sum and Product for Option<T> to 1.37

5 years agorustc_codegen_llvm: rename away the last occurrence of `insn`.
Eduard-Mihai Burtescu [Tue, 28 May 2019 22:22:37 +0000 (01:22 +0300)]
rustc_codegen_llvm: rename away the last occurrence of `insn`.

5 years agorustc_codegen_llvm: remove LLVM instruction count stats.
Eduard-Mihai Burtescu [Tue, 28 May 2019 22:21:27 +0000 (01:21 +0300)]
rustc_codegen_llvm: remove LLVM instruction count stats.

5 years agoRollup merge of #61273 - RalfJung:maybe-uninit, r=Centril
Mazdak Farrokhzad [Tue, 28 May 2019 22:20:06 +0000 (00:20 +0200)]
Rollup merge of #61273 - RalfJung:maybe-uninit, r=Centril

mention that MaybeUninit is a bit like Option

5 years agoRollup merge of #61259 - JosephTLyons:mailmap-fixes, r=nikomatsakis
Mazdak Farrokhzad [Tue, 28 May 2019 22:20:04 +0000 (00:20 +0200)]
Rollup merge of #61259 - JosephTLyons:mailmap-fixes, r=nikomatsakis

Mailmap fixes

I've made a few fixes and additions to the .mailmap file.

- I've added my information to it, as I noticed it was popping up twice at the [Thanks](https://thanks.rust-lang.org/rust/all-time/) website (I've made contributions to the Rust Book).
- I noticed that @carols10cents‘ information was popping up in multiple places at the [Thanks](https://thanks.rust-lang.org/rust/all-time/) website and when running `git shortlog -s -e > out.txt`, and fixed her information
- I alphabetized the list using Atom's [Sort Lines package](https://github.com/atom/sort-lines)

The output from before and after running `git shortlog -s -e > out.txt` for Carol:
<img width="708" alt="Carol Before" src="https://user-images.githubusercontent.com/19867440/58472843-2d8ca880-8115-11e9-9624-d31ed23ae9b5.png">
<img width="523" alt="Carol After" src="https://user-images.githubusercontent.com/19867440/58472844-2d8ca880-8115-11e9-95c6-80b17cc04790.png">

The output from before and after running `git shortlog -s -e > out.txt` for myself:

<img width="489" alt="Joseph After" src="https://user-images.githubusercontent.com/19867440/58472941-6e84bd00-8115-11e9-8266-1d7fcd53d0bc.png">
<img width="421" alt="Joseph Before" src="https://user-images.githubusercontent.com/19867440/58472943-6e84bd00-8115-11e9-9fd2-d7ace7e3d636.png">

5 years agoRollup merge of #61202 - oberien:permissionext-print-octal, r=varkor
Mazdak Farrokhzad [Tue, 28 May 2019 22:20:01 +0000 (00:20 +0200)]
Rollup merge of #61202 - oberien:permissionext-print-octal, r=varkor

Print PermissionExt::mode() in octal in Documentation Examples

Printing the file permission mode on unix systems in decimal feels unintuitive. Printing it in octal gives the expected form of e.g. `664`.

5 years agoRollup merge of #61195 - davidtwco:seg-fault-mangler, r=eddyb
Mazdak Farrokhzad [Tue, 28 May 2019 22:20:00 +0000 (00:20 +0200)]
Rollup merge of #61195 - davidtwco:seg-fault-mangler, r=eddyb

Special-case `.llvm` in mangler

Fixes #60925 and fixes #53912.

r? @michaelwoerister
cc @eddyb

5 years agoRollup merge of #61157 - czipperz:BufReader-Seek-remove-extra-discard_buffer, r=nikom...
Mazdak Farrokhzad [Tue, 28 May 2019 22:19:58 +0000 (00:19 +0200)]
Rollup merge of #61157 - czipperz:BufReader-Seek-remove-extra-discard_buffer, r=nikomatsakis

BufReader: In Seek impl, remove extra discard_buffer call

As far as I can tell, this code does nothing.  I'm not sure why it even is there.

5 years agoRollup merge of #61024 - petrochenkov:proctest, r=nikomatsakis
Mazdak Farrokhzad [Tue, 28 May 2019 22:19:57 +0000 (00:19 +0200)]
Rollup merge of #61024 - petrochenkov:proctest, r=nikomatsakis

tests: Centralize proc macros commonly used for testing

Many proc macros in `ui\proc-macro\auxiliary` were doing same things.
(I added a fair share of those myself.)

Now commonly used macros (empty, identity, etc) are collected in one place - `ui\proc-macro\auxiliary\test-macros.rs`.

5 years agoRollup merge of #60928 - TheSirC:fix/60229, r=eddyb
Mazdak Farrokhzad [Tue, 28 May 2019 22:19:55 +0000 (00:19 +0200)]
Rollup merge of #60928 - TheSirC:fix/60229, r=eddyb

Changes the type `mir::Mir` into `mir::Body`

Fixes part 1 of #60229 (previously attempted in #60242).

I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date.

The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.

5 years agoRollup merge of #60756 - matthewjasper:extra-impl-trait-tests, r=nikomatsakis
Mazdak Farrokhzad [Tue, 28 May 2019 22:19:53 +0000 (00:19 +0200)]
Rollup merge of #60756 - matthewjasper:extra-impl-trait-tests, r=nikomatsakis

Add better tests for hidden lifetimes in impl trait

cc #60670

5 years agoRollup merge of #60742 - varkor:fn-const-array-parameter, r=eddyb
Mazdak Farrokhzad [Tue, 28 May 2019 22:19:52 +0000 (00:19 +0200)]
Rollup merge of #60742 - varkor:fn-const-array-parameter, r=eddyb

Allow const parameters in array sizes to be unified

Fixes https://github.com/rust-lang/rust/issues/60632.
Fixes https://github.com/rust-lang/rust/issues/60744.
Fixes https://github.com/rust-lang/rust/pull/60923.
(The last commit should probably be viewed in isolation, as it just renames things from `type` to `kind`.)

r? @eddyb

5 years agorustc_codegen_ssa: remove obsolete codegen stats.
Eduard-Mihai Burtescu [Tue, 28 May 2019 22:01:32 +0000 (01:01 +0300)]
rustc_codegen_ssa: remove obsolete codegen stats.

5 years agoAdd a regression test for unevaluated const in rustdoc
varkor [Tue, 28 May 2019 21:53:48 +0000 (22:53 +0100)]
Add a regression test for unevaluated const in rustdoc

5 years agoAdd a const-generics folder to rustdoc tests
varkor [Tue, 28 May 2019 21:53:36 +0000 (22:53 +0100)]
Add a const-generics folder to rustdoc tests

5 years agoUse proper const printing in rustdoc
varkor [Tue, 28 May 2019 21:53:16 +0000 (22:53 +0100)]
Use proper const printing in rustdoc

5 years agoRename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.
Eduard-Mihai Burtescu [Tue, 28 May 2019 21:35:14 +0000 (00:35 +0300)]
Rename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.

5 years agosyntax: bail out of `find_width_of_character_at_span` if the span doesn't start and...
Eduard-Mihai Burtescu [Tue, 28 May 2019 21:27:42 +0000 (00:27 +0300)]
syntax: bail out of `find_width_of_character_at_span` if the span doesn't start and end in the same file.

5 years agorustc: rename Mir to mir::Body in comments and to MIR in error strings.
Eduard-Mihai Burtescu [Tue, 28 May 2019 21:26:56 +0000 (00:26 +0300)]
rustc: rename Mir to mir::Body in comments and to MIR in error strings.

5 years agoAvoid unneeded bug!() call
Santiago Pastorino [Tue, 28 May 2019 20:46:48 +0000 (22:46 +0200)]
Avoid unneeded bug!() call

5 years agoUse assert_eq! instead of println! in tests
varkor [Tue, 28 May 2019 20:34:18 +0000 (21:34 +0100)]
Use assert_eq! instead of println! in tests

5 years agoFix nits
varkor [Tue, 28 May 2019 19:25:21 +0000 (20:25 +0100)]
Fix nits

5 years agoMake sure array length diagnostic doesn't regress
varkor [Mon, 27 May 2019 13:30:16 +0000 (14:30 +0100)]
Make sure array length diagnostic doesn't regress

5 years agoCorrect pluralisation of tuple/array/associated type binding mismatch errors
varkor [Mon, 27 May 2019 13:28:20 +0000 (14:28 +0100)]
Correct pluralisation of tuple/array/associated type binding mismatch errors

5 years agoReintroduce `TypeError::FixedArraySize`
varkor [Mon, 27 May 2019 13:05:29 +0000 (14:05 +0100)]
Reintroduce `TypeError::FixedArraySize`

5 years agoUse Display rather than Debug printing for const mismatch
varkor [Sat, 25 May 2019 20:00:29 +0000 (21:00 +0100)]
Use Display rather than Debug printing for const mismatch

5 years agoUpdate tests after pretty printing
varkor [Sat, 25 May 2019 19:42:14 +0000 (20:42 +0100)]
Update tests after pretty printing

5 years agoFix test after rebase
varkor [Tue, 21 May 2019 09:14:44 +0000 (10:14 +0100)]
Fix test after rebase

5 years agoAdd broken MIR regression tests
varkor [Mon, 20 May 2019 22:03:38 +0000 (23:03 +0100)]
Add broken MIR regression tests

5 years agoRemove FixedArraySize error
varkor [Mon, 13 May 2019 20:24:00 +0000 (21:24 +0100)]
Remove FixedArraySize error

5 years agoEagerly evaluate in `super_relate_consts`
varkor [Mon, 13 May 2019 20:15:08 +0000 (21:15 +0100)]
Eagerly evaluate in `super_relate_consts`

5 years agoUpdate test output
varkor [Sun, 12 May 2019 21:28:26 +0000 (22:28 +0100)]
Update test output

5 years agoRename `OpportunisticTypeResolver` to `OpportunisticVarResolver`
varkor [Sat, 11 May 2019 18:08:26 +0000 (19:08 +0100)]
Rename `OpportunisticTypeResolver` to `OpportunisticVarResolver`

5 years agoAdd tests for uninferred consts during codegen
varkor [Sat, 11 May 2019 17:58:15 +0000 (18:58 +0100)]
Add tests for uninferred consts during codegen

5 years agoResolve consts in OpportunisticTypeResolver
varkor [Sat, 11 May 2019 17:54:14 +0000 (18:54 +0100)]
Resolve consts in OpportunisticTypeResolver

5 years agoAdd a test for a function taking a const param array as an argument
varkor [Sat, 11 May 2019 17:02:05 +0000 (18:02 +0100)]
Add a test for a function taking a const param array as an argument

5 years agoRelate identical parameters in array lengths
varkor [Sat, 11 May 2019 17:01:50 +0000 (18:01 +0100)]
Relate identical parameters in array lengths

5 years agoSpecial-case `.llvm` in mangler to fix segfaults
David Wood [Sat, 25 May 2019 21:29:18 +0000 (22:29 +0100)]
Special-case `.llvm` in mangler to fix segfaults

This commit special cases `.llvm` in the mangler to print `.llvm$6d$`
instead. This will avoid segfaults when names in a user's Rust code are
`llvm`.

5 years agoFixup style
Alex Crichton [Tue, 28 May 2019 18:56:05 +0000 (11:56 -0700)]
Fixup style

5 years agorustbuild: Assert extended builds don't dist too much
Alex Crichton [Tue, 28 May 2019 18:50:05 +0000 (11:50 -0700)]
rustbuild: Assert extended builds don't dist too much

This extends a test in the previous commit to assert that we don't build
extra rustc compilers even when the "extended" option is set to true.
This involved some internal refactoring to have more judicious usage of
`compiler_for`, added in the previous commit, as well.

Various `dist::*` targets were refactored to be parameterized with a
`Compiler` instead of a `stage`/`host`, and then the various parameters
within the `Extended` target were tweaked to ensure that we don't ever
accidentally ask for a stage2 build compiler when we're distributing
something.

5 years agoUpdate test/ui/parser for bare_trait_object warnings
memoryruins [Tue, 28 May 2019 18:45:27 +0000 (14:45 -0400)]
Update test/ui/parser for bare_trait_object warnings

5 years agoSet bare_trait_objects lint to warn
memoryruins [Tue, 28 May 2019 18:42:14 +0000 (14:42 -0400)]
Set bare_trait_objects lint to warn

5 years agorustbuild: Tweak how stage1 compilers are selected
Alex Crichton [Tue, 28 May 2019 17:00:53 +0000 (10:00 -0700)]
rustbuild: Tweak how stage1 compilers are selected

This commit furthers the previous one to ensure that we don't build an
extra stage of the compiler in CI. A test has been added to rustbuild to
ensure that this doesn't regress, and then in debugging this test it was
hunted down that the `dist::Std` target was the one erroneously pulling
in the wrong compiler.

The `dist::Std` step was updated to instead account for the "full
bootstrap" or not flag, ensuring that the correct compiler for compiling
the final standard library was used. This was another use of the
`force_use_stage1` function which was in theory supposed to be pretty
central, so existing users were all evaluated and a new function,
`Builder::compiler_for`, was introduced. All existing users of
`force_use_stage1` have been updated to use `compiler_for`, where the
semantics of `compiler_for` are similar to that of `compiler` except
that it doesn't guarantee the presence of a sysroot for the arguments
passed (as they may be modified).

Perhaps one day we can unify `compiler` and `compiler_for`, but the
usage of `Builder::compiler` is so ubiquitous it would take quite some
time to evaluate whether each one needs the sysroot or not, so it's
hoped that can be done in parallel.

5 years agoAuto merge of #61274 - Centril:rollup-23dekk4, r=Centril
bors [Tue, 28 May 2019 17:38:01 +0000 (17:38 +0000)]
Auto merge of #61274 - Centril:rollup-23dekk4, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #61123 (Allow to specify profiling data output directory as -Zself-profile argument.)
 - #61159 (split core::ptr module into multiple files)
 - #61164 (rename Scalar::Bits to Scalar::Raw and bits field to data)
 - #61250 (Remove special case for *ios* builds in run-make-fulldeps/print-target-list Makefile)

Failed merges:

r? @ghost

5 years agoChanges the type `mir::Mir` into `mir::Body`
Claude-Alban RANÉLY-VERGÉ-DÉPRÉ [Fri, 17 May 2019 21:55:04 +0000 (23:55 +0200)]
Changes the type `mir::Mir` into `mir::Body`

The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.

Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`

Fixing the missing import on `AggregateKind`

5 years agoRename Place::local to Place::local_or_deref_local
Santiago Pastorino [Mon, 27 May 2019 21:37:18 +0000 (23:37 +0200)]
Rename Place::local to Place::local_or_deref_local

5 years agoUse closure to avoid self.describe_place(...).unwrap_or_else(...) repetition
Santiago Pastorino [Tue, 28 May 2019 14:47:59 +0000 (16:47 +0200)]
Use closure to avoid self.describe_place(...).unwrap_or_else(...) repetition

5 years agois_union returns ty to avoid computing it twice
Santiago Pastorino [Tue, 28 May 2019 13:18:37 +0000 (15:18 +0200)]
is_union returns ty to avoid computing it twice

5 years agoUpdate src/libcore/mem.rs
Ralf Jung [Tue, 28 May 2019 16:20:24 +0000 (18:20 +0200)]
Update src/libcore/mem.rs

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
5 years agoRollup merge of #61250 - rye:print-target-list--rm-ios-case, r=alexcrichton
Mazdak Farrokhzad [Tue, 28 May 2019 16:15:41 +0000 (18:15 +0200)]
Rollup merge of #61250 - rye:print-target-list--rm-ios-case, r=alexcrichton

Remove special case for *ios* builds in run-make-fulldeps/print-target-list Makefile

Previous `TODO` comment in this file mentions [an issue that was closed](https://github.com/rust-lang/rust/issues/29812), and I was able to confirm locally that provided code in that issue no longer produces an ICE. Discussion on that issue seems to indicate this code was no longer needed as of 1.12.0.

I removed the `*ios*` branch from this `case` statement as it may cause confusion, then removed the case statement entirely as it only had a wildcard branch.

5 years agoRollup merge of #61164 - RalfJung:scalar, r=oli-obk
Mazdak Farrokhzad [Tue, 28 May 2019 16:15:39 +0000 (18:15 +0200)]
Rollup merge of #61164 - RalfJung:scalar, r=oli-obk

rename Scalar::Bits to Scalar::Raw and bits field to data

Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor).

r? @oli-obk

5 years agoRollup merge of #61159 - RalfJung:ptr, r=alexcrichton
Mazdak Farrokhzad [Tue, 28 May 2019 16:15:38 +0000 (18:15 +0200)]
Rollup merge of #61159 - RalfJung:ptr, r=alexcrichton

split core::ptr module into multiple files

Cc @Centril

5 years agoRollup merge of #61123 - michaelwoerister:self-profile-dir, r=wesleywiser
Mazdak Farrokhzad [Tue, 28 May 2019 16:15:35 +0000 (18:15 +0200)]
Rollup merge of #61123 - michaelwoerister:self-profile-dir, r=wesleywiser

Allow to specify profiling data output directory as -Zself-profile argument.

The PR also makes `rustc` include the crate-name (if already available) in the output file name.

r? @wesleywiser

At some point we should add some basic tests for `-Zself-profile`.

5 years agomention that MaybeUninit is a bit like Option
Ralf Jung [Tue, 28 May 2019 16:04:37 +0000 (18:04 +0200)]
mention that MaybeUninit is a bit like Option

5 years agoAuto merge of #61246 - oli-obk:clippy, r=oli-obk
bors [Tue, 28 May 2019 14:42:27 +0000 (14:42 +0000)]
Auto merge of #61246 - oli-obk:clippy, r=oli-obk

Update clippy submodule

fixes #61240

5 years agoRename PgoGenerate to something more general.
Michael Woerister [Tue, 28 May 2019 14:13:59 +0000 (16:13 +0200)]
Rename PgoGenerate to something more general.

5 years agoAllow to specify profiling data output directory as -Zself-profile argument.
Michael Woerister [Fri, 24 May 2019 14:36:44 +0000 (16:36 +0200)]
Allow to specify profiling data output directory as -Zself-profile argument.

5 years agoMake test/codegen/pgo-instrumentation.rs work reliably on Windows.
Michael Woerister [Wed, 22 May 2019 08:35:14 +0000 (10:35 +0200)]
Make test/codegen/pgo-instrumentation.rs work reliably on Windows.

5 years agoEmit error when trying to use PGO in conjunction with unwinding on Windows.
Michael Woerister [Tue, 21 May 2019 10:11:23 +0000 (12:11 +0200)]
Emit error when trying to use PGO in conjunction with unwinding on Windows.

5 years agoAuto merge of #61258 - Centril:rollup-l2mof9t, r=Centril
bors [Tue, 28 May 2019 11:50:14 +0000 (11:50 +0000)]
Auto merge of #61258 - Centril:rollup-l2mof9t, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #61084 (Clarify docs for unreachable! macro)
 - #61220 (Added error message for E0284)
 - #61227 (Use .await syntax instead of await!)
 - #61230 (avoid creating Boxes of uninitalized values in RawVec)
 - #61237 (Updated the Iterator docs with information about overriding methods.)
 - #61241 (Check place iterative)
 - #61242 (Make dest_needs_borrow iterate instead of recurse)
 - #61247 (Make eval_place iterate instead of recurse)
 - #61248 (Use Place::local)

Failed merges:

r? @ghost

5 years agoAlphabetized lines with Atom's Sort Lines package
Joseph Lyons [Tue, 28 May 2019 10:42:47 +0000 (06:42 -0400)]
Alphabetized lines with Atom's Sort Lines package

https://github.com/atom/sort-lines

5 years agoAdding mailmap for myself
Joseph Lyons [Tue, 28 May 2019 10:40:41 +0000 (06:40 -0400)]
Adding mailmap for myself

5 years agoFixing mailmap for Carol
Joseph Lyons [Tue, 28 May 2019 10:40:16 +0000 (06:40 -0400)]
Fixing mailmap for Carol

5 years agoUpdate clippy submodule
Oliver Scherer [Mon, 27 May 2019 20:49:37 +0000 (22:49 +0200)]
Update clippy submodule

5 years agoRollup merge of #61248 - spastorino:use-place-local-fn, r=oli-obk
Mazdak Farrokhzad [Tue, 28 May 2019 09:49:09 +0000 (11:49 +0200)]
Rollup merge of #61248 - spastorino:use-place-local-fn, r=oli-obk

Use Place::local

r? @oli-obk

5 years agoRollup merge of #61247 - spastorino:eval-place-iterate, r=wesleywiser
Mazdak Farrokhzad [Tue, 28 May 2019 09:49:08 +0000 (11:49 +0200)]
Rollup merge of #61247 - spastorino:eval-place-iterate, r=wesleywiser

Make eval_place iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61242 - spastorino:dest-needs-borrow-iterate, r=oli-obk
Mazdak Farrokhzad [Tue, 28 May 2019 09:49:04 +0000 (11:49 +0200)]
Rollup merge of #61242 - spastorino:dest-needs-borrow-iterate, r=oli-obk

Make dest_needs_borrow iterate instead of recurse

r? @oli-obk

5 years agoRollup merge of #61241 - spastorino:check-place-iterative, r=oli-obk
Mazdak Farrokhzad [Tue, 28 May 2019 09:49:02 +0000 (11:49 +0200)]
Rollup merge of #61241 - spastorino:check-place-iterative, r=oli-obk

Check place iterative

r? @oli-obk