Commit Graph

86257 Commits

Author SHA1 Message Date
Pietro Albini
7130947918
Rollup merge of #55857 - andjo403:rmdep, r=Mark-Simulacrum
remove unused dependency
2018-11-18 23:24:36 +01:00
Pietro Albini
4a52c5625c
Rollup merge of #55834 - ogoffart:union-abi, r=eddyb
Forward the ABI of the non-zero sized fields of an union if they have the same ABI

This is supposed to fix the performence regression of using MaybeUninit in
https://github.com/rust-lang/rust/pull/54668
2018-11-18 23:24:34 +01:00
Pietro Albini
9c3e8d340f
Rollup merge of #55827 - ljedrz:various_stashed, r=alexcrichton
A few tweaks to iterations/collecting

- simplify and speed up `dot::GraphWalk::nodes` for `cfg::CFG`
- `reserve` the capacity for `edges` in `DepGraph::query`
- collect directly to a `HirVec` in `LoweringContext::lower_attrs`
- fix overallocation in `OnDiskCache::serialize`
- preallocate the `new_partitioning` vector in `merge_codegen_units`
- simplify `impl FromHex for str`
- improve the creation of `self_arg_names` in `impl MethodDef`
2018-11-18 23:24:33 +01:00
Pietro Albini
21ff709954
Rollup merge of #55564 - smaeul:test-fixes-2, r=alexcrichton
test/linkage-visibility: Ignore on musl targets

DynamicLibrary uses libc's dlsym() function internally to find symbols.
Some implementations of dlsym(), like musl's, only look at dynamically-
exported symbols, as found in shared libraries. To also export symbols
from the main executable, pass --export-dynamic to the linker.

(Plus see [here](https://stackoverflow.com/questions/4184017) and [here](https://stackoverflow.com/questions/6121838) for examples of where this is necessary on glibc as well.)
2018-11-18 23:24:32 +01:00
Pietro Albini
36e1d9f3ed
Rollup merge of #55562 - smaeul:powerpc-linux-musl, r=alexcrichton
Add powerpc- and powerpc64-unknown-linux-musl targets

Add targets for musl on 32-bit and 64-bit powerpc. This requires some ABI fixes, as musl [uses the ELFv2 ABI on regardless of endianness](http://git.musl-libc.org/cgit/musl/tree/configure?id=8084d6ab57cdb0b8f328d3cdbad3b9d09eaaee04#n638). At the moment, powerpc64 support requires [an LLVM patch](https://reviews.llvm.org/D52013) to select the correct ABI; or I can add [a patch to Rust's LLVM backend](e8eaa2afd5) to always choose the right ABI.

Both architectures are able to run an extended bootstrap, and with some test fixes (e.g. #55561), there are no architecture-dependent test failures on powerpc64 (most failures in `src/test` are existing musl-host-related issues).
2018-11-18 23:24:31 +01:00
bors
a9b791b3c0 Auto merge of #55672 - RalfJung:miri-extern-types, r=eddyb
miri: accept extern types in structs if they are the only field

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

Cc @oli-obk @eddyb https://github.com/rust-lang/rust/issues/43467
2018-11-18 22:19:53 +00:00
Артём Павлов [Artyom Pavlov]
6357021294
fix test 2018-11-19 01:01:06 +03:00
Артём Павлов [Artyom Pavlov]
6ad61b9c3b
tests 2018-11-18 23:14:52 +03:00
Niko Matsakis
a5b4cb2991 remove "approx env bounds" if we already know from trait 2018-11-18 15:00:34 -05:00
Артём Павлов [Artyom Pavlov]
126b71f690
revert 2018-11-18 21:39:23 +03:00
bors
13c9439925 Auto merge of #56017 - alexcrichton:debug-test, r=alexcrichton
std: Add debugging for a failing test on appveyor

I'm not sure why this is failing, so let's hopefully get some more
information to help investigation!
2018-11-18 17:27:45 +00:00
bors
d1c2cbf90a Auto merge of #55999 - alexcrichton:update-cargo, r=nrc
Update Cargo submodule

Brings in some fixes and stabilizations!
2018-11-18 14:33:03 +00:00
Vadim Petrochenkov
38025e0dca Fix rebase 2018-11-18 14:41:06 +03:00
Vadim Petrochenkov
139d109241 Add a couple more tests + address review comments 2018-11-18 13:58:40 +03:00
Vadim Petrochenkov
59464709f7 resolve: Refactor away DeterminacyExt 2018-11-18 13:58:39 +03:00
Vadim Petrochenkov
a5f9bd02b1 resolve: Future-proof against imports referring to local variables and generic parameters 2018-11-18 13:58:39 +03:00
Vadim Petrochenkov
4fc3c13e32 resolve: Avoid sentence breaks in diagnostics 2018-11-18 13:58:36 +03:00
Vadim Petrochenkov
f492e9421f resolve: Support resolving macros without leaving traces 2018-11-18 13:57:37 +03:00
Vadim Petrochenkov
0e8a97f8e7 resolve: Avoid marking extern crate items as used in certain cases 2018-11-18 13:57:04 +03:00
Vadim Petrochenkov
8e88c3470a resolve: Reintroduce feature gate for uniform paths in imports 2018-11-18 13:57:04 +03:00
Vadim Petrochenkov
a38f903114 Fix ICEs from imports of items not defined in modules 2018-11-18 13:57:03 +03:00
Vadim Petrochenkov
cfd762954b resolve: Tweak some articles in ambiguity diagnostics 2018-11-18 13:57:03 +03:00
Vadim Petrochenkov
cfe81559ee resolve: Recover "did you mean" suggestions in imports 2018-11-18 13:57:01 +03:00
Vadim Petrochenkov
4c5d822a8b resolve: Check resolution consistency for import paths and multi-segment macro paths 2018-11-18 13:55:58 +03:00
Vadim Petrochenkov
07af4ec7a2 resolve: Resolve single-segment imports using in-scope resolution on 2018 edition 2018-11-18 13:51:43 +03:00
Vadim Petrochenkov
1cfd08c0c4 resolve: More precise determinacy tracking during import/macro resolution 2018-11-18 13:51:42 +03:00
Vadim Petrochenkov
f0ea1c6f1e resolve: Improve diagnostics for resolution ambiguities 2018-11-18 13:51:40 +03:00
Vadim Petrochenkov
9d7d9ada6d resolve: Simplify ambiguity checking for built-in attributes 2018-11-18 13:51:17 +03:00
Vadim Petrochenkov
e6739fe274 resolve: Resolve multi-segment imports using in-scope resolution on 2018 edition 2018-11-18 13:51:13 +03:00
Vadim Petrochenkov
67feeebfad resolve: Stop generating uniform path canaries 2018-11-18 13:49:31 +03:00
Scott McMurray
cdb1a799f8 Add VecDeque::resize_with 2018-11-17 22:48:29 -08:00
Alex Crichton
7a99b6db15 std: Add debugging for a failing test on appveyor
I'm not sure why this is failing, so let's hopefully get some more
information to help investigation!
2018-11-17 19:38:53 -08:00
Igor Matuszewski
5fc63ce480 docs: Add missing backtick in object_safety.rs docs
Closes #56019.
2018-11-17 17:40:58 +01:00
bors
f37247f885 Auto merge of #56003 - nikomatsakis:issue-54467-infer-outlives-bounds-and-trait-objects, r=eddyb
do not propagate inferred bounds on trait objects if they involve `Self`

Fixes #54467, which is a Rust 2018 Release blocking issue.

r? @eddyb
2018-11-17 13:19:42 +00:00
giacomo
8e13e433c6 tidy check fix 2018-11-17 12:28:04 +01:00
giacomo
2b7c3fb725 add test for #[test] attribute only allowed on non associated functions 2018-11-17 11:39:58 +01:00
Ralf Jung
25d46f3091 add comment explaining why what we do is legal 2018-11-17 10:20:28 +01:00
Alex Crichton
01127ca666 Update Cargo submodule
Brings in some fixes and stabilizations!
2018-11-17 00:53:31 -08:00
Ralf Jung
a7b312f825 erase the tag on casts involving (raw) pointers 2018-11-17 09:08:30 +01:00
Sergio Benitez
78eb516dda Ignore non-semantic tokens for 'probably_eq' streams. 2018-11-16 23:37:23 -08:00
bors
f6e9485bfc Auto merge of #55627 - sunfishcode:cg-llvm-gen, r=nikomatsakis
rustc_codegen_llvm: traitification of LLVM-specific CodegenCx and Builder methods

This PR is the continuation of #54012 and earlier PRs, in the grand plan of #45274 to allow for multiple codegen backends.

High-level summary: interpose a set of traits between Rust's codegen logic and the LLVM APIs, allowing another backend to implement the traits and share most of the codegen logic. These traits are currently somewhat LLVM-specific, but once this refactoring is in place, they can evolve to be more general.

See [this README](756f84d7ce/src/librustc_codegen_ssa/README.md) for a writeup on the current trait organization.
2018-11-17 04:10:52 +00:00
Ralf Jung
41434e001b avoid shared ref in UnsafeCell::get 2018-11-16 22:17:26 +01:00
bors
ee821736cc Auto merge of #55936 - nrc:save-rename, r=eddyb
save-analysis: be even more aggressive about ignorning macro-generated defs

r? @eddyb
2018-11-16 21:11:24 +00:00
Ralf Jung
0c0478d57a adjust remaining tests 2018-11-16 22:04:14 +01:00
Benoît C
c1221e2072
Replace data.clone() by Arc::clone(&data) in mutex doc.
Arc::clone(&from) is considered as more idiomatic because it conveys more explicitly the meaning of the code.
2018-11-16 15:34:12 -05:00
Ralf Jung
303dbccf04 CTFE: dynamically make sure we do not call non-const-fn 2018-11-16 18:05:08 +01:00
Niko Matsakis
6575988d8e handle trait objects formed from traits with Self::Foo: 'a clauses 2018-11-16 09:37:33 -05:00
Niko Matsakis
0d744ec6ec improve debug output related to bound calculation 2018-11-16 09:37:32 -05:00
Eduard-Mihai Burtescu
756f84d7ce [eddyb] rustc_codegen_llvm: remove unused parametrization of CodegenCx and Builder over Values. 2018-11-16 15:08:18 +02:00
Eduard-Mihai Burtescu
0b569249c8 [eddyb] rustc_codegen_ssa: rename interfaces to traits. 2018-11-16 15:08:18 +02:00