]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #62949 - mati865:patch-1, r=alexcrichton
Mazdak Farrokhzad [Sun, 28 Jul 2019 01:01:50 +0000 (03:01 +0200)]
Rollup merge of #62949 - mati865:patch-1, r=alexcrichton

Re-enable assertions in PPC dist builder

Fixes https://github.com/rust-lang/rust/issues/36150

Log of successful build:
https://dev.azure.com/mati865/6518b167-4cf6-4587-b3d1-8e137f2fb2e4/_apis/build/builds/23/logs/825

4 years agoRollup merge of #62883 - Stargateur:refactoring-adapters, r=scottmcm
Mazdak Farrokhzad [Sun, 28 Jul 2019 01:01:48 +0000 (03:01 +0200)]
Rollup merge of #62883 - Stargateur:refactoring-adapters, r=scottmcm

Refactoring use common code between option, result and accum

`Option` and `Result` have almost exactly the same code that in `accum.rs` that implement `Sum` and `Product`. This PR just move some code to use the same code for all of them. I believe is better to not implement this `Iterator` feature twice.

I'm not very familiar with pub visibility hope I didn't make then public. However, maybe these adapters could be useful and we could think to make then pub.

#59605
#11084

r? @pnkfelix

4 years agoRollup merge of #62771 - petrochenkov:depext, r=eddyb
Mazdak Farrokhzad [Sun, 28 Jul 2019 01:01:46 +0000 (03:01 +0200)]
Rollup merge of #62771 - petrochenkov:depext, r=eddyb

Break dependencies between `syntax_ext` and other crates

Move `source_util` macros into `syntax_ext`.
Move other early code generation facilities like standard library injection into `syntax_ext`.

The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything.

Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`.

r? @eddyb

4 years agoRollup merge of #62074 - wizAmit:feature/mut_chunks_nth_back, r=scottmcm
Mazdak Farrokhzad [Sun, 28 Jul 2019 01:01:44 +0000 (03:01 +0200)]
Rollup merge of #62074 - wizAmit:feature/mut_chunks_nth_back, r=scottmcm

squash of all commits for nth_back on ChunksMut

wip nth_back for chunks_mut

working chunksmut

fixed nth_back for chunksmut

Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
r? @timvermeulen
r? @scottmcm

4 years agoRollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
Mazdak Farrokhzad [Sun, 28 Jul 2019 01:01:42 +0000 (03:01 +0200)]
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril

Allow lifetime elision in `Pin<&(mut) Self>`

This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it

Replaces #60944

Closes #52675

r? @eddyb
cc @cramertj @Centril @withoutboats @scottmcm

4 years agoAuto merge of #63029 - petrochenkov:rpass, r=Centril
bors [Sat, 27 Jul 2019 19:27:36 +0000 (19:27 +0000)]
Auto merge of #63029 - petrochenkov:rpass, r=Centril

Move run-pass tests to ui

This is the second attempt at doing https://github.com/rust-lang/rust/pull/53994 (which was previously reverted in https://github.com/rust-lang/rust/pull/54530).

The issue with inability to run the test suite in a faster way (https://github.com/rust-lang/rust/issues/54047) that motivated the revert was recently addressed by https://github.com/rust-lang/rust/pull/61755.

r? @Centril

4 years agoFix issues with git converting CRLF to CR
Vadim Petrochenkov [Sat, 27 Jul 2019 10:47:26 +0000 (13:47 +0300)]
Fix issues with git converting CRLF to CR

UI tests now run on asmjs-unknown-emscripten, ignore tests with inline assembly which is not supported on emscripten targets

4 years agoRemove run-pass test suites
Vadim Petrochenkov [Fri, 26 Jul 2019 23:26:27 +0000 (02:26 +0300)]
Remove run-pass test suites

4 years agotests: Move run-pass tests with naming conflicts to ui
Vadim Petrochenkov [Fri, 26 Jul 2019 23:07:23 +0000 (02:07 +0300)]
tests: Move run-pass tests with naming conflicts to ui

4 years agotests: Move run-pass tests without naming conflicts to ui
Vadim Petrochenkov [Fri, 26 Jul 2019 22:33:01 +0000 (01:33 +0300)]
tests: Move run-pass tests without naming conflicts to ui

4 years agotests: Add missing run-pass annotations
Vadim Petrochenkov [Fri, 26 Jul 2019 21:54:25 +0000 (00:54 +0300)]
tests: Add missing run-pass annotations

4 years agoAuto merge of #63043 - Centril:rollup-f4baee4, r=Centril
bors [Sat, 27 Jul 2019 15:41:45 +0000 (15:41 +0000)]
Auto merge of #63043 - Centril:rollup-f4baee4, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #62423 (Fix cycle error with existential types)
 - #62979 (Cleanup save-analysis JsonDumper)
 - #62982 (Don't access a static just for its size and alignment)
 - #63013 (add `repr(transparent)` to `IoSliceMut` where missing)
 - #63014 (Stop bare trait lint applying to macro call sites)
 - #63036 (Add lib section to rustc_lexer's Cargo.toml)

Failed merges:

r? @ghost

4 years agoRollup merge of #63036 - topecongiro:add-lib-section, r=matklad
Mazdak Farrokhzad [Sat, 27 Jul 2019 15:40:52 +0000 (17:40 +0200)]
Rollup merge of #63036 - topecongiro:add-lib-section, r=matklad

Add lib section to rustc_lexer's Cargo.toml

This is required to fix the rustc-ap-syntax build error in the recent version. The error could also be fixed on the [rustc-auto-publish](https://github.com/alexcrichton/rustc-auto-publish) side by manually adding `[lib]` section if one does not exist. The latter approach, however, may have a surprising side effect, so I am opting for a simpler solution for now.

r? @alexcrichton

4 years agoRollup merge of #63014 - davidtwco:rustfix-incorrect-dyn-suggestion, r=estebank
Mazdak Farrokhzad [Sat, 27 Jul 2019 15:40:51 +0000 (17:40 +0200)]
Rollup merge of #63014 - davidtwco:rustfix-incorrect-dyn-suggestion, r=estebank

Stop bare trait lint applying to macro call sites

Fixes #61963. Apologies for the delay with in fixing this. If anyone has a better idea how to detect this macro call site case, I'd be happy to fix this in a more robust, less hacky way.

r? @estebank

4 years agoRollup merge of #63013 - nivkner:ffi-safe-slice, r=sfackler
Mazdak Farrokhzad [Sat, 27 Jul 2019 15:40:49 +0000 (17:40 +0200)]
Rollup merge of #63013 - nivkner:ffi-safe-slice, r=sfackler

add `repr(transparent)` to `IoSliceMut` where missing

tried using `IoSliceMut` in FFI, got `improper_ctypes` warning.

according to the docs: `IoSliceMut` is  "guaranteed to be ABI compatible with the `iovec` type" so it should be usable in FFI.
`IoSlice` is also `repr(transparent)` for every platform where these types contain `iovec`-like types.
vxworks also has `IoSliceMut` as transparent so its not even consistently one or the other.

no comment about this next to the types or in the PR that introduced the types, so assuming this was just missed.

r? @sfackler

4 years agoRollup merge of #62982 - oli-obk:static_cycle, r=RalfJung
Mazdak Farrokhzad [Sat, 27 Jul 2019 15:40:48 +0000 (17:40 +0200)]
Rollup merge of #62982 - oli-obk:static_cycle, r=RalfJung

Don't access a static just for its size and alignment

cc @RalfJung

fixes #62189

4 years agoRollup merge of #62979 - Mark-Simulacrum:json-dumper-pretty, r=Xanewok
Mazdak Farrokhzad [Sat, 27 Jul 2019 15:40:46 +0000 (17:40 +0200)]
Rollup merge of #62979 - Mark-Simulacrum:json-dumper-pretty, r=Xanewok

Cleanup save-analysis JsonDumper

4 years agoRollup merge of #62423 - Aaron1011:fix/existential-cycle, r=oli-obk
Mazdak Farrokhzad [Sat, 27 Jul 2019 15:40:45 +0000 (17:40 +0200)]
Rollup merge of #62423 - Aaron1011:fix/existential-cycle, r=oli-obk

Fix cycle error with existential types

Fixes #61863

We now allow uses of `existential type`'s that aren't defining uses - that is, uses which don't constrain the underlying concrete type.

To make this work correctly, we also modify `eq_opaque_type_and_type` to not try to apply additional constraints to an opaque type. If we have code like this:

```rust
existential type Foo;
fn foo1() -> Foo { ... }
fn foo2() -> Foo { foo1() }
```

then `foo2` doesn't end up constraining `Foo`, which means that `foo2` will end up using the type `Foo` internally - that is, an actual `TyKind::Opaque`. We don't want to equate this to the underlying concrete type - we just need to enforce the basic equality constraint between the two types (here, the return type of `foo1` and the return type of `foo2`)

4 years agoAdd comment
topecongiro [Sat, 27 Jul 2019 13:10:09 +0000 (22:10 +0900)]
Add comment

4 years agosyntax_ext: `proc_macro_decls` -> `proc_macro_harness`
Vadim Petrochenkov [Thu, 18 Jul 2019 20:29:57 +0000 (23:29 +0300)]
syntax_ext: `proc_macro_decls` -> `proc_macro_harness`

Few other minor renamings for consistency.
Remove one unused dependency from `rustc_passes`.
Fix libsyntax tests.
Fix rebase.

4 years agoMove standard library injection into libsyntax_ext
Vadim Petrochenkov [Thu, 18 Jul 2019 19:29:07 +0000 (22:29 +0300)]
Move standard library injection into libsyntax_ext

4 years agoMove test harness generation into libsyntax_ext
Vadim Petrochenkov [Thu, 18 Jul 2019 18:29:15 +0000 (21:29 +0300)]
Move test harness generation into libsyntax_ext

4 years agoMove proc macro server into libsyntax
Vadim Petrochenkov [Thu, 18 Jul 2019 18:02:34 +0000 (21:02 +0300)]
Move proc macro server into libsyntax

4 years agoBreak dependencies between `syntax_ext` and some other crates
Vadim Petrochenkov [Wed, 17 Jul 2019 22:49:10 +0000 (01:49 +0300)]
Break dependencies between `syntax_ext` and some other crates

Move `source_uitil` macros into `syntax_ext`
Cleanup dependencies of `rustc_driver`

4 years agoAuto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJung
bors [Sat, 27 Jul 2019 09:32:44 +0000 (09:32 +0000)]
Auto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJung

Optimize RefCell read borrowing

Instead of doing two comparisons we can do only one with a bit of cleverness.

LLVM currently can't do this optimization itself on x86-64.

4 years agoAdd lib section to rustc_lexer's Cargo.toml
topecongiro [Sat, 27 Jul 2019 08:21:42 +0000 (17:21 +0900)]
Add lib section to rustc_lexer's Cargo.toml

4 years agoarbitrary_self_types lifetime elision: --bless --compare-mode=nll
Taiki Endo [Sat, 27 Jul 2019 03:35:05 +0000 (12:35 +0900)]
arbitrary_self_types lifetime elision: --bless --compare-mode=nll

4 years agoFix typo
Taiki Endo [Fri, 26 Jul 2019 06:41:00 +0000 (15:41 +0900)]
Fix typo

4 years agoAdd tests for `self: (&)AssocType`
Taiki Endo [Fri, 26 Jul 2019 06:20:04 +0000 (15:20 +0900)]
Add tests for `self: (&)AssocType`

4 years agoAdd test for multiple ref-self
Taiki Endo [Mon, 15 Jul 2019 16:09:25 +0000 (01:09 +0900)]
Add test for multiple ref-self

4 years agoMinor clean up
Taiki Endo [Mon, 15 Jul 2019 15:48:28 +0000 (00:48 +0900)]
Minor clean up

4 years agoAdd main functions and check-pass annotations
Taiki Endo [Mon, 15 Jul 2019 09:25:09 +0000 (18:25 +0900)]
Add main functions and check-pass annotations

4 years agoUpdate src/test/ui/self/elision/README.md
Taiki Endo [Mon, 15 Jul 2019 08:59:22 +0000 (17:59 +0900)]
Update src/test/ui/self/elision/README.md

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoadd a bevy of new test cases
Niko Matsakis [Fri, 28 Jun 2019 18:46:45 +0000 (14:46 -0400)]
add a bevy of new test cases

4 years agoUse Set1<Region> instead of Option<Region>
Taiki Endo [Wed, 29 May 2019 09:50:24 +0000 (18:50 +0900)]
Use Set1<Region> instead of Option<Region>

4 years agoMake is_self_ty a method on SelfVisitor
Taiki Endo [Wed, 29 May 2019 08:37:28 +0000 (17:37 +0900)]
Make is_self_ty a method on SelfVisitor

4 years agoRemove query for `.pin_type()`
Taiki Endo [Mon, 27 May 2019 13:06:08 +0000 (22:06 +0900)]
Remove query for `.pin_type()`

4 years agoAllow lifetime elision in `Pin<&(mut) Self>`
Taiki Endo [Sun, 26 May 2019 16:43:12 +0000 (01:43 +0900)]
Allow lifetime elision in `Pin<&(mut) Self>`

4 years agoRefactoring use commun code between option, result and accum
Stargateur [Mon, 22 Jul 2019 22:55:18 +0000 (00:55 +0200)]
Refactoring use commun code between option, result and accum

4 years agoAuto merge of #62086 - petrochenkov:builtout, r=eddyb
bors [Fri, 26 Jul 2019 23:29:02 +0000 (23:29 +0000)]
Auto merge of #62086 - petrochenkov:builtout, r=eddyb

Define built-in macros through libcore

This PR defines built-in macros through libcore using a scheme similar to lang items (attribute `#[rustc_builtin_macro]`).
All the macro properties (stability, visibility, etc.) are taken from the source code in libcore, with exception of the expander function transforming input tokens/AST into output tokens/AST, which is still provided by the compiler.

The macros are made available to user code through the standard library prelude (`{core,std}::prelude::v1`), so they are still always in scope.
As a result **built-in macros now have stable absolute addresses in the library**, like `core::prelude::v1::line!()`, this is an insta-stable change.

Right now `prelude::v1` is the only publicly available absolute address for these macros, but eventually they can be moved into more appropriate locations with library team approval (e.g. `Clone` derive -> `core::clone::Clone`).

Now when built-in macros have canonical definitions they can be imported or reexported without issues (https://github.com/rust-lang/rust/issues/61687).

Other changes:
- You can now define a derive macro with a name matching one of the built-in derives (https://github.com/rust-lang/rust/issues/52269). This was an artificial restriction that could be worked around with import renaming anyway.

Known regressions:
- Empty library crate with a crate-level `#![test]` attribute no longer compiles without `--test`. Previously it didn't compile *with* `--test` or with the bin crate type.

Fixes https://github.com/rust-lang/rust/issues/61687
Fixes https://github.com/rust-lang/rust/issues/61804
r? @eddyb

4 years agoAuto merge of #63015 - Centril:rollup-ydhpcas, r=Centril
bors [Fri, 26 Jul 2019 16:57:54 +0000 (16:57 +0000)]
Auto merge of #63015 - Centril:rollup-ydhpcas, r=Centril

Rollup of 22 pull requests

Successful merges:

 - #62084 (allow clippy::unreadable_literal in unicode tables)
 - #62120 (Add missing type links in documentation)
 - #62310 (Add missing doc links in boxed module)
 - #62421 (Introduce `as_deref` to Option)
 - #62583 (Implement Unpin for all raw pointers)
 - #62692 (rustc: precompute the largest Niche and store it in LayoutDetails.)
 - #62801 (Remove support for -Zlower-128bit-ops)
 - #62828 (Remove vector fadd/fmul reduction workarounds)
 - #62862 (code cleanup)
 - #62904 (Disable d32 on armv6 hf targets)
 - #62907 (Initialize the MSP430 AsmParser)
 - #62956 (Implement slow-path for FirstSets::first)
 - #62963 (Allow lexer to recover from some homoglyphs)
 - #62964 (clarify and unify some type test names)
 - #62970 (ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar)
 - #62980 (std: Add more accessors for `Metadata` on Windows)
 - #62983 (Remove needless indirection through Rc)
 - #62985 (librustc_errors: Support ui-testing flag in annotate-snippet emitter)
 - #63002 (error_index_generator should output stdout/stderr when it panics.)
 - #63004 (Add test for issue-54062)
 - #63007 (ci: debug network failures while downloading awscli from PyPI)
 - #63009 (Remove redundant `mut` from variable declaration.)

Failed merges:

r? @ghost

4 years agoRollup merge of #63009 - Rosto75:master, r=matklad
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:57:08 +0000 (18:57 +0200)]
Rollup merge of #63009 - Rosto75:master, r=matklad

Remove redundant `mut` from variable declaration.

4 years agoRollup merge of #63007 - pietroalbini:debug-awscli-install, r=Mark-Simulacrum
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:57:06 +0000 (18:57 +0200)]
Rollup merge of #63007 - pietroalbini:debug-awscli-install, r=Mark-Simulacrum

ci: debug network failures while downloading awscli from PyPI

This adds some random debug code to our CI script while downloading awscli, to *hopefully* pinpoint what's causing the network failures.

r? @Mark-Simulacrum
cc #62967

4 years agoRollup merge of #63004 - JohnTitor:add-tests-for-54062, r=Centril
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:57:05 +0000 (18:57 +0200)]
Rollup merge of #63004 - JohnTitor:add-tests-for-54062, r=Centril

Add test for issue-54062

The ICE is no longer reproduced.

Closes #54062

4 years agoRollup merge of #63002 - gilescope:better-build-diagnostics, r=Mark-Simulacrum
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:57:03 +0000 (18:57 +0200)]
Rollup merge of #63002 - gilescope:better-build-diagnostics, r=Mark-Simulacrum

error_index_generator should output stdout/stderr when it panics.

**bootstrap change**

Call error_index_generator tool using run_quiet which will additionally print std out and std err of the command when it returns an error.
(was `run` uses `run_silent` under the covers.)

Why: PR #62871 is hitting a build error but the panic isn't getting shown so its unclear what the problem is.

4 years agoRollup merge of #62985 - phansch:support_ui_testing_flag, r=estebank
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:57:01 +0000 (18:57 +0200)]
Rollup merge of #62985 - phansch:support_ui_testing_flag, r=estebank

librustc_errors: Support ui-testing flag in annotate-snippet emitter

This adds support for the `-Z ui-testing` flag to the new
annotate-snippet diagnostic emitter.

Support for the flag was added to `annotate-snippet-rs` in these PRs:

* https://github.com/rust-lang/annotate-snippets-rs/pull/3
* https://github.com/rust-lang/annotate-snippets-rs/pull/5

r? @estebank

Closes #61811

4 years agoRollup merge of #62983 - Mark-Simulacrum:remove-needless-rc, r=petrochenkov
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:59 +0000 (18:56 +0200)]
Rollup merge of #62983 - Mark-Simulacrum:remove-needless-rc, r=petrochenkov

Remove needless indirection through Rc

NamedMatch is already cheap to clone due to Lrc's inside.

4 years agoRollup merge of #62980 - alexcrichton:windows-metadata, r=sfackler
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:58 +0000 (18:56 +0200)]
Rollup merge of #62980 - alexcrichton:windows-metadata, r=sfackler

std: Add more accessors for `Metadata` on Windows

This commit adds accessors for more fields in `fs::Metadata` on Windows
which weren't previously exposed. There's two sources of `fs::Metadata`
on Windows currently, one from `DirEntry` and one from a file itself.
These two sources of information don't actually have the same set of
fields exposed in their stat information, however. To handle this the
platform-specific accessors of Windows-specific information all return
`Option` to return `None` in the case a metadata comes from a
`DirEntry`, but they're guaranteed to return `Some` if it comes from a
file itself.

This is motivated by some changes in CraneStation/wasi-common#42, and
I'm curious how others feel about this platform-specific functionality!

4 years agoRollup merge of #62970 - pietroalbini:fix-tools-builder, r=alexcrichton
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:56 +0000 (18:56 +0200)]
Rollup merge of #62970 - pietroalbini:fix-tools-builder, r=alexcrichton

ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar

This PR fixes toolstate failing to push on the LinuxTools PR builder by gating the pushes on the new `TOOLSTATE_PUBLISH` environment variable, which is set on prod credentials but not on the PR ones. The old code checked whether the access token was set, but that doesn't work due to an Azure quirk.

For a bit of background, secret environment variables are not available by default, but each step needs to explicitly declare which secret vars to load:

```yaml
- bash: echo foo
  env:
    SECRET_VAR: $(SECRET_VAR)
```

This works fine when the variable is present but when it's missing, instead of setting `SECRET_VAR` to an empty string or just not setting it at all, Azure Pipelines puts the literal `$(SECRET_VAR)` as the content, which completly breaks the old check we had. I tried almost every thing to make this work in a sensible way, and the only conclusion I reached is to set the variable at the top level with the runtime expression evaluation syntax, which sets the variable to an empty string if missing:

```yaml
# At the top:
variables:
  - name: MAYBE_SECRET_VAR
    value: $[ variables.MAYBE_SECRET_VAR ]

# In the step:
- bash: echo foo
  env:
    SECRET_VAR: $(MAYBE_SECRET_VAR)
```

While that *could've worked* it was ugly and messy, so I just opted to add yet another non-secret variable.

r? @alexcrichton
fixes #62811

4 years agoRollup merge of #62964 - RalfJung:ty-tests, r=Centril
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:55 +0000 (18:56 +0200)]
Rollup merge of #62964 - RalfJung:ty-tests, r=Centril

clarify and unify some type test names

* `is_mutable_pointer`: use `ptr` suffix for consistency with `is_region_ptr`, `is_fn_ptr`, `is_unsafe_ptr`.
* `is_pointer_sized`: the name is misleading as this only tests for pointer-sized *integers*, so rename to `is_ptr_sized_integral`.

4 years agoRollup merge of #62963 - estebank:homoglyph-recovery, r=petrochenkov
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:53 +0000 (18:56 +0200)]
Rollup merge of #62963 - estebank:homoglyph-recovery, r=petrochenkov

Allow lexer to recover from some homoglyphs

4 years agoRollup merge of #62956 - ia0:fix_62831, r=petrochenkov
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:52 +0000 (18:56 +0200)]
Rollup merge of #62956 - ia0:fix_62831, r=petrochenkov

Implement slow-path for FirstSets::first

When 2 or more sequences share the same span, we can't use the precomputed map
for their first set. So we compute it recursively.

Fixes #62831.

4 years agoRollup merge of #62907 - nikic:msp430-asmparser, r=alexcrichton
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:50 +0000 (18:56 +0200)]
Rollup merge of #62907 - nikic:msp430-asmparser, r=alexcrichton

Initialize the MSP430 AsmParser

Hopefully fixes #59077.

r? @alexcrichton

4 years agoRollup merge of #62904 - nikic:arm-d32, r=alexcrichton
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:48 +0000 (18:56 +0200)]
Rollup merge of #62904 - nikic:arm-d32, r=alexcrichton

Disable d32 on armv6 hf targets

We already do this on armv7 targets. It seems that this now gets enabled by default if '+vfp2` is specified, so disable it explicitly.

Hopefully fixes #62841.

r? @alexcrichton

4 years agoRollup merge of #62862 - BaoshanPang:cleanup, r=alexcrichton
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:47 +0000 (18:56 +0200)]
Rollup merge of #62862 - BaoshanPang:cleanup, r=alexcrichton

code cleanup

remove all codes that are not used by vxWorks

4 years agoRollup merge of #62828 - nikic:fadd-mul-reductions, r=eddyb
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:45 +0000 (18:56 +0200)]
Rollup merge of #62828 - nikic:fadd-mul-reductions, r=eddyb

Remove vector fadd/fmul reduction workarounds

The bugs that this was working around have been fixed in LLVM 9.

r? @gnzlbg

4 years agoRollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichton
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:43 +0000 (18:56 +0200)]
Rollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichton

Remove support for -Zlower-128bit-ops

It is broken and unused

cc https://github.com/rust-lang/rust/issues/58969

blocked https://github.com/rust-lang-nursery/compiler-builtins/pull/302 (removes definitions of the lang items removed in this PR)

r? @alexcrichton

4 years agoRollup merge of #62692 - eddyb:precompute-niches, r=oli-obk
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:41 +0000 (18:56 +0200)]
Rollup merge of #62692 - eddyb:precompute-niches, r=oli-obk

rustc: precompute the largest Niche and store it in LayoutDetails.

Since we only ever can use at most one niche, it makes sense to just store that in the layout, for the simplest caching (especially as it's almost trivial to compute).

There might be a speedup from this, but even if it's marginal now, the caching would be a more significant benefit for future optimization attempts.

4 years agoRollup merge of #62583 - sfackler:unpin-raw, r=cramertj
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:40 +0000 (18:56 +0200)]
Rollup merge of #62583 - sfackler:unpin-raw, r=cramertj

Implement Unpin for all raw pointers

Like references and boxes, moving the pointer doesn't move the
pointed-to value, so this is safe.

r? @cramertj

4 years agoRollup merge of #62421 - JohnTitor:U007D-master, r=alexcrichton
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:38 +0000 (18:56 +0200)]
Rollup merge of #62421 - JohnTitor:U007D-master, r=alexcrichton

Introduce `as_deref` to Option

This is re-submission for #59628.
Renames `deref()` to `as_deref()` and adds `deref_mut()` impls and tests.

CC #50264

r? @Kimundi
(I picked you as you're the previous reviewer.)

4 years agoRollup merge of #62310 - GuillaumeGomez:add-missing-doc-links-boxed, r=Centril
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:36 +0000 (18:56 +0200)]
Rollup merge of #62310 - GuillaumeGomez:add-missing-doc-links-boxed, r=Centril

Add missing doc links in boxed module

r? @rust-lang/docs

4 years agoRollup merge of #62120 - GuillaumeGomez:add-missing-type-links, r=Centril
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:34 +0000 (18:56 +0200)]
Rollup merge of #62120 - GuillaumeGomez:add-missing-type-links, r=Centril

Add missing type links in documentation

r? @rust-lang/docs

4 years agoRollup merge of #62084 - euclio:unicode-table-tweak, r=kennytm
Mazdak Farrokhzad [Fri, 26 Jul 2019 16:56:33 +0000 (18:56 +0200)]
Rollup merge of #62084 - euclio:unicode-table-tweak, r=kennytm

allow clippy::unreadable_literal in unicode tables

Also modifies the generation script to emit 2018 edition paths.

4 years agoci: add debug checks for pypi network outages
Pietro Albini [Fri, 26 Jul 2019 11:10:44 +0000 (13:10 +0200)]
ci: add debug checks for pypi network outages

4 years agolowering: Omit bare trait lint on macro call sites
David Wood [Fri, 26 Jul 2019 16:31:39 +0000 (17:31 +0100)]
lowering: Omit bare trait lint on macro call sites

This commit implements a hacky fix for detecting when a span is pointing
at a macro call site so that bare trait lints are not made incorrectly.

4 years agoadd repr(transparent) to IoSliceMut where missing
Niv Kaminer [Fri, 26 Jul 2019 15:56:47 +0000 (18:56 +0300)]
add repr(transparent) to IoSliceMut where missing

4 years agoUpdate src/librustc_mir/interpret/memory.rs
Oliver Scherer [Fri, 26 Jul 2019 15:44:11 +0000 (17:44 +0200)]
Update src/librustc_mir/interpret/memory.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoUpdate src/librustc_mir/interpret/memory.rs
Oliver Scherer [Fri, 26 Jul 2019 15:43:49 +0000 (17:43 +0200)]
Update src/librustc_mir/interpret/memory.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoAddress review comments
Oliver Scherer [Fri, 26 Jul 2019 15:10:21 +0000 (17:10 +0200)]
Address review comments

4 years agostd: Add more accessors for `Metadata` on Windows
Alex Crichton [Thu, 25 Jul 2019 16:44:04 +0000 (09:44 -0700)]
std: Add more accessors for `Metadata` on Windows

This commit adds accessors for more fields in `fs::Metadata` on Windows
which weren't previously exposed. There's two sources of `fs::Metadata`
on Windows currently, one from `DirEntry` and one from a file itself.
These two sources of information don't actually have the same set of
fields exposed in their stat information, however. To handle this the
platform-specific accessors of Windows-specific information all return
`Option` to return `None` in the case a metadata comes from a
`DirEntry`, but they're guaranteed to return `Some` if it comes from a
file itself.

This is motivated by some changes in CraneStation/wasi-common#42, and
I'm curious how others feel about this platform-specific functionality!

4 years agoRemove redundant `mut` from variable declaration.
Tomasz Różański [Fri, 26 Jul 2019 13:04:51 +0000 (15:04 +0200)]
Remove redundant `mut` from variable declaration.

4 years agoIntroduce built-in macros through libcore
Vadim Petrochenkov [Thu, 20 Jun 2019 08:52:31 +0000 (11:52 +0300)]
Introduce built-in macros through libcore

4 years agoAuto merge of #62914 - ehuss:update-cargo, r=alexcrichton
bors [Fri, 26 Jul 2019 08:57:13 +0000 (08:57 +0000)]
Auto merge of #62914 - ehuss:update-cargo, r=alexcrichton

Update cargo

11 commits in e3563dbdcd2e370bc4f11d080f739d82d25773fd..d0f828419d6ce6be21a90866964f58eb2c07cd56
2019-07-16 19:22:44 +0000 to 2019-07-23 21:58:59 +0000
- Remove include/exclude glob warning. (rust-lang/cargo#7170)
- Optimize lock file format for git merge conflicts (rust-lang/cargo#7070)
- Set up CI with Azure Pipelines (rust-lang/cargo#7139)
- Force clippy to run. (rust-lang/cargo#7157)
- Work around rust-lang/rust#61440 (rust-lang/cargo#7158)
- initial working version of cargo fix --clippy (rust-lang/cargo#7069)
- Optimize runtime of `#[cargo_test_macro]` (rust-lang/cargo#7146)
- Don't fail if we can't acquire readonly lock (rust-lang/cargo#7149)
- Add support for multiple --features options (rust-lang/cargo#7084)
- Fix a typo in an env var name (rust-lang/cargo#7145)
- Add a way to disable all nightly tests (rust-lang/cargo#7142)

4 years agoAdd test for issue-54062
Yuki Okushi [Fri, 26 Jul 2019 08:39:58 +0000 (17:39 +0900)]
Add test for issue-54062

4 years agoClear up `get_size_and_align`
Oliver Scherer [Fri, 26 Jul 2019 08:34:54 +0000 (10:34 +0200)]
Clear up `get_size_and_align`

4 years agoclarify and unify some type test names
Ralf Jung [Wed, 24 Jul 2019 22:57:33 +0000 (00:57 +0200)]
clarify and unify some type test names

4 years agoFix tidy
Oliver Scherer [Fri, 26 Jul 2019 06:10:09 +0000 (08:10 +0200)]
Fix tidy

4 years ago`run_quiet` outputs stdout/stderr when things go wrong.
Giles Cope [Thu, 25 Jul 2019 23:05:30 +0000 (00:05 +0100)]
`run_quiet` outputs stdout/stderr when things go wrong.
(was `run` uses `run_silent` under the covers.)

4 years agoUpdate cargo
Eric Huss [Tue, 23 Jul 2019 22:41:25 +0000 (15:41 -0700)]
Update cargo

4 years agoAuto merge of #60260 - videolabs:rust_uwp2, r=alexcrichton
bors [Fri, 26 Jul 2019 02:18:12 +0000 (02:18 +0000)]
Auto merge of #60260 - videolabs:rust_uwp2, r=alexcrichton

Add support for UWP targets

Hi,

This pull request aims at adding support for UWP (Universal Windows Apps) platform.
A few notes:
- This requires a very recent mingw-w64 version (containing this commit and the previous related ones: https://github.com/mirror/mingw-w64/commit/e8c433c871687a78408ae9b40ab7776577db908d#diff-eefdfbfe9cec5f4ebab88c9a64d423a9)
- This was tested using LLVM/clang rather than gcc, and so far it assumes that LLVM/clang will be the native compiler. This is mostly due to the fact that the support for exceptions/stack unwinding for UWP got much more attention in libunwind
- The "uwp" part of the target needs support for it in the `cc-rs` & `backtrace-rs` crates. I'll create the MR there right after I submit this one and will link everything together, but I'm not sure what's the correct way of dealing with external dependencies in the context of rust
- Enabling import libraries and copying them across stages requires a change in cargo, for which I'll open a MR right after I submit this one as well
- The i686 stack unwinding is unsupported for now, because LLVM assumes SjLj, while rust seems to assume SEH will be used. I'm unsure how to fix this

Also, this is my first encounter with rust, so please bear with my code, it might not feel so idiomatic or even correct :)

I'm pretty sure there's a way of doing things in a cleaner way when it comes to win/c.rs, maybe having a UWP & desktop specific modules, and import those conditionally? It doesn't feel right to sprinkle `#[cfg(...)]` all over the place

Off course, I'll gladly update anything you see fit (to the extent of my abilities/knowledge :) )!

Thanks,

4 years agoAuto merge of #62990 - Centril:rollup-k9n0hvs, r=Centril
bors [Thu, 25 Jul 2019 22:34:23 +0000 (22:34 +0000)]
Auto merge of #62990 - Centril:rollup-k9n0hvs, r=Centril

Rollup of 15 pull requests

Successful merges:

 - #60066 (Stabilize the type_name intrinsic in core::any)
 - #60938 (rustdoc: make #[doc(include)] relative to the containing file)
 - #61884 (Stablize Euclidean Modulo (feature euclidean_division))
 - #61890 (Fix some sanity checks)
 - #62528 (Add joining slices of slices with a slice separator, not just a single item)
 - #62707 (Add tests for overlapping explicitly dropped locals in generators)
 - #62735 (Turn `#[global_allocator]` into a regular attribute macro)
 - #62822 (Improve some pointer-related documentation)
 - #62887 (Make the parser TokenStream more resilient after mismatched delimiter recovery)
 - #62921 (Add method disambiguation help for trait implementation)
 - #62930 (Add test for #51559)
 - #62942 (Use match ergonomics in Condvar documentation)
 - #62977 (Fix inconsistent highlight blocks.)
 - #62978 (Remove `cfg(bootstrap)` code for array implementations)
 - #62981 (Add note suggesting to borrow a String argument to find)

Failed merges:

 - #62964 (clarify and unify some type test names)

r? @ghost

4 years agoRewrite `get_size_and_align` so it doesn't duplicate work
Oliver Scherer [Thu, 25 Jul 2019 21:53:05 +0000 (23:53 +0200)]
Rewrite `get_size_and_align` so it doesn't duplicate work

4 years agoImplement slow-path for FirstSets::first
Julien Cretin [Wed, 24 Jul 2019 21:32:26 +0000 (23:32 +0200)]
Implement slow-path for FirstSets::first

When 2 or more sequences share the same span, we can't use the precomputed map
for their first set. So we compute it recursively.

Fixes #62831.

4 years agoRollup merge of #62981 - estebank:issue-62843, r=Centril
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:13 +0000 (23:21 +0200)]
Rollup merge of #62981 - estebank:issue-62843, r=Centril

Add note suggesting to borrow a String argument to find

Fix #62843.

4 years agoRollup merge of #62978 - LukasKalbertodt:remove-array-impl-bootstrap-cfg, r=Mark...
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:11 +0000 (23:21 +0200)]
Rollup merge of #62978 - LukasKalbertodt:remove-array-impl-bootstrap-cfg, r=Mark-Simulacrum

Remove `cfg(bootstrap)` code for array implementations

In https://github.com/rust-lang/rust/pull/62435 ("Use const generics for array impls [part 1]") the old macro-based implementations were not removed but still used with `cfg(bootstrap)` since the bootstrap compiler had some problems with const generics at the time. This does not seem to be the case anymore, so there is no reason to keep the old code.

Unfortunately, the diff is pretty ugly because much of the code was indented by one level before. The change is pretty trivial, though.

PS: I did not run the full test suite locally. There are 40°C outside and 31°C inside my room. I don't want my notebook to melt. I hope that CI is green.

r? @scottmcm

4 years agoRollup merge of #62977 - Rosto75:master, r=shepmaster
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:09 +0000 (23:21 +0200)]
Rollup merge of #62977 - Rosto75:master, r=shepmaster

Fix inconsistent highlight blocks.

4 years agoRollup merge of #62942 - KevinWMatthews:condvar_docs_match_ergo, r=sfackler
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:07 +0000 (23:21 +0200)]
Rollup merge of #62942 - KevinWMatthews:condvar_docs_match_ergo, r=sfackler

Use match ergonomics in Condvar documentation

Documentation was written before match ergonomics was merged. See #62857.

In short, replaces

```rust
let &(ref lock, ref cvar) = &*pair;
```

with

```rust
let (lock, cvar) = &*pair
```

in the docs of `std::sync::Condvar`.

4 years agoRollup merge of #62930 - iluuu1994:test-for-51559, r=oli-obk
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:06 +0000 (23:21 +0200)]
Rollup merge of #62930 - iluuu1994:test-for-51559, r=oli-obk

Add test for #51559

Closes #51559

4 years agoRollup merge of #62921 - iluuu1994:improve-help-for-method-disambiguation, r=estebank
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:04 +0000 (23:21 +0200)]
Rollup merge of #62921 - iluuu1994:improve-help-for-method-disambiguation, r=estebank

Add method disambiguation help for trait implementation

Closes #51046
Closes #40471

4 years agoRollup merge of #62887 - estebank:issue-62881, r=petrochenkov
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:03 +0000 (23:21 +0200)]
Rollup merge of #62887 - estebank:issue-62881, r=petrochenkov

Make the parser TokenStream more resilient after mismatched delimiter recovery

Fix #62881, fix #62895.

4 years agoRollup merge of #62822 - RalfJung:pointers, r=Centril
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:01 +0000 (23:21 +0200)]
Rollup merge of #62822 - RalfJung:pointers, r=Centril

Improve some pointer-related documentation

4 years agoRollup merge of #62735 - petrochenkov:galloc, r=alexcrichton
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:21:00 +0000 (23:21 +0200)]
Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichton

Turn `#[global_allocator]` into a regular attribute macro

It was a 99% macro with exception of some diagnostic details.

As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks.

Fixes https://github.com/rust-lang/rust/issues/44113
Fixes https://github.com/rust-lang/rust/issues/58072

4 years agoRollup merge of #62707 - JohnTitor:add-test-for-61922, r=tmandry
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:20:58 +0000 (23:20 +0200)]
Rollup merge of #62707 - JohnTitor:add-test-for-61922, r=tmandry

Add tests for overlapping explicitly dropped locals in generators

Closes #62686

r? @tmandry

4 years agoRollup merge of #62528 - SimonSapin:concat, r=alexcrichton
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:20:56 +0000 (23:20 +0200)]
Rollup merge of #62528 - SimonSapin:concat, r=alexcrichton

Add joining slices of slices with a slice separator, not just a single item

https://github.com/rust-lang/rust/issues/27747#issuecomment-294525391
> It's kinda annoying to be able to join strings with a str (which can have multiple chars), but joining a slice of slices, you can only join with a single element.

This turns out to be fixable, with some possible inference regressions.

# TL;DR

Related trait(s) are unstable and tracked at https://github.com/rust-lang/rust/issues/27747, but the `[T]::join` method that is being extended here is already stable.

Example use of the new insta-stable functionality:

```rust
let nested: Vec<Vec<Foo>> = /* … */;
let separator: &[Foo] = /* … */;  // Previously: could only be a single &Foo
nested.join(separator)
```

Complete API affected by this PR, after changes:

```rust
impl<T> [T] {
    pub fn concat<Item: ?Sized>(&self) -> <Self as Concat<Item>>::Output
        where Self: Concat<Item>
    {
        Concat::concat(self)
    }
    pub fn join<Separator>(&self, sep: Separator) -> <Self as Join<Separator>>::Output
        where Self: Join<Separator>
    {
        Join::join(self, sep)
    }
}

// The `Item` parameter is only useful for the the slice-of-slices impl.
pub trait Concat<Item: ?Sized> {
    type Output;
    fn concat(slice: &Self) -> Self::Output;
}

pub trait Join<Separator> {
    type Output;
    fn join(slice: &Self, sep: Separator) -> Self::Output;
}

impl<T: Clone, V: Borrow<[T]>> Concat<T> for [V] {
    type Output = Vec<T>;
}

impl<T: Clone, V: Borrow<[T]>> Join<&'_ T> for [V] {
    type Output = Vec<T>;
}

// New functionality here!
impl<T: Clone, V: Borrow<[T]>> Join<&'_ [T]> for [V] {
    type Output = Vec<T>;
}

impl<S: Borrow<str>> Concat<str> for [S] {
    type Output = String;
}

impl<S: Borrow<str>> Join<&'_ str> for [S] {
    type Output = String;
}
```

# Details

After https://github.com/rust-lang/rust/pull/62403 but before this PR, the API is:

```rust
impl<T> [T] {
    pub fn concat<Separator: ?Sized>(&self) -> T::Output
        where T: SliceConcat<Separator>
    {
        SliceConcat::concat(self)
    }

    pub fn join<Separator: ?Sized>(&self, sep: &Separator) -> T::Output
        where T: SliceConcat<Separator>
    {
        SliceConcat::join(self, sep)
    }
}

pub trait SliceConcat<Separator: ?Sized>: Sized {
    type Output;
    fn concat(slice: &[Self]) -> Self::Output;
    fn join(slice: &[Self], sep: &Separator) -> Self::Output;
}

impl<T: Clone, V: Borrow<[T]>> SliceConcat<T> for V {
    type Output = Vec<T>;
}

impl<S: Borrow<str>> SliceConcat<str> for S {
    type Output = String;
}
```

By adding a trait impl we should be able to accept a slice of `T` as the separator, as an alternative to a single `T` value.

In a `some_slice.join(some_separator)` call, trait resolution will pick an impl or the other based on the type of `some_separator`. In `some_slice.concat()` however there is no separator, so this call would become ambiguous. Some regression in type inference or trait resolution may be acceptable on principle, but requiring a turbofish for every single call to `concat` isn’t great.

The solution to that is splitting the `SliceConcat` trait into two `Concat` and `Join` traits, one for each eponymous method. Only `Join` would gain a new impl, so that `some_slice.concat()` would not become ambiguous.

Now, at the trait level the `Concat` trait does not need a `Separator` parameter anymore. However, simply removing it causes one of the impls not to be accepted anymore:

```rust
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
  --> src/liballoc/slice.rs:608:6
    |
608 | impl<T: Clone, V: Borrow<[T]>> Concat for [V] {
    |      ^ unconstrained type parameter
```

This makes sense: if `[V]::concat` is a method that is itself not generic, then its return type (which is the `Concat::Output` associated type) needs to be determined based on solely `V`. And although there is no such type in the standard library, there is nothing stopping another crate from defining a `V` type that implements both `Borrow<[Foo]>` and `Borrow<[Bar]>`. It might not be a good idea, but it’s possible. Both would apply here, and there would be no way to determine `T`.

This could be a warning sign that this API is too generic. Perhaps we’d be better off having one less type variable, and only implement `Concat for [&'_ [T]]` and `Concat for [Vec<T>]` etc. However this aspect of `[V]::concat` is already stable, so we’re stuck with it.

The solution is to keep a dummy type parameter on the `Concat` trait. That way, if a type has multiple `Borrow<[_]>` impls, it’ll end up with multiple corresponding `Concat<_>` impls.

In `impl<S: Borrow<str>> Concat<str> for [S]`, the second occurrence of `str` is not meaningful. It could be any type. As long as there is only once such type with an applicable impl, trait resolution will be appeased without demanding turbofishes.

# Joining strings with `char`

For symmetry I also tried adding this impl (because why not):

```rust
impl<S: Borrow<str>> Join<char> for [S] {
    type Output = String;
}
```

This immediately caused an inference regression in a dependency of rustc:

```rust
error[E0277]: the trait bound `std::string::String: std::borrow::Borrow<[std::string::String]>` is not satisfied
   --> /home/simon/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.19/src/lib.rs:595:37
    |
595 |             row.push_str(&desc_rows.join(&desc_sep));
    |                                     ^^^^ the trait `std::borrow::Borrow<[std::string::String]>` is not implemented for `std::string::String`
    |
    = help: the following implementations were found:
              <std::string::String as std::borrow::Borrow<str>>
    = note: required because of the requirements on the impl of `std::slice::Join<&std::string::String>` for `[std::string::String]`
```

In the context of this code, two facts are known:

* `desc_rows` is a `Vec<String>`
* `desc_sep` is a `String`

Previously the first fact alone reduces the resolution of `join` to only one solution, where its argument it expected to be `&str`. Then, `&String` is coerced to `&str`.

With the new `Join` impl, the first fact leavs two applicable impls where the separator can be either `&str` or `char`. But `&String` is neither of these things. It appears that possible coercions are not accounted for, in the search for a solution in trait resolution.

I have not included this new impl in this PR. It’s still possible to add later, but the `getopts` breakage does not need to block the rest of the PR. And the functionality easy for end-user to duplicate: `slice_of_strings.join(&*char_separator.encode_utf8(&mut [0_u8, 4]))`

The `&*` part of that last code snippet is another case of the same issue: `encode_utf8` returns `&mut str` which can be coerced to `&str`, but isn’t when trait resolution is ambiguous.

4 years agoRollup merge of #61890 - golddranks:fix_sanity_check_llvm, r=Dylan-DPC
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:20:54 +0000 (23:20 +0200)]
Rollup merge of #61890 - golddranks:fix_sanity_check_llvm, r=Dylan-DPC

Fix some sanity checks

Update: Changes that made it not to work dropped.

* Fix `building_llvm` in sanity check
  * This was subtly broken: we build LLVM if any of the hosts builds LLVM, and not setting the config meant that LLVM is built for that target. Because of filtering away the targets not configured and the semantics of `Iterator::any`, it currently didn't set the `building_llvm` flag even if we indeed build it.
* Add `swig` sanity check
  * This checks whether there is a `swig` executable needed for LLDB.

4 years agoRollup merge of #61884 - crlf0710:stablize_euc, r=dtolnay,Centril
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:20:53 +0000 (23:20 +0200)]
Rollup merge of #61884 - crlf0710:stablize_euc, r=dtolnay,Centril

Stablize Euclidean Modulo (feature euclidean_division)

Closes #49048

4 years agoRollup merge of #60938 - jonas-schievink:doc-include-paths, r=petrochenkov
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:20:51 +0000 (23:20 +0200)]
Rollup merge of #60938 - jonas-schievink:doc-include-paths, r=petrochenkov

rustdoc: make #[doc(include)] relative to the containing file

This matches the behavior of other in-source paths like `#[path]` and the `include_X!` macros.

Fixes https://github.com/rust-lang/rust/pull/58373#issuecomment-462349380
Also addresses https://github.com/rust-lang/rust/issues/44732#issuecomment-467660239

cc #44732

This is still missing a stdsimd change (https://github.com/jonas-schievink/stdsimd/commit/42ed30e0b5fb5e2d11765b5d1e1f36234af85984), so CI will currently fail. I'll land that change once I get initial feedback for this PR.

4 years agoRollup merge of #60066 - sfackler:type-name, r=Centril
Mazdak Farrokhzad [Thu, 25 Jul 2019 21:20:49 +0000 (23:20 +0200)]
Rollup merge of #60066 - sfackler:type-name, r=Centril

Stabilize the type_name intrinsic in core::any

Stabilize `type_name` in `core::any`.

Closes rust-lang/rfcs#1428

FCP completed over there.

`RELEASES.md`: Prefer T-libs for categorization.

4 years agoreview comments: add FIXME comments and formatting
Esteban Küber [Thu, 25 Jul 2019 18:22:46 +0000 (11:22 -0700)]
review comments: add FIXME comments and formatting

4 years agoAdd UWP mingw targets
Hugo Beauzée-Luyssen [Mon, 27 May 2019 15:18:14 +0000 (17:18 +0200)]
Add UWP mingw targets