summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2018-02-11rustc: don't ICE when using Rvalue::Discriminant on a non-ADT.Eduard-Mihai Burtescu-3/+2
2018-02-03Auto merge of #47969 - Manishearth:ice-ice-beta, r=Mark-Simulacrumbors-5/+14
Backport rustdoc ICE fixes to beta backport of #47959
2018-02-03Fix rustdoc ICE on macros defined within functionsManish Goregaokar-5/+14
fixes #47639
2018-02-02Auto merge of #47918 - nikomatsakis:issue-47139-beta, r=eddybbors-74/+118
Backport 47738 to beta Backport of #47738 to beta branch.
2018-01-31track intercrate ambiguity only when there is a coherence errorNiko Matsakis-49/+82
2018-01-31change `overlapping_impls` to take a tcx and create the infcxNiko Matsakis-42/+40
2018-01-31make `overlapping_impls` call closures instead of returningNiko Matsakis-33/+46
2018-01-23Don't include DefIndex in plugin- and proc-macro registrar fn symbol.Michael Woerister-9/+7
2018-01-21Auto merge of #47548 - alexcrichton:beta-default-fat, r=michaelwoeristerbors-3/+9
[beta] Turn back on "fat" LTO by default This commit reverts a small portion of the switch to ThinLTO by default which changed the meaning of `-C lto` from "put the whole crate graph into one codegen unit" to "perform ThinLTO over the whole crate graph". This backport has no corresponding commit on master as #47521 is making the same change but in a slightly different manner. This commit is intended to be a surgical change with low impact on beta. Closes #47409
2018-01-18Use name-discarding LLVM contextSimonas Kazlauskas-1/+14
This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not requested. In case either of these outputs are wanted, but the benefits of such context are desired as well, -Zfewer_names option provides the same functionality regardless of the outputs requested.
2018-01-18[beta] Turn back on "fat" LTO by defaultAlex Crichton-3/+9
This commit reverts a small portion of the switch to ThinLTO by default which changed the meaning of `-C lto` from "put the whole crate graph into one codegen unit" to "perform ThinLTO over the whole crate graph". This backport has no corresponding commit on master as #47521 is making the same change but in a slightly different manner. This commit is intended to be a surgical change with low impact on beta. Closes #47409
2018-01-10Shorten names of some compiler generated artifacts.Michael Woerister-0/+14
2018-01-10Try to fix a perf regression by updating logMalo Jaffré-2/+2
Upgrade `log` to `0.4` in multiple crates.
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-60/+86
2018-01-01Fix broken links in internal docsMalo Jaffré-11/+15
2018-01-01Update crates and submodules to pull doc fixesMalo Jaffré-1/+1
Update `rand` crate to `0.3.19`. Update `log` crate to `0.3.9` and `0.4.1`. Update `parking_lot_core` crate to `0.2.9`. Upgrade all flate2 dependencies to `1.0.1`. - Update `rust-installer` submodule.
2017-12-31Clarify where `is_import` is used.leonardo.yvens-0/+1
So it's not mistaken for dead code.
2017-12-28Auto merge of #47021 - shssoichiro:46576-Incorrect-Span-Imports, r=estebankbors-1/+1
Pass correct span when lowering grouped imports Solves incorrect diagnostics for unused or deprecated imports. Closes #46576. Deprecated imports had an existing test which asserted the incorrect span. That test has been corrected as part of this commit.
2017-12-28Auto merge of #47013 - topecongiro:issue-46655, r=petrochenkovbors-7/+5
Do not expand a derive invocation when derive is not allowed Closes #46655. The first commit is what actually closes #46655. The second one is just a refactoring I have done while waiting on a test.
2017-12-28Prefer to use attr::contains_name() and attr::find_by_name()Seiichi Uchida-7/+5
2017-12-27Auto merge of #46479 - bkchr:termination_trait, r=arielb1bors-5/+15
Implements RFC 1937: `?` in `main` This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function. Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help! The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
2017-12-26rustc: don't use union layouts for tagged union enums.Eduard-Mihai Burtescu-4/+4
2017-12-26Pass correct span when lowering grouped importsJosh Holmer-1/+1
Solves incorrect diagnostics for unused or deprecated imports. Closes #46576. Deprecated imports had an existing test which asserted the incorrect span. That test has been corrected as part of this commit.
2017-12-26Auto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxcbors-2/+12
"incompatible arm" diagnostic span tweak Use span label instead of span note for single line spans in "incompatible arm" diagnostic.
2017-12-26avoid ICE when fields are not laid out in orderNiko Matsakis-5/+13
2017-12-26Implements RFC 1937: `?` in `main`Bastian Köcher-0/+2
This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function.
2017-12-26Rollup merge of #46979 - clarcharr:rustc_docs, r=arielb1kennytm-2/+2
Make internal docs build properly. `'1` isn't a valid lifetime and resulted in a syntax error.
2017-12-25Make internal docs build properly.Clar Charr-2/+2
2017-12-25Auto merge of #46973 - arielb1:tuple-casting, r=estebankbors-0/+3
Update check::cast::pointer_kind logic to new rustc Make the match exhaustive, adding handling for anonymous types and tuple coercions on the way. Also, exit early when type errors are detected, to avoid error cascades and the like. Fixes #33690. Fixes #46365. Fixes #46880.
2017-12-25"incompatible arm" diagnostic span tweakEsteban Küber-2/+12
Use span label instead of span note for single line spans in "incompatible arm" diagnostic.
2017-12-25Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1bors-1/+8
Convert warning about `*const _` to a future-compat lint #46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change. fixes #46837 tracking issue for the future-compatibility lint: #46906 r? @arielb1
2017-12-25Auto merge of #46910 - alexcrichton:thinlto-default, r=michaelwoeristerbors-4/+1
rustc: Set release mode cgus to 16 by default This commit is the next attempt to enable multiple codegen units by default in release mode, getting some of those sweet, sweet parallelism wins by running codegen in parallel. Performance should not be lost due to ThinLTO being on by default as well. Closes #45320
2017-12-24Auto merge of #46896 - arielb1:shadow-scope, r=eddybbors-8/+80
fix debuginfo scoping of let-statements r? @eddyb
2017-12-24Auto merge of #46859 - gereeter:uninhabited-unions, r=eddybbors-11/+11
Only mark unions as uninhabited if all of their fields are uninhabited Fixes #46845.
2017-12-24Handle casts to integer/float variablesAriel Ben-Yehuda-0/+3
These can happen if prior errors disable defaulting. Fixes #43825.
2017-12-24Auto merge of #46833 - diwic:7c-abort-ffi, r=arielb1bors-3/+13
Prevent unwinding past FFI boundaries Second attempt to write a patch to solve this. r? @nikomatsakis ~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED Other issues: * llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library... * ~~Mir inlining is a stub currently.~~ FIXED (no-op) Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.
2017-12-23Remove unnecessary assert that unions have only one variantJonathan S-3/+0
2017-12-23rustc: Set release mode cgus to 16 by defaultAlex Crichton-4/+1
This commit is the next attempt to enable multiple codegen units by default in release mode, getting some of those sweet, sweet parallelism wins by running codegen in parallel. Performance should not be lost due to ThinLTO being on by default as well. Closes #45320
2017-12-23Auto merge of #46881 - michaelwoerister:ensure-coherence, r=nikomatsakisbors-9/+8
incr.comp.: Cache check_match and use ensure() for coherence-related queries. Some minor optimizations. r? @nikomatsakis
2017-12-23Auto merge of #46864 - estebank:closure-type-err-sp, r=nikomatsakisbors-4/+2
Closure type error ui tweak Do not point at the same span on all notes/help messages, and instead show them without a span.
2017-12-22Auto merge of #46842 - michaelwoerister:fingerprint-vec, r=nikomatsakisbors-60/+118
incr.comp.: Use an array instead of a hashmap for storing result hashes. Doing so should result in some of the core tracking components being faster. r? @nikomatsakis
2017-12-22Auto merge of #46779 - Zoxc:par-merge-without-sync, r=arielb1bors-9/+32
Work towards thread safety in rustc This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
2017-12-22Convert warning about `*const _` to a future-compat lintMichael Hewson-1/+8
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-9/+23
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Auto merge of #46922 - kennytm:rollup, r=kennytmbors-27/+56
Rollup of 14 pull requests - Successful merges: #46636, #46780, #46784, #46809, #46814, #46820, #46839, #46847, #46858, #46878, #46884, #46890, #46898, #46918 - Failed merges:
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-9/+23
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-22Rollup merge of #46839 - michaelwoerister:faster-span-hashing-2, r=nikomatsakiskennytm-3/+4
incr.comp.: Precompute small hash for filenames to save some work. For each span we hash the filename of the file it points to. Since filenames can be quite long, especially with absolute paths, this PR pre-computes a hash of the filename and we then only hash the hash. r? @nikomatsakis
2017-12-22Rollup merge of #46814 - varkor:contrib-7, r=alexcrichtonkennytm-0/+25
Prevent rustc overwriting input files If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019. Kudos to @estebank, whose patch I finished off.
2017-12-22Rollup merge of #46809 - eddyb:issue-46769-optimal, r=arielb1kennytm-7/+5
rustc: do not raise the alignment of optimized enums to the niche's alignment. This is the improved fix for #46769 that does not increase the size of any types (see also #46808).
2017-12-22Rollup merge of #46780 - varkor:contrib-5, r=arielb1kennytm-17/+22
Fix ICE when calling non-functions within closures The visitor for walking function bodies did not previously properly handle error-cases for function calls. These are now ignored, preventing the panic. This fixes #46771.