Commit Graph

96872 Commits

Author SHA1 Message Date
Denys Otrishko
c6735a624b
fixup! rustc_typeck: improve diagnostics for _ const/static declarations 2019-07-19 19:09:59 +03:00
Denys Otrishko
469b7a9161
rustc_typeck: improve diagnostics for _ const/static declarations 2019-07-19 18:55:20 +03:00
bors
e3cebcb3bd Auto merge of #62690 - alexcrichton:azure-update, r=pietroalbini
azure: Prepare configuration for 4-core machines

This commit updates some of our assorted Azure/CI configuration to
prepare for some 4-core machines coming online. We're still in the
process of performance testing them to get final numbers, but some
changes are worth landing ahead of this. The updates here are:

* Use `C:/` instead of `D:/` for submodule checkout since it should have
  plenty of space and the 4-core machines won't have `D:/`

* Update `lzma-sys` to 0.1.14 which has support for VS2019, where 0.1.10
  doesn't.

* Update `src/ci/docker/run.sh` to work when it itself is running inside
  of a docker container (see the comment in the file for more info)

* Print step timings on the `try` branch in addition to the `auto`
  branch in. The logs there should be seen by similarly many humans (not
  many) and can be useful for performance analysis after a `try` build
  runs.

* Install the WIX and InnoSetup tools manually on Windows instead of
  relying on pre-installed copies on the VM. This gives us more control
  over what's being used on the Azure cloud right now (we control the
  version) and in the 4-core machines these won't be pre-installed. Note
  that on AppVeyor we actually already were installing InnoSetup, we
  just didn't carry that over on Azure!
2019-07-19 15:49:18 +00:00
Ralf Jung
ad261f6852 avoid uninit_array! macro where it is not needed 2019-07-19 17:23:47 +02:00
Alex Crichton
9b4f6de7a4 azure: Prepare configuration for 4-core machines
This commit updates some of our assorted Azure/CI configuration to
prepare for some 4-core machines coming online. We're still in the
process of performance testing them to get final numbers, but some
changes are worth landing ahead of this. The updates here are:

* Use `C:/` instead of `D:/` for submodule checkout since it should have
  plenty of space and the 4-core machines won't have `D:/`

* Update `lzma-sys` to 0.1.14 which has support for VS2019, where 0.1.10
  doesn't.

* Update `src/ci/docker/run.sh` to work when it itself is running inside
  of a docker container (see the comment in the file for more info)

* Print step timings on the `try` branch in addition to the `auto`
  branch in. The logs there should be seen by similarly many humans (not
  many) and can be useful for performance analysis after a `try` build
  runs.

* Install the WIX and InnoSetup tools manually on Windows instead of
  relying on pre-installed copies on the VM. This gives us more control
  over what's being used on the Azure cloud right now (we control the
  version) and in the 4-core machines these won't be pre-installed. Note
  that on AppVeyor we actually already were installing InnoSetup, we
  just didn't carry that over on Azure!
2019-07-19 06:49:19 -07:00
Ralf Jung
e074db764a use const array repeat expressions for uninit_array 2019-07-19 14:47:56 +02:00
bjorn3
3427a14bdf Remove support for -Zlower-128bit-ops
It is broken and unused
2019-07-19 14:21:06 +02:00
bors
527dce7137 Auto merge of #62679 - Xanewok:after-expansion, r=Zoxc
Add an `after_expansion` callback in the driver

To format a given file RLS needs to know the Rust edition associated with it. It's not enough to look at the `edition` key in Cargo.toml - each crate target can have a different edition associated with it so the sure way to fetch a correct edition is to scan the input files used to compile a given crate target.

Right now this was done in the `after_analysis` callback of our shim, however this leads to other problems - if a crate cannot be successfully compiled (e.g. it has a type error) then a callback would not be invoked meaning we can't populate the files -> edition mapping.

However, doing this only after parsing is not enough, since expansion can pull in additional source files (e.g. by invoking `macro_rules! include_my_mod { () => { mod some_mod; }; }`).

Without copy-pasting the entire driver setup it's also not possible to expand the crate ourselves in the `after_parsing` callback - to expand crate we'd need to register plugins and initialize session ourselves. However, this is done normally after executing the callback itself, thus triggering the `Once::set` assertions in `Session::init_features`.

r? @Zoxc

cc @RalfJung @oli-obk this affects public driver interface used by Miri and Clippy
2019-07-19 10:38:09 +00:00
Vadim Petrochenkov
8f30d26030 hygiene: Tweak naming some more 2019-07-19 12:02:57 +03:00
Vadim Petrochenkov
09703e3843 Adjust other names after the Mark renaming 2019-07-19 12:01:49 +03:00
Vadim Petrochenkov
31e10aec83 libsyntax: Remove Mark into ExpnId 2019-07-19 12:01:48 +03:00
Ralf Jung
7c1e405478 ONCE_INIT is deprecated-in-future only for bootstrap 2019-07-19 09:48:06 +02:00
Ralf Jung
13ed0cf9e8 do not use mem::uninitialized in std::io 2019-07-19 09:45:38 +02:00
Ralf Jung
33452b0587 warn about deprecated-in-future in most of libstd 2019-07-19 09:35:32 +02:00
bors
f9477a77c5 Auto merge of #62694 - lundibundi:help-infer-fn-ret, r=eddyb
rustc_typeck: improve diagnostics for -> _ fn return type

This should implement IIUC the mentioned issue.

~~I'm not sure if there is a better way than `get_infer_ret_ty` to get/check the return type without code duplication.~~

~~Also, is this unwrap be okay `ty::Binder::bind(*tables.liberated_fn_sigs().get(hir_id).unwrap())`?~~

r? @eddyb
Closes: https://github.com/rust-lang/rust/issues/56132
2019-07-19 04:04:17 +00:00
bors
fe499a7b34 Auto merge of #62684 - petrochenkov:scopevisit, r=davidtwco
resolve: Improve candidate search for unresolved macro suggestions

Use same scope visiting machinery for both collecting suggestion candidates and actually resolving the names.

The PR is better read in per-commit fashion with whitespace changes ignored (the first commit in particular moves some code around).

This should be the last pre-requisite for https://github.com/rust-lang/rust/pull/62086.
r? @davidtwco
2019-07-19 00:24:39 +00:00
Samy Kacimi
886fb218ed
normalize use of backticks in compiler messages for libcore/ptr
https://github.com/rust-lang/rust/issues/60532
2019-07-18 23:33:16 +02:00
bors
a3369981de Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddyb
rustc/rustc_mir: Implement RFC 2203.

This PR implements RFC 2203, allowing constants in array repeat
expressions. Part of #49147.

r? @eddyb
2019-07-18 20:41:40 +00:00
Martin Indra
48b6069eaf
Fix typo in src/libstd/net/udp.rs doc comment
Affect is usually used as a verb, effect as a verb.
2019-07-18 21:03:56 +02:00
Esteban Küber
f22bc2d3ff Suggest trait bound on type parameter when it is unconstrained
Given

```
mented on Jan 26, 2015 •
 trait Foo { fn method(&self) {} }

fn call_method<T>(x: &T) {
    x.method()
}
```

suggest constraining `T` with `Foo`.
2019-07-18 11:50:50 -07:00
Who? Me?!
1aa10797df
Update src/ci/docker/x86_64-gnu-tools/checkregression.py
Co-Authored-By: kennytm <kennytm@gmail.com>
2019-07-18 12:20:34 -05:00
bors
311376d30d Auto merge of #62782 - Mark-Simulacrum:rollup-1hz5ya6, r=Mark-Simulacrum
Rollup of 15 pull requests

Successful merges:

 - #61926 (Fix hyperlinks in From impls between Vec and VecDeque)
 - #62615 ( Only error about MSVC + PGO + unwind if we're generating code)
 - #62696 (Check that trait is exported or public before adding hint)
 - #62712 (Update the help message on error for self type)
 - #62728 (Fix repeated wording in slice documentation)
 - #62730 (Consolidate hygiene tests)
 - #62732 (Remove last use of mem::uninitialized from std::io::util)
 - #62740 (Add missing link to Infallible in TryFrom doc)
 - #62745 (update data_layout and features for armv7-wrs-vxworks)
 - #62749 (Document link_section arbitrary bytes)
 - #62752 (Disable Z3 in LLVM build)
 - #62764 (normalize use of backticks in compiler messages for librustc/lint)
 - #62774 (Disable simd_select_bitmask test on big endian)
 - #62777 (Self-referencial type now called a recursive type)
 - #62778 (Emit artifact notifications for dependency files)

Failed merges:

 - #62746 ( do not use mem::uninitialized in std::io)

r? @ghost
2019-07-18 17:03:37 +00:00
Vadim Kaushan
bb9bf0ca9a
Add riscv32i-unknown-none-elf target 2019-07-18 18:37:23 +03:00
Mark Rousskov
396903b781
Rollup merge of #62778 - jsgf:notify-dep-info, r=petrochenkov
Emit artifact notifications for dependency files

Emit `dep-info` artifact notifications for `.d` files.
2019-07-18 11:29:58 -04:00
Mark Rousskov
4544b4d288
Rollup merge of #62777 - gilescope:self-referencial-to-recursion, r=eddyb
Self-referencial type now called a recursive type

As per Boat's suggestion - #62539, this makes the error message clearer.
2019-07-18 11:29:57 -04:00
Mark Rousskov
ed83734a3b
Rollup merge of #62774 - smaeul:pr/simd-tests, r=petrochenkov
Disable simd_select_bitmask test on big endian

Per #59356 it is expected that the interpretation of the bitmask depends
on target endianness.

Closes #59356
2019-07-18 11:29:55 -04:00
Mark Rousskov
0ae9048494
Rollup merge of #62764 - fakenine:normalize_use_of_backticks_compiler_messages_p7, r=alexreg
normalize use of backticks in compiler messages for librustc/lint

https://github.com/rust-lang/rust/issues/60532
2019-07-18 11:29:53 -04:00
Mark Rousskov
c4977ef217
Rollup merge of #62752 - nikic:llvm-disable-z3, r=alexcrichton
Disable Z3 in LLVM build

Avoid building LLVM with Z3 if it happens to be installed.

Fixes #62750.

r? @alexcrichton
2019-07-18 11:29:52 -04:00
Mark Rousskov
9c08b2b60e
Rollup merge of #62749 - chocol4te:fix_60633, r=estebank
Document link_section arbitrary bytes

Closes #60633.
2019-07-18 11:29:50 -04:00
Mark Rousskov
ee9d4e310e
Rollup merge of #62745 - BaoshanPang:master, r=nikic
update data_layout and features for armv7-wrs-vxworks
2019-07-18 11:29:48 -04:00
Mark Rousskov
d961eb6034
Rollup merge of #62740 - lzutao:patch-2, r=alexcrichton
Add missing link to Infallible in TryFrom doc
2019-07-18 11:29:46 -04:00
Mark Rousskov
5d4681f76a
Rollup merge of #62732 - nathanwhit:fix_mem_uninit, r=Amanieu
Remove last use of mem::uninitialized from std::io::util

Addresses #62397 for std::io::util
2019-07-18 11:29:45 -04:00
Mark Rousskov
aa31ca7128
Rollup merge of #62730 - matthewjasper:hygiene-tests, r=petrochenkov
Consolidate hygiene tests

Some general clean-up extracted out from another PR
2019-07-18 11:29:43 -04:00
Mark Rousskov
831d33b8b0
Rollup merge of #62728 - DutchGhost:fix-double-wording, r=jonas-schievink
Fix repeated wording in slice documentation

Changes `of the slice of the slice` to `of the slice` in the chunk- and friends documentation of slices
2019-07-18 11:29:42 -04:00
Mark Rousskov
988a4bad90
Rollup merge of #62712 - limira:self-type-help, r=estebank
Update the help message on error for self type

Fix #62609
2019-07-18 11:29:40 -04:00
Mark Rousskov
df21a6f040
Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank
Check that trait is exported or public before adding hint

Closes #62194.

This PR checks the `AccessLevels` of a trait to check whether adding the intercrate ambiguity hint is valid or not.

I am unsure of both the use of `.unwrap()` as well as removing hints for [downstream *and* [upstream](92b0f52584/src/librustc/traits/select.rs (L112-L142)).
2019-07-18 11:29:39 -04:00
Mark Rousskov
cc16d04869
Rollup merge of #62615 - wesleywiser:pgo_error, r=nagisa
Only error about MSVC + PGO + unwind if we're generating code

In #61853, we changed the error when using PGO & MSVC toolchain & panic=unwind into a warning. However, in the compiler team meeting on 2019-07-11, we found that not everybody was in favor of that change because of the possibility of broken binaries.

This PR reverts that change so this is again an error. However, to work around an [issue the Firefox team is having](https://github.com/rust-lang/rust/issues/61002#issuecomment-500075739), we will only emit the error if we're actually supposed to generate a binary. If the `rustc` is invoked with `--print` arguments (which means that no binary will actually be emitted), then we won't emit the error because there is not a possibility of the issue occurring.

cc @EricRahm @nikomatsakis @pnkfelix @Centril
2019-07-18 11:29:37 -04:00
Mark Rousskov
7fc80b6bc6
Rollup merge of #61926 - scottmcm:vec-vecdeque, r=Mark-Simulacrum
Fix hyperlinks in From impls between Vec and VecDeque

I'd been trying to link them, but apparently actually just added brackets: <https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#impl-From%3CVec%3CT%3E%3E>

~~This reverts commit 5168f5d220d0b30d322f254f51142931a9054056.~~

~~(I'd previously tried to make relative links, but those failed linkcheck because the types are exported at different levels.  So just skip the links -- they're already linked in the function signature anyway.)~~

This makes the links now work.
2019-07-18 11:29:36 -04:00
Mark Mansi
8940a27437 embedded-book failures don't block beta 2019-07-18 10:24:20 -05:00
Who? Me?!
17c4084eba
Update src/ci/docker/x86_64-gnu-tools/checkregression.py
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-07-18 10:02:59 -05:00
Who? Me?!
8b87162af2
Update src/ci/docker/x86_64-gnu-tools/checktools.sh
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-07-18 08:57:55 -05:00
Ralf Jung
b2d05dba41 add a few comments for the toolstate stuff 2019-07-18 08:47:25 -05:00
Who? Me?!
8070bb828c
Regressions ok for miri too
Co-Authored-By: kennytm <kennytm@gmail.com>
2019-07-18 08:42:39 -05:00
Mateusz Mikuła
124f6ef7cd Fix clippy::len_zero warnings 2019-07-18 15:14:56 +02:00
Mateusz Mikuła
f93032c818 Fix clippy::clone_on_copy warnings 2019-07-18 15:14:56 +02:00
bors
4ed008a420 Auto merge of #62682 - alessandrod:issue-58375, r=eddyb
Normalize type parameters in create_mono_items_for_default_impls.

Fix for https://github.com/rust-lang/rust/issues/58375. I've added a test in `src/tests/run-pass` to reproduce the bug, not sure that's the best place for it.

See https://github.com/rust-lang/rust/issues/58375#issuecomment-509156977 for more context.
2019-07-18 13:09:01 +00:00
Vadim Petrochenkov
1b4fbfca41 resolve: Support resolving macro paths without macro kind restrictions 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
a7726ce086 resolve: Attempt to resolve unresolved paths in macro namespace 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
3845a08a55 resolve: Move some common code into the scope visitor 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
329c05251a resolve: Visit all scopes to collect suggestion candidates for unresolved macros 2019-07-18 13:42:45 +03:00