about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-08-04Update E0124 to the new error formatSamuel Cormier-Iijima-7/+12
2016-08-04Auto merge of #35168 - scottcarr:deaggregation, r=nikomatsakisbors-0/+162
[MIR] Deaggregate structs to enable further optimizations Currently, we generate MIR like: ``` tmp0 = ...; tmp1 = ...; tmp3 = Foo { a: ..., b: ... }; ``` This PR implements "deaggregation," i.e.: ``` tmp3.0 = ... tmp3.1 = ... ``` Currently, the code only deaggregates structs, not enums. My understanding is that we do not have MIR to set the discriminant of an enum.
2016-08-03Auto merge of #35015 - petrochenkov:forearg, r=nikomatsakisbors-47/+114
Properly enforce the "patterns aren't allowed in foreign functions" rule Cases like `arg @ PATTERN` or `mut arg` were missing. Apply the same rule to function pointer types. Closes https://github.com/rust-lang/rust/issues/35203 [breaking-change], no breakage in sane code is expected though r? @nikomatsakis This is somewhat related to https://github.com/rust-lang/rfcs/pull/1685 (cc @matklad). The goal is to eventually support full pattern syntax where it makes sense (function body may present) and to support *only* the following forms - `TYPE`, `ident: TYPE`, `_: TYPE` - where patterns don't make sense (function body doesn't present), i.e. in foreign functions and function pointer types.
2016-08-03Auto merge of #34520 - Manishearth:fix-unsafecell-docs, r=steveklabnikbors-0/+19
Clarify UnsafeCell docs; fix #34496 None
2016-08-03Support removed LLVM intrinsics by invoking its AutoUpgrade mechanism.Eduard Burtescu-0/+38
2016-08-03reduce rightward drift, add precondition commentScott A Carr-15/+20
2016-08-03Auto merge of #35174 - arielb1:llvm-type-audit, r=eddybbors-2655/+2936
Audit C++ types in rustllvm cc @eddyb Fixes #35131
2016-08-03finish type-auditing rustllvmAriel Ben-Yehuda-194/+246
2016-08-03split the FFI part of rustc_llvm to rustc_llvm::ffiAriel Ben-Yehuda-2067/+2087
2016-08-03begin auditing the C++ types in RustWrapperAriel Ben-Yehuda-602/+771
2016-08-03audit LLVM C++ types in ArchiveWrapper and PassWrapperAriel Ben-Yehuda-114/+275
2016-08-03remove the ExecutionEngine bindingAriel Ben-Yehuda-122/+1
the code has no tests and will just bitrot by itself. this is a [breaking-change]
2016-08-03Auto merge of #35178 - m4b:fix-relx-musl, r=alexcrichtonbors-0/+6
Add -mrelax-relocations=no hacks to fix musl build * this is just a start, dunno if it will work, but I'll just push it out to get feedback (my rust is still building :cry:) * I don't know much about rustbuild, so i just added that flag in there. it's a total hack, don't judge me * I suspect the places in the musl .mk files are sufficient (but we may also need it present when building std), I'm not sure, needs more testing.
2016-08-02Auto merge of #35176 - japaric:no-atomics, r=alexcrichtonbors-0/+2
core: fix `cargo build` for targets with "max-atomic-width": 0 This crate was failing to compile due to dead_code/unused_imports warnings. This commits disables these two lints for these targets. --- r? @alexcrichton cc @Amanieu is `cfg(target_has_atomic = "8")` the right `cfg` to use? I think that all targets that support some form of atomics will at a minimum support byte level atomics. FWIW, the only thing that's left in `sync::atomic` for these targets is `Ordering` and the `fence` function.
2016-08-02Auto merge of #35159 - michaelwoerister:incr-comp-implies-orbit, r=nikomatsakisbors-1/+29
Automatically enable -Zorbit if -Zincremental is specified. Fixes #34973 r? @nikomatsakis
2016-08-03Properly enforce the "patterns aren't allowed in foreign functions" checkVadim Petrochenkov-6/+67
Apply the same check to function pointer types
2016-08-03rustc_trans: don't lose the cross-crate DefId, MIR trans needs it.Eduard Burtescu-3/+33
2016-08-02run mir opt test with mir-opt-level=3 so they fireScott A Carr-0/+2
2016-08-03Move the E0130 check to AST validation passVadim Petrochenkov-47/+53
2016-08-02Automatically enable -Zorbit if -Zincremental is specified.Michael Woerister-1/+29
2016-08-02core: fix `cargo build` for targets with "max-atomic-width": 0Jorge Aparicio-0/+2
This crate was failing to compile due to dead_code/unused_imports warnings. This commits disables these two lints for these targets.
2016-08-02add hashtag to emphasis its a gh issueScott A Carr-1/+1
2016-08-02fix field type, add testScott A Carr-1/+42
2016-08-02reduce rightward drift, add fixmeScott A Carr-41/+41
2016-08-02Fix style issuesm4b-2/+2
2016-08-02Auto merge of #35145 - jseyfried:avoid_extra_resolve_error, r=arielb1bors-40/+26
resolve: Avoid emitting an unhelpful cascading resolution error Fixes #35142.
2016-08-02Auto merge of #35084 - tbu-:pr_lowercase_wtf8_debug, r=brsonbors-2/+2
Escape the unmatched surrogates with lower-case hexadecimal numbers It's done the same way for the rest of the codepoint escapes.
2016-08-01Auto merge of #34096 - eddyb:launch, r=nikomatsakisbors-28/+61
Switch to MIR-based translation by default. This patch makes `-Z orbit` default to "on", which means that by default, functions will be translated from Rust to LLVM IR through the upcoming MIR backend, instead of the antiquated AST backend. This switch is made possible by the recently merged #33622, #33905 and smaller fixes. If you experience any issues, please file a report for each of them. You can switch to the old backend to work around problems by either setting `RUSTFLAGS="-Zorbit=off"` or by annotating specific functions with `#[rustc_no_mir]` (which requires `#![feature(rustc_attrs)]` at the crate-level). I would like this PR to get into nightly soon so that we can get early feedback in this release cycle and focus on correctness fixes and performance improvements, with the potential for removing the old backend implementation before beta branches off. cc @rust-lang/compiler
2016-08-01Add -mrelax-relocations=no hacks to fix musl buildm4b-0/+6
2016-08-02Ignore the lang-items example in the book.Eduard Burtescu-1/+1
2016-08-02tests: mark the inline asm in run-pass/issue-14936 as volatile.Eduard Burtescu-1/+2
2016-08-02rustc: parse -Z orbit=off.Eduard Burtescu-1/+22
2016-08-02tests: don't use -Zorbit on run-pass/issue-28950, it stack overflows.Eduard Burtescu-0/+3
2016-08-02rustc_trans: load C-like enums larger than usize from memory with -Zorbit.Eduard Burtescu-25/+33
2016-08-01Auto merge of #35054 - pwoolcoc:stringfromchars, r=brsonbors-0/+20
implement `From<Vec<char>>` and `From<&'a [char]>` for `String` Though there are ways to convert a slice or vec of chars into a string, it would be nice to be able to just do `String::from(&['a', 'b', 'c'])`, so this PR implements `From<Vec<char>>` and `From<&'a [char]>` for String.
2016-08-02Turn -Z orbit on by default.Eduard Burtescu-1/+1
2016-08-01Auto merge of #35018 - cgswords:rope_tstream, r=nrcbors-610/+374
Reimplement TokenStreams using ropes Title says it all; a reimplementation of TokenStreams as ropes. r? @nrc
2016-08-01deaggregate structs to enable further optimizationScott A Carr-0/+114
2016-08-01Fix fallout in `ui/codemap_tests`.Jeffrey Seyfried-5/+2
2016-08-01Reimplemented tokenstreams as ropes and reduced the exposed TokenStream API.cgswords-610/+374
2016-08-01Auto merge of #35163 - sanxiyn:rollup, r=sanxiynbors-474/+371
Rollup of 8 pull requests - Successful merges: #34802, #35033, #35085, #35114, #35134, #35140, #35141, #35157 - Failed merges:
2016-08-02Rollup merge of #35157 - sanxiyn:remove-workaround, r=eddybSeo Sanghyeon-6/+0
Remove CMake workaround This isn't needed anymore as we aren't using CMake to build compiler-rt since #34873.
2016-08-02Rollup merge of #35141 - eddyb:assert-mir-debug, r=nagisaSeo Sanghyeon-0/+1
rustc_trans: apply the debug location for the MIR Assert panic call. Helps `libcore` build with MIR trans and debuginfo; libcore has the body of `panic`, which resulted in: ``` inlinable function call in a function with debug info must have a !dbg location call void @_ZN4core9panicking5panic17h585bd70cda921012E({ %str_slice, %str_slice, i32 }* @panic_loc12745) LLVM ERROR: Broken function found, compilation aborted! ```
2016-08-02Rollup merge of #35140 - the-kenny:tcp-stress-test-const-thread-count, ↵Seo Sanghyeon-2/+5
r=alexcrichton tcp-stress-test: Pull out thread count as a constant This PR factors out the number of concurrent threads used in `tcp-stress-test.rs` to a constant at the top of the file. We at @NixOS had to lower our thread count as the chrooted-builds don't allow that many threads. This change will make it easier to lower/increase the count in the future (I actually forgot to change the second `1000` when I was working on this). Another benefit is the removal of magic numbers in the test suite. This is related to https://github.com/rust-lang/rust/issues/35107
2016-08-02Rollup merge of #35134 - frewsxcv:slice-chunks, r=GuillaumeGomezSeo Sanghyeon-9/+7
Rewrite `slice::chunks` doc example to not require printing. None
2016-08-02Rollup merge of #35114 - michaelwoerister:inline-meta-to-hir-map, r=eddybSeo Sanghyeon-175/+335
Move caching of inlined HIR into CrateStore So far we've had separate HIR-inlining caches for each codegen unit and the caching for things inlined during constant evaluation had some holes. Consequently, things would be inlined multiple times if they were used from different codegen units, etc, leading to - wasted memory, - multiple `NodeId`s per `DefId` and, - for things inlined during constant evaluation, no way to map a `NodeId` back to it's original `DefId`. This PR moves all caching into the CrateStore, solving all of the above problems. It also fixes some bugs in the inlining code, like cyclic in the parent-chains in the HIR map and some `NodeId`'s being translated to more or less random values. There are assertions in place now that should prevent this kind of thing in the future. This PR based on top of #35090, which contains some necessary fixes.
2016-08-02Rollup merge of #35033 - jakllsch:remaining_cpu_x86-64, r=alexcrichtonSeo Sanghyeon-0/+3
Use "x86-64" as the target CPU for NetBSD and Bitrig on amd64. Using "generic" disables a number of features that are present on all x86_64 cpus, the "x86-64" target cpu is the common denominator for that arch. Refs #20777
2016-08-02Rollup merge of #34802 - petrochenkov:call, r=eddybSeo Sanghyeon-282/+20
Methods `Fn(Mut,Once)::call(mut,once)` are gated with two feature gates, remove one of them Methods `Fn::call`, `FnMut::call_mut` and `FnOnce::call_once` are gated with usual library feature `fn_traits` and also hardcoded in the compiler and gated once more with feature `unboxed_closures` This patch removes the `unboxed_closures`feature gate from these methods (`unboxed_closures` is still used for other things though), now they are gated only with `fn_traits`. All unnecessary `#![feature(unboxed_closures)]`s are removed, many of them are old and were already unnecessary before the change this PR does.
2016-08-01Auto merge of #34743 - badboy:llvm-upgrade, r=eddybbors-389/+225
LLVM upgrade As discussed in https://internals.rust-lang.org/t/need-help-with-emscripten-port/3154/46 I'm trying to update the used LLVM checkout in Rust. I basically took @shepmaster's code and applied it on top (though I did the commits manually, the [original commits have better descriptions](https://github.com/rust-lang/rust/compare/master...avr-rust:avr-support). With these changes I was able to build rustc. `make check` throws one last error on `run-pass/issue-28950.rs`. Output: https://gist.github.com/badboy/bcdd3bbde260860b6159aa49070a9052 I took the metadata changes as is and they seem to work, though it now uses the module in another step. I'm not sure if this is the best and correct way. Things to do: * [x] ~~Make `run-pass/issue-28950.rs` pass~~ unrelated * [x] Find out how the `PositionIndependentExecutable` setting is now used * [x] Is the `llvm::legacy` still the right way to do these things? cc @brson @alexcrichton
2016-08-01Remove CMake workaroundSeo Sanghyeon-6/+0