about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-01-27Auto merge of #47690 - estebank:for-block-277, r=nikomatsakisbors-54/+69
For E0277 on `for` loops, point at the "head" expression When E0277's span points at a `for` loop, the actual issue is in the element being iterated. Instead of pointing at the entire loop, point only at the first line (when possible) so that the span ends in the element for which E0277 was triggered.
2018-01-27Auto merge of #47571 - FenrirWolf:libunwind, r=alexcrichtonbors-2/+1
Match libunwind's EABI selection with libpanic_unwind Currently, the `libunwind` crate will only select the ARM EABI if it is compiling for ARM/Linux or Android targets. `libpanic_unwind`, however, will choose the ARM EABI if the target arch is ARM and the OS is not iOS. This means that if one tries to enable unwinding for a non-standard ARM target (such as implementing a custom stdlib via Xargo, for example), then the two crates can potentially disagree about which EABI is being targeted. This PR makes `libunwind` use the [same logic](https://github.com/rust-lang/rust/blob/master/src/libpanic_unwind/gcc.rs#L139-L146) as `libpanic_unwind` when choosing the EABI. I noticed there are a few comments about certain functions only differing on Android or ARM/Linux, but I *think* that those differences apply to the ARM EABI in general. Let me know if I'm wrong about that.
2018-01-26Don't add "in this macro invocation" label to desugared spansEsteban Küber-20/+5
2018-01-26Modify spans of expanded expressionEsteban Küber-58/+38
Modify the spans used for `for`-loop expression expansion, instead of creating a new span during error creation.
2018-01-26Auto merge of #47748 - alexcrichton:rollup, r=alexcrichtonbors-2399/+3679
Rollup of 19 pull requests - Successful merges: #47415, #47437, #47439, #47453, #47460, #47502, #47529, #47600, #47607, #47618, #47626, #47656, #47668, #47696, #47701, #47705, #47710, #47711, #47719 - Failed merges: #47455, #47521
2018-01-26Ignore a test on emscriptenAlex Crichton-0/+2
2018-01-26Fix a test case on WindowsAlex Crichton-0/+5
2018-01-26Merge branch 'mlsm' of https://github.com/dotdash/rust into rollupAlex Crichton-10/+76
2018-01-26Merge branch 'beta-prerelease' of https://github.com/cuviper/rust into rollupAlex Crichton-1/+5
2018-01-26Merge branch 'android-run-pass' of https://github.com/malbarbo/rust into rollupAlex Crichton-24/+5
2018-01-26Merge branch 'fix-regression' of https://github.com/estebank/rust into rollupAlex Crichton-41/+86
2018-01-26Merge branch 'rustdoc_masked' of https://github.com/ollie27/rust into rollupAlex Crichton-27/+87
2018-01-26Merge branch 'simd-always-mem' of https://github.com/alexcrichton/rust into ↵Alex Crichton-3/+207
rollup
2018-01-26Merge branch 'llvm5-indirect-deref' of https://github.com/cuviper/rust into ↵Alex Crichton-7/+9
rollup
2018-01-26Merge branch 'explain' of https://github.com/estebank/rust into rollupAlex Crichton-44/+231
2018-01-26Merge branch 'no-stderr-sink' of https://github.com/Zoxc/rust into rollupAlex Crichton-97/+90
2018-01-26Shorten another test path for MSVCAlex Crichton-2/+2
2018-01-26Auto merge of #47252 - Zoxc:backtrace-win, r=alexcrichtonbors-50/+62
Print inlined functions on Windows Split from https://github.com/rust-lang/rust/pull/45637 r? @alexcrichton
2018-01-26Upgrade LLVM to incorporate a fix for #47364Björn Steinbrink-1/+67
Fixes #47364
2018-01-25Ignore an i128 test on emscriptenAlex Crichton-0/+2
2018-01-26Update rlstopecongiro-9/+9
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-97/+90
errors
2018-01-26Print inlined functions on WindowsJohn Kåre Alsaker-50/+62
2018-01-25Shorten a filename for MSVCAlex Crichton-2/+2
2018-01-25Call non-git beta builds simply x.y.z-betaJosh Stone-1/+5
We can't use git commands to compute a prerelease version when we're building from a source tarball, or if git is otherwise unavailable. We'll just call such builds `x.y.z-beta`, without a prerelease.
2018-01-25Revert update of the i686-freebsd builderAlex Crichton-1/+1
Looks like llvm 4.0.0 isn't read for that either.
2018-01-25Remove stray src/llvm-emscripten moduleAlex Crichton-0/+0
Accidentally added in e9a64996b
2018-01-25Merge branch 'configure-lto' of https://github.com/alexcrichton/rust into rollupAlex Crichton-115/+221
2018-01-25Merge branch 'cache-ty-collect' of https://github.com/michaelwoerister/rust ↵Alex Crichton-18/+38
into rollup
2018-01-25Rollup merge of #47719 - malbarbo:run-pass-arch-powerpc, r=alexcrichtonAlex Crichton-0/+3
Add powerpc to run-pass/conditional-compile-arch.rs
2018-01-25Rollup merge of #47711 - alexcrichton:update-compiler-builtins, r=nikomatsakisAlex Crichton-0/+0
Update compiler-builtins submodule No sense of urgency, just wanted to make sure we don't lag too far behind!
2018-01-25Rollup merge of #47710 - alexcrichton:llvm-6-compat, r=nikomatsakisAlex Crichton-41/+55
First round of LLVM 6.0.0 compatibility This includes a number of commits for the first round of upgrading to LLVM 6. There are still [lingering bugs](https://github.com/rust-lang/rust/issues/47683) but I believe all of this will nonetheless be necessary!
2018-01-25Rollup merge of #47705 - pietroalbini:fix-47673, r=petrochenkovAlex Crichton-5/+21
Fix ICE when use trees have multiple empty nested groups The issue was caused by an oversight of mine in the original use_nested_groups PR, where different paths were resolved with the same `NodeId` in some cases (such as in `use {{}, {}};`). Fixes #47673 r? @petrochenkov
2018-01-25Rollup merge of #47701 - Manishearth:intra-fixes, r=QuietMisdreavusAlex Crichton-42/+158
Fixes for intra-doc-links Turn errors into warnings, also handle methods, trait items, and variants. r? @killercup @QuietMisdreavus
2018-01-25Rollup merge of #47696 - Zoxc:variance-rg, r=nikomatsakisAlex Crichton-49/+2
Make use of the implemented red/green algorithm for variance r? @michaelwoerister
2018-01-25Rollup merge of #47668 - nikomatsakis:issue-47511, r=eddybAlex Crichton-15/+71
do not ICE when return type includes unconstrained anon region It turns out that this *can* happen after all, if the region is only used in projections from the input types. Fixes https://github.com/rust-lang/rust/issues/47511 r? @eddyb
2018-01-25Rollup merge of #47656 - ishitatsuyuki:patch-1, r=nikomatsakisAlex Crichton-20/+39
[perf] Use std based dedup in projection Unstable sort was added recently, and the code that is being modified is 3 years old. As quicksort doesn't allocate it will likely perform as well as, or better than linear search. I didn't benchmark. Have a perf run.
2018-01-25Rollup merge of #47626 - eddyb:one-less-unwrap, r=nagisaAlex Crichton-26/+30
rustc_trans: remove an unwrap by replacing a bool with Result. Prompted by @shepmaster. r? @nagisa
2018-01-25Rollup merge of #47618 - mrhota:dw_at_noreturn, r=michaelwoeristerAlex Crichton-2/+49
Teach rustc about DW_AT_noreturn and a few more DIFlags We achieve two small things with this PR: 1. We provide definitions for a few additional llvm debuginfo flags 1. We _use_ one of these new flags, `FlagNoReturn`, and add it to debuginfo for functions with the never return type (`!`).
2018-01-25Make 3 run-pass tests works on android (aarch64 and x86)Marco A L Barbosa-24/+5
2018-01-25rustc: SIMD types use pointers in Rust's ABIAlex Crichton-3/+207
This commit changes the ABI of SIMD types in the "Rust" ABI to unconditionally be passed via pointers instead of being passed as immediates. This should fix a longstanding issue, #44367, where SIMD-using programs ended up showing very odd behavior at runtime because the ABI between functions was mismatched. As a bit of a recap, this is sort of an LLVM bug and sort of an LLVM feature (today's behavior). LLVM will generate code for a function solely looking at the function it's generating, including calls to other functions. Let's then say you've got something that looks like: ```llvm define void @foo() { ; no target features enabled call void @bar(<i64 x 4> zeroinitializer) ret void } define void @bar(<i64 x 4>) #0 { ; enables the AVX feature ... } ``` LLVM will codegen the call to `bar` *without* using AVX registers becauase `foo` doesn't have access to these registers. Instead it's generated with emulation that uses two 128-bit registers. The `bar` function, on the other hand, will expect its argument in an AVX register (as it has AVX enabled). This means we've got a codegen problem! Comments on #44367 have some more contexutal information but the crux of the issue is that if we want SIMD to work in general we'll need to ensure that whenever a function calls another they ABI of the arguments being passed is in agreement. One possible solution to this would be to insert "shim functions" where whenever a `target_feature` mismatch is detected the compiler inserts a shim function where you pass arguments via memory to the shim and then the shim loads the values and calls the target function (where the shim and the target have the same target features enabled). This unfortunately is quite nontrivial to implement in rustc today (especially when accounting for function pointers and such). This commit takes a different solution, *always* passing SIMD arguments through memory instead of passing as immediates. This strategy solves the problem at the LLVM layer because the ABI between two functions never uses SIMD registers. This also shouldn't be a hit to performance because SIMD performance is thought to often rely on inlining anyway, where a `call` instruction, even if using SIMD registers, would be disastrous to performance regardless. LLVM should then be more than capable of fixing all our memory usage to use registers instead after enough inlining has been performed. Note that there's a few caveats to this commit though: * The "platform intrinsic" ABI is omitted from "always pass via memory". This ABI is used to define intrinsics like `simd_shuffle4` where LLVM and rustc need to have the arguments as an immediate. * Additionally this commit does *not* fix the `extern` ("C") ABI. This means that the bug in #44367 can still happen when using non-Rust-ABI functions. My hope is that before stabilization we can ban and/or warn about SIMD types in these functions (as AFAIK there's not much motivation to belong there anyway), but I'll leave that for a later commit and if this is merged I'll file a follow-up issue. All in all this... Closes #44367
2018-01-25Add description to field and methodEsteban Küber-0/+8
2018-01-25Fix regression: account for impl methods in arg count mismatch errorEsteban Küber-41/+86
2018-01-25Rollup merge of #47600 - varkor:empty-never-array, r=eddybAlex Crichton-4/+32
Fix type inhabitedness check for arrays Arrays of uninhabited types were considered to also be uninhabited if their length had not been evaluated, causing unsoundness. Fixes #47563. r? @eddyb
2018-01-25Rollup merge of #47529 - nikomatsakis:impl-trait-issue-38064, r=cramertjAlex Crichton-2/+58
track recursion limit when expanding existential impl trait r? @cramertj
2018-01-25Rollup merge of #47502 - petrochenkov:label, r=eddybAlex Crichton-202/+203
AST/HIR: Add a separate structure for labels
2018-01-25Rollup merge of #47460 - Mark-Simulacrum:bootstrap-check, r=alexcrichtonAlex Crichton-1486/+1670
Add ./x.py check src/{libstd,libtest,librustc} This currently only supports a limited subset of the full compilation, but is likely 90% of what people will want and is possible without building a full compiler (and also building LLVM). In theory, this means that contributors who don't want to build LLVM now have an easy way to compile locally, though running tests won't work.
2018-01-25Rollup merge of #47453 - pftbest:nointas, r=alexcrichtonAlex Crichton-52/+77
Fix no_integrated_as option to work with new codegen architecture. Old implementation called the assembler once per crate, but we need to call it for each object file instead, because a single crate can now have more than one object file. This patch fixes issue #45836 (Can't compile core for msp430 in release mode) This change can be tested on x86_64 using ```sh export RUSTFLAGS="-C no_integrated_as -C save_temps" ``` r? @alexcrichton cc @japaric
2018-01-25Rollup merge of #47439 - eddyb:issue-45662, r=nagisaAlex Crichton-10/+10
rustc_trans: ignore trailing padding larger than 8 bytes. Fixes #45662 by ignoring a missing second register component, as it could be entirely padding.
2018-01-25Rollup merge of #47437 - eddyb:issue-38763, r=nagisaAlex Crichton-55/+64
rustc_trans: take into account primitives larger than 8 bytes. Fixes #38763 by marking all "eightbytes" covered by a primitive appropriately, not just the first.