about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-08-15Start adding an `aarch64-pc-windows-msvc` targetAlex Crichton-33/+201
This commit adds the necessary definitions for target specs and such as well as the necessary support in libstd to compile basic `aarch64-pc-windows-msvc` binaries. The target is not currently built on CI, but it can be built locally with: ./configure --target=aarch64-pc-windows-msvc --set rust.lld ./x.py build src/libstd --target aarch64-pc-windows-msvc Currently this fails to build `libtest` due to a linker bug (seemingly in LLD?) which hasn't been investigate yet. Otherwise though with libstd you can build a hello world program (linked with LLD). I've not tried to execute it yet, but it at least links! Full support for this target is still a long road ahead, but this is hopefully a good stepping stone to get started. Points of note about this target are: * Currently defaults to `panic=abort` as support is still landing in LLVM for SEH on AArch64. * Currently defaults to LLD as a linker as I was able to get farther with it than I was with `link.exe`
2018-08-15Auto merge of #53400 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-57/+205
Rollup of 8 pull requests Successful merges: - #52453 (improve diagnostics for tests with custom return values) - #53271 (use ? to simplify `TransitiveRelation.maybe_map`) - #53279 (Extend documentation of `rustc_on_unimplemented`) - #53342 (fix error for unsized packed struct field) - #53344 (Add doc examples for std::alloc::{alloc,alloc_zeroed}.) - #53368 (Ignore test that fails on stage1) - #53388 (Fix links' color) - #53396 (Fix since of Iterator::flatten to be a proper semver) Failed merges: r? @ghost
2018-08-15Rollup merge of #53396 - matklad:fix-flatten-since, r=varkorGuillaume Gomez-7/+7
Fix since of Iterator::flatten to be a proper semver r? @kennytm
2018-08-15Rollup merge of #53388 - GuillaumeGomez:fix-links-color, r=frewsxcvGuillaume Gomez-9/+15
Fix links' color Fixes #53375. Problem was coming from the minifier. r? @frewsxcv
2018-08-15Rollup merge of #53368 - matthewjasper:only-stage-2, r=varkorGuillaume Gomez-15/+16
Ignore test that fails on stage1 The error code is not emitted on stage1, so ignore this test there.
2018-08-15Rollup merge of #53344 - frewsxcv:frewsxcv-doc-ptr, r=ollie27Guillaume Gomez-0/+31
Add doc examples for std::alloc::{alloc,alloc_zeroed}. None
2018-08-15Rollup merge of #53342 - RalfJung:unsized-packed, r=cramertjGuillaume Gomez-17/+32
fix error for unsized packed struct field It was really confusing to be told "only the last field of a struct may have a dynamically sized type" when only the last field *was* unsized.
2018-08-15Rollup merge of #53279 - estebank:on-unimplemented-doc, r=GuillaumeGomezGuillaume Gomez-2/+95
Extend documentation of `rustc_on_unimplemented`
2018-08-15Rollup merge of #53271 - llogiq:simplify-maybe-map, r=joshtriplettGuillaume Gomez-6/+1
use ? to simplify `TransitiveRelation.maybe_map` I think this looks much clearer than the original.
2018-08-15Rollup merge of #52453 - srijs:fix-52436, r=TimNNGuillaume Gomez-1/+8
improve diagnostics for tests with custom return values This is an attempt at getting the ball rolling to improve the diagnostics for test functions that return custom `impl Termination` values (see #52436). An alternative could be to use `eprintln!`, but including this in the panic message felt nicely consistent with how failing test assertions would be reported. Let me know what you think!
2018-08-15Auto merge of #53164 - davidtwco:issue-52663-span-decl-captured-variables, ↵bors-63/+153
r=nikomatsakis Provide span for declaration of captured variables Part of #52663. r? @nikomatsakis
2018-08-15Fix since of Iterator::flatten to be a proper semverAleksey Kladov-7/+7
2018-08-15Auto merge of #53237 - overdrivenpotato:wasm-export-table, r=alexcrichtonbors-0/+3
Export WASM table by default This allows loading a rust-generated `.wasm` binary in a host and using the exported table much like the `memory` export.
2018-08-15Fix links' colorGuillaume Gomez-9/+15
2018-08-15Auto merge of #53133 - Zoxc:gen-int, r=eddybbors-1/+42
Record adjustments and original type for expressions in the generator interior Fixes https://github.com/rust-lang/rust/issues/50878 and https://github.com/rust-lang/rust/issues/52398. r? @eddyb
2018-08-15Auto merge of #53367 - ehuss:update-cargo, r=alexcrichtonbors-21/+43
Update cargo - Update transitioning url (rust-lang/cargo#5889) - Resolve some clippy lint warnings (rust-lang/cargo#5884) - Don't kill child processes on normal exit on Windows (rust-lang/cargo#5887) - fix a bunch of clippy warnings (rust-lang/cargo#5876) - Add support for rustc's --error-format short (rust-lang/cargo#5879) - Support JSON with rustdoc. (rust-lang/cargo#5878) - Fix rustfmt instructions in CONTRIBUTING.md (rust-lang/cargo#5880) - Allow `cargo run` in workspaces. (rust-lang/cargo#5877) - Change target filters in workspaces. (rust-lang/cargo#5873) - Improve verbose console and log for finding git repo in package check (rust-lang/cargo#5858) - Meta rename (rust-lang/cargo#5871) - fetch: skip target tests when cross_compile is disabled (rust-lang/cargo#5870) - Fully capture rustc and rustdoc output when -Zcompile-progress is passed (rust-lang/cargo#5862) - Fix test --example docs. (rust-lang/cargo#5867) - Add a feature to build a vendored OpenSSL (rust-lang/cargo#5865)
2018-08-15fix error for unsized packed struct fieldRalf Jung-17/+32
2018-08-15Auto merge of #53212 - sunjay:nll-raw-cast, r=nikomatsakisbors-1/+49
NLL - Prevent where clauses from extending the lifetime of bindings Fixes https://github.com/rust-lang/rust/issues/53123 r? @nikomatsakis
2018-08-14Update cargoEric Huss-21/+43
2018-08-15Auto merge of #52716 - tromey:rustup-lldb, r=alexcrichtonbors-18/+205
Add lldb to the build This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-08-14Add doc examples for std::alloc::{alloc,alloc_zeroed}.Corey Farwell-0/+31
2018-08-14Add lldb to the buildTom Tromey-18/+205
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-08-15Auto merge of #52928 - Mark-Simulacrum:borrowck-cleanup, r=cramertjbors-85/+31
(old) borrowck cleanup Primarily moves dataflow code based on CFG to borrowck; this is mostly so we don't forget to delete it once it becomes unused after we fully move to MIR borrowck.
2018-08-14Auto merge of #52936 - felixrabe:patch-1, r=alexcrichtonbors-0/+28
Document #39364 – Panic in mpsc::Receiver::recv_timeout I can still reproduce #39364 with the example code at https://github.com/rust-lang/rust/issues/39364#issuecomment-320637702. I'm opening this PR in an attempt to document this bug as a known issue in [libstd/sync/mpsc/mod.rs](https://github.com/rust-lang/rust/blob/master/src/libstd/sync/mpsc/mod.rs). Inputs very much welcome. ([Nightly docs for `recv_timeout`.](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Receiver.html?search=#method.recv_timeout))
2018-08-14Ignore test that fails on stage1Matthew Jasper-15/+16
2018-08-14Auto merge of #53361 - Manishearth:clippyup, r=nrcbors-5/+5
Update clippy r? @kennytm @nrc
2018-08-14Update clippyManish Goregaokar-5/+5
2018-08-14Auto merge of #53354 - kennytm:rollup, r=kennytmbors-229/+486
Rollup of 11 pull requests Successful merges: - #53112 (pretty print BTreeSet) - #53208 (Don't panic on std::env::vars() when env is null.) - #53226 (driver: set the syntax edition in phase 1) - #53229 (Make sure rlimit is only ever increased) - #53233 (targets: aarch64: Add bare-metal aarch64 target) - #53239 (rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.) - #53246 (A few cleanups) - #53257 (Idiomatic improvements to IP method) - #53274 (Remove statics field from CodegenCx) - #53290 (Make LLVM emit assembly comments with -Z asm-comments) - #53317 (Mark prior failure to avoid ICE)
2018-08-14Improved how upvars are detected when presenting errors using prefixes.David Wood-27/+68
2018-08-14Rollup merge of #53317 - estebank:abolish-ice, r=oli-obkkennytm-0/+46
Mark prior failure to avoid ICE Fix #53251
2018-08-14Rollup merge of #53290 - whitequark:fix-35741, r=nagisakennytm-2/+9
Make LLVM emit assembly comments with -Z asm-comments Fixes #35741, and makes `-Z asm-comments` actually do something useful. Before: ``` .section .text.main,"ax",@progbits .globl main .p2align 4, 0x90 .type main,@function main: .cfi_startproc pushq %rax .cfi_def_cfa_offset 16 movslq %edi, %rax leaq _ZN1t4main17he95a7d4f1843730eE(%rip), %rdi movq %rsi, (%rsp) movq %rax, %rsi movq (%rsp), %rdx callq _ZN3std2rt10lang_start17h3121da83b2bc3697E movl %eax, %ecx movl %ecx, %eax popq %rcx .cfi_def_cfa_offset 8 retq .Lfunc_end8: .size main, .Lfunc_end8-main .cfi_endproc ``` After: ``` .section .text.main,"ax",@progbits .globl main # -- Begin function main .p2align 4, 0x90 .type main,@function main: # @main .cfi_startproc # %bb.0: pushq %rax .cfi_def_cfa_offset 16 movslq %edi, %rax leaq _ZN1t4main17he95a7d4f1843730eE(%rip), %rdi movq %rsi, (%rsp) # 8-byte Spill movq %rax, %rsi movq (%rsp), %rdx # 8-byte Reload callq _ZN3std2rt10lang_start17h3121da83b2bc3697E movl %eax, %ecx movl %ecx, %eax popq %rcx .cfi_def_cfa_offset 8 retq .Lfunc_end8: .size main, .Lfunc_end8-main .cfi_endproc # -- End function ```
2018-08-14Rollup merge of #53274 - bjorn3:remove_statics_field, r=nagisakennytm-7/+0
Remove statics field from CodegenCx It doesnt seem to be used anywhere.
2018-08-14Rollup merge of #53257 - faern:ip-method-idiomatic-improvement, r=TimNNkennytm-47/+50
Idiomatic improvements to IP method Since match ergonomics and slice patterns are stable this might be more idiomatic modern Rust implementations of these methods? Or well, slice patterns with `..` are not stabilized yet, so maybe we want to specify all fields but with `_`?
2018-08-14Rollup merge of #53246 - ljedrz:cleanup_various, r=kennytmkennytm-153/+141
A few cleanups - change `skip(1).next()` to `nth(1)` - collapse some `if-else` expressions - remove a few explicit `return`s - remove an unnecessary field name - dereference once instead of matching on multiple references - prefer `iter().enumerate()` to indexing with `for` - remove some unnecessary lifetime annotations - use `writeln!()` instead of `write!()`+`\n` - remove redundant parentheses - shorten some enum variant names - a few other cleanups suggested by `clippy`
2018-08-14Rollup merge of #53239 - cuviper:llvm5-closure-alloca, r=eddybkennytm-2/+24
rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5. This hack was removed in #50949, but without it I found that building `std` with full debuginfo would print many LLVM `DW_OP_LLVM_fragment` errors, then die `LLVM ERROR: Failed to strip malformed debug info`. It doesn't seem to be a problem for LLVM 6, so we can re-enable the hack just for older LLVM. This reverts commit da579ef75e4a8ca11fb98b24a0a3ea0c7ccffeeb. Fixes #53204. r? @eddyb
2018-08-14Rollup merge of #53233 - andre-richter:master, r=alexcrichtonkennytm-0/+48
targets: aarch64: Add bare-metal aarch64 target A generic AArch64 target that can be used for writing bare-metal code for 64-bit ARM architectures.
2018-08-14Rollup merge of #53229 - varkor:rlimits_min, r=nikomatsakiskennytm-8/+12
Make sure rlimit is only ever increased `libc::setrlimit` will fail if we try to set the rlimit to a value lower than it is currently, so make sure we're never trying to do this. Fixes #52801.
2018-08-14Rollup merge of #53226 - QuietMisdreavus:editions-for-all, r=estebankkennytm-5/+28
driver: set the syntax edition in phase 1 Fixes https://github.com/rust-lang/rust/issues/53203 It seems the way libsyntax handles the desired edition is to use a global, set via `syntax_pos::hygiene::set_default_edition`. Right now, this is set in the driver in `run_compiler`, which is the entry point for running the compiler all the way through to emitting files. Since rustdoc doesn't use this function, it wasn't properly setting this global. (When initially setting up editions in rustdoc, i'd assumed that setting `sessopts.edition` would have done this... `>_>`) This was "fixed" for doctests in https://github.com/rust-lang/rust/pull/52385, but rather than patching in a call to `set_default_edition` in all the places rustdoc sets up the compiler, i've instead moved the call in the driver to be farther in the process. This means that any use of `phase_1_parse_input` with the right session options will have the edition properly set without having to also remember to set libsyntax up separately. r? @rust-lang/compiler
2018-08-14Rollup merge of #53208 - BurntPizza:protect-the-environment, r=alexcrichtonkennytm-5/+30
Don't panic on std::env::vars() when env is null. Fixes #53200. Reviewer(s): * Do I need to do any `#[cfg()]` here? * Is this use of libc ok for a dev-dependency?
2018-08-14Rollup merge of #53112 - fukatani:pretty-print-btreeset, r=michaelwoeristerkennytm-0/+98
pretty print BTreeSet I want pretty printing for BTreeSet. ```rust use std::collections::*; fn main() { let mut s = BTreeSet::new(); s.insert(5); s.insert(3); s.insert(7); s.remove(&3); println!("{:?}", s); } ``` ``` (gdb) b 9 (gdb) p s $1 = BTreeSet<i32> with 2 elements = {[0] = 5, [1] = 7} ``` This is analogy of pretty printing for C++ std::set.
2018-08-14Label definition of captured variables in errors.David Wood-63/+95
2018-08-14Added some debug logging.David Wood-0/+17
2018-08-14Auto merge of #53085 - ljedrz:cleanup_syntax_structures, r=ljedrzbors-245/+245
Move SmallVector and ThinVec out of libsyntax - move `libsyntax::util::SmallVector` tests to `librustc_data_structures::small_vec` - remove `libsyntax::util::SmallVector` - move `libsyntax::util::thin_vec` to `librustc_data_structures::thin_vec` Other than moving these data structures where they belong it allows modules using `SmallVector<T>` (`SmallVec<[T; 1]>`) to specify their own length (e.g. 8 or 32) independently from `libsyntax`.
2018-08-14Auto merge of #53196 - davidtwco:compile-fail-to-ui, r=nikomatsakisbors-77/+59549
Move `compile-fail` tests to `ui` Fixes #46841, #52531, #44844. r? @nikomatsakis
2018-08-14Auto merge of #53335 - eddyb:issue-53333, r=petrochenkovbors-2/+20
rustc_resolve: crates only exist in the type namespace. Fixes #53333 by resolving `::crate_name` in `TypeNS` alone, which was overlooked in #52923 and didn't break tests, since having `use crate_name;` and a `crate_name` value in the same scope is rare.
2018-08-14Moved problematic tests on x86_64-gnu-nopt back to compile-fail.David Wood-32/+0
2018-08-14Moved problematic tests on x86_64-pc-windows-gnu back to compile-fail.David Wood-37/+54
2018-08-14Moved problematic tests on armhf-gnu back to compile-fail.David Wood-22/+0
2018-08-14Moved problematic tests on wasm32-unknown back to compile-fail.David Wood-4/+25
2018-08-14Moved problematic tests on dist-x86_64-musl back to compile-fail.David Wood-12/+70