about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-04-01Add ensure_capacity and rename min to lenJohn Kåre Alsaker-15/+26
2019-04-01wasi: Implement `error_string` to get readable errorsAlex Crichton-2/+15
This routes the `error_string` API to `strerror` in libc which should have more human readable descriptions.
2019-04-01Use set_lenJohn Kåre Alsaker-2/+2
2019-04-01Support allocating iterators with arenasJohn Kåre Alsaker-16/+129
2019-04-01SGX target: convert a bunch of panics to abortsJethro Beekman-48/+61
2019-04-01Use normal newtype_index macro for MIR dataflowMatthew Jasper-76/+30
2019-04-01resolve all in scope trait aliases, then elaborate their boundsSean McArthur-45/+166
2019-04-01Fix typoAaron Hill-1/+1
2019-04-02renames EvalErrorKind to InterpErrorkenta7777-73/+73
2019-04-01Rollup merge of #59603 - matklad:ptrhash, r=CentrilMazdak Farrokhzad-2/+1
stabilize ptr::hash closes #56286
2019-04-01Rollup merge of #59601 - kenta7777:typo-fix, r=CentrilMazdak Farrokhzad-1/+1
Fix small typo This PR fixes a small typo in `eq()` comments.
2019-04-01Rollup merge of #59595 - mark-i-m:update-rustc-guide, r=steveklabnikMazdak Farrokhzad-0/+0
Update rustc-guide submodule Just keeping up with the head... r? @steveklabnik
2019-04-01Rollup merge of #59586 - XAMPPRocky:redirect, r=alexcrichtonMazdak Farrokhzad-1/+1
Fixed URL in cargotest::TEST_REPOS
2019-04-01Rollup merge of #59041 - saleemjaffer:trait_doc_comment_better_error_msg, ↵Mazdak Farrokhzad-0/+33
r=pnkfelix fixes rust-lang#56766 fixes #56766
2019-04-01Rollup merge of #58919 - estebank:impl-trait-return-lifetime, r=pnkfelixMazdak Farrokhzad-19/+48
Suggest using anonymous lifetime in `impl Trait` return Fix #48467. r? @nikomatsakis
2019-04-01Rollup merge of #58507 - Zoxc:time-extended, r=michaelwoeristerMazdak Farrokhzad-21/+26
Add a -Z time option which prints only passes which runs once This ensures `-Z time-passes` fits on my screen =P r? @michaelwoerister
2019-04-01stabilize ptr::hashAleksey Kladov-2/+1
closes #56286
2019-04-01wasi: Use raw syscalls for stdioAlex Crichton-14/+9
I've since learned that the mapping between libc fds and wasi fds are expected to be one-to-one, so we can use the raw syscalls for writing to stdout/stderr and reading from stdin! This should help ensure that we don't depend on a C library too unnecessarily.
2019-04-01wasi: Load arguments via syscallsAlex Crichton-26/+24
This commit switches the wasi target to loading CLI arguments via the syscalls provided by wasi rather than through the argc/argv passed to the main function. While serving the same purpose it's hoped that using syscalls will make us a bit more portable (less reliance from libstd on an external C library) as well as avoiding the need for a lock!
2019-04-01typo fixkenta7777-1/+1
2019-04-01Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` implLukas Kalbertodt-5/+17
Before this change, formatter settings were lost when printing a `Range`. For example, printing a `Range<f32>` with `{:.2?}` would not apply the precision modifier when printing the floats. Now the `Debug` impls look a bit more verbose, but modifier are not lost.
2019-03-31Only track 'visited' state for function typesAaron Hill-18/+31
2019-03-31update rustc-guide submodulemark-0/+0
2019-03-31Fix typosAaron Hill-4/+2
2019-03-31Add codegen testAaron Hill-0/+15
2019-03-31Fix inverted panic checkAaron Hill-1/+1
2019-03-31Fix stack overflow when generating debuginfo for 'recursive' typeAaron Hill-17/+108
By using 'impl trait', it's possible to create a self-referential type as follows: fn foo() -> impl Copy { foo } This is a function which returns itself. Normally, the signature of this function would be impossible to write - it would look like 'fn foo() -> fn() -> fn() ...' e.g. a function which returns a function, which returns a function... Using 'impl trait' allows us to avoid writing this infinitely long type. While it's useless for practical purposes, it does compile and run However, issues arise when we try to generate llvm debuginfo for such a type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we generate debuginfo, which can lead to us recursing back to the original 'fn' type when we try to process its return type. To resolve this, I've modified debuginfo generation to account for these kinds of weird types. Unfortunately, there's no 'correct' debuginfo that we can generate - 'impl trait' does not exist in debuginfo, and this kind of recursive type is impossible to directly represent. To ensure that we emit *something*, this commit emits dummy debuginfo/type names whenever it encounters a self-reference. In practice, this should never happen - it's just to ensure that we can emit some kind of debuginfo, even if it's not particularly meaningful Fixes #58463
2019-03-31Auto merge of #59507 - nnethercote:indent-with-SPACES, r=petrochenkovbors-3/+19
Optimize indentation in the pretty printer. Currently the pretty-printer calls `write!` for every space of indentation. On some workloads the indentation level can exceed 100, and a faster implementation reduces instruction counts by up to 7% on a few workloads.
2019-04-01Optimize indentation in the pretty printer.Nicholas Nethercote-3/+19
Currently the pretty-printer calls `write!` for every space of indentation. On some workloads the indentation level can exceed 100, and a faster implementation reduces instruction counts by up to 7% on a few workloads.
2019-03-31Auto merge of #59577 - dlrobertson:fix_58881, r=nagisabors-13/+23
Fix LLVM IR generated for C-variadic arguments It is possible to create malformed LLVM IR given variadic arguments that are aggregate types. This occurs due to improper tracking of the current argument in the functions list of arguments. Fixes: #58881
2019-03-31Fix custom relative libdir.O01eg-11/+36
Uses relative libdir to place libraries on all stages. Adds verbose installation output.
2019-03-31Fix LLVM IR generated for C-variadic argumentsDan Robertson-13/+23
It is possible to create malformed LLVM IR given variadic arguments that are aggregate types. This occurs due to improper tracking of the current argument in the functions list of arguments.
2019-03-31Rollup merge of #59587 - XAMPPRocky:master, r=CentrilMazdak Farrokhzad-1/+0
Remove #[doc(hidden)] from Error::type_id Nominating this for beta so that `Error::type_id` has documentation in time for release. cc @rust-lang/release @rust-lang/docs
2019-03-31Rollup merge of #59583 - oberien:patch-1, r=CentrilMazdak Farrokhzad-0/+16
match match match match match
2019-03-31Rollup merge of #59581 - jmcomets:stabilize-refcell_replace_swap, r=CentrilMazdak Farrokhzad-7/+1
Stabilize refcell_replace_swap feature Please be kind, this is my first time contributing. :smile: I noticed #43570 only needs stabilizing (and I need it for a side project I'm working on), so I followed the [guide](https://rust-lang.github.io/rustc-guide/stabilization_guide.html#stabilization-pr) to move things forward. I'm happy to amend things if needed, let me know!
2019-03-31Rollup merge of #59580 - taiki-e:coerce-closure, r=oli-obkMazdak Farrokhzad-27/+50
Allow closure to unsafe fn coercion Closes #57883
2019-03-31Rollup merge of #59519 - eddyb:layout-variants-refactor, r=oli-obkMazdak Farrokhzad-134/+193
rustc_target: factor out common fields of non-Single Variants. @tmandry and I were discussing ways to generalize the current variants/discriminant layout to allow more fields in the "`enum`" (or another multi-variant types, such as potentially generator state, in the future), shared by all variants, than just the tag/niche discriminant. This refactor should make it easier to extend multi-variant layouts, as nothing is duplicating anymore between "tagged enums" and "niche-filling enums". r? @oli-obk
2019-03-31Rollup merge of #59506 - JohnTitor:improve-mcount, r=nagisaMazdak Farrokhzad-40/+141
Use platform dependent mcount function close #59097 This pull-request is based on #57244 and [here](https://github.com/llvm-mirror/clang/search?q=MCountName&unscoped_MCountName). r? @nagisa
2019-03-31Rollup merge of #58805 - fabric-and-ink:redundant_import, r=petrochenkovMazdak Farrokhzad-42/+198
Lint for redundant imports Add lint for redundant imports. The changes are suggested by @petrochenkov. Closes #10178.
2019-03-31Suggest using anonymous lifetime in `impl Trait` return without hacksEsteban Küber-48/+41
Fallback to `static_impl_trait` for nice error message by peeking at the return type and the lifetime type. Point at the return type instead of the return expr/stmt in NLL mode.
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-27/+50
2019-03-31Fixed URL in cargotest::TEST_REPOSAaron Power-1/+1
2019-03-31Remove #[doc(hidden)] from Error::type_idAaron Power-1/+0
2019-03-31Use `u{1}` instead of `01`Yuki OKUSHI-16/+16
2019-03-31Fixes for shallow borrowsMatthew Jasper-9/+8
* Don't promote these borrows if we're going to remove them before codegen * Correctly mark unreachable code
2019-03-31Rollup merge of #59574 - JohnTitor:distinguish-error-vs-warning, r=CentrilMazdak Farrokhzad-5/+16
Distinguish message for external macros depending on error level fixes #57716 (I picked you because assigned to this issue.) r? @estebank
2019-03-31Rollup merge of #59572 - davidtwco:issue-59508, r=varkorMazdak Farrokhzad-38/+140
Include bounds in generic re-ordering diagnostic Fixes #59508. r? @estebank cc @varkor
2019-03-31Fix invalid bounds string generation in rustdocGuillaume Gomez-11/+26
2019-03-31match match match match matchJaro Fietz-0/+16
2019-03-31refcell_replace_swap: remove feature gate & obsolete documentation itemJean-Marie Comets-4/+0