summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2018-10-18Copy extern prelude from resolver to global contextVadim Petrochenkov-2/+4
2018-10-18Revert "rustc_resolve: move extern_prelude from Resolver to Session."Vadim Petrochenkov-17/+1
This reverts commit e90985acdec9928da9f6d157cfeb64f0ee98bffe.
2018-10-09Auto merge of #54877 - arielb1:destabilize-outlives, r=nikomatsakisbors-52/+39
[beta] back out #53793 - stabilize outlives requirements Fixes #54467 for beta, looks like a less risky fix than #54701
2018-10-08Fix dead code lint for functions using impl TraitJonas Schievink-1/+7
2018-10-07Revert "Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakis"Ariel Ben-Yehuda-52/+39
This reverts commit 6810f5286b6b91daab06fc3dccb27d8c46f14349, reversing changes made to 8586ec6980462c99a8926646201b2444d8938d29.
2018-10-04incr.comp.: Don't automatically enable -Zshare-generics for incr.comp. builds.Michael Woerister-1/+0
2018-10-03Auto merge of #54358 - flip1995:beta, r=Manishearthbors-1/+1
[beta] Cancel warning for tool_lints For the discussion about this, see: rust-lang-nursery/rust-clippy#3159 `clippy-preview` is available on stable since 1.29. So when running `cargo +beta clippy` on a crate with `#![allow(clippy_lint)]` a warning is produced, which tells the programmer to change this to `#![allow(clippy::clippy_lint)]`. But since `tool_lints` aren't stable yet, this would require a `#![feature(tool_lints)]`. Features aren't available on stable or beta, so we cannot do this. Even wrapping `cfg_attr(clippy)` around this won't help, since Clippy can also be run from stable or beta toolchain. r? @Manishearth
2018-10-02Use full name to identify a macro in a `FileName`.Diogo Sousa-0/+26
Before this two macros with same name would be indistinguishable inside a `FileName`. This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`. Fixes #53097.
2018-10-02rustc_resolve: move extern_prelude from Resolver to Session.Eduard-Mihai Burtescu-1/+17
2018-09-21Stabilize crate_in_paths, extern_absolute_paths and extern_prelude on all ↵Eduard-Mihai Burtescu-1/+1
editions.
2018-09-19Cancel warning for tool_lintsflip1995-1/+1
2018-09-17Auto merge of #54260 - maxdeviant:public-scope-fields, r=petrochenkovbors-69/+49
Make rustc::middle::region::Scope's fields public This PR makes the following changes to `rustc::middle::region::Scope`: - [x] Makes `region::Scope`'s fields public - [x] Removes the `impl Scope` block with constructors (as per [this comment](https://github.com/rust-lang/rust/pull/54032#discussion_r216618208)) - [x] Updates call sites throughout the compiler Closes #54122.
2018-09-15rustc: add unstable support for --extern crate_name without a path.Eduard-Mihai Burtescu-21/+22
2018-09-15rustc: support extern crates loaded after query engine creation.Eduard-Mihai Burtescu-2/+15
2018-09-15Make rustc::middle::region::Scope's fields publicMarshall Bowers-69/+49
2018-09-15Auto merge of #54151 - ljedrz:cleanup_hir, r=michaelwoeristerbors-155/+93
A few cleanups for hir - prefer `if let` to `match` when only 1 branch matters - `chain` iterable items that are looped over in sequence - `sort_by_key` instead of `sort_by` when possible - change cloning `map`s to `cloned()` - use `unwrap_or_else` and `ok` when applicable - a few other minor readability improvements - whitespace fixes
2018-09-14Auto merge of #54032 - oli-obk:layout_scalar_ranges, r=eddybbors-133/+214
Add forever unstable attribute to allow specifying arbitrary scalar ranges r? @eddyb for the first commit and @nikomatsakis for the second one
2018-09-14Rollup merge of #54173 - phansch:suggest_valid_crate_type, r=estebankkennytm-0/+9
Suggest valid crate type if invalid crate type is found This adds a suggestion to the `invalid_crate_types` lint. The suggestion is based on the Levenshtein distance to existing crate types. If no suggestion is found it will show the lint without any suggestions. Closes #53958
2018-09-14Rollup merge of #54095 - kenta7777:kenta7777#53719, r=davidtwcokennytm-8/+8
Rename all mentions of `nil` to `unit` Fixes #53719. Renamed keywords nil to unit.
2018-09-14Auto merge of #53751 - F001:tuple-struct-self-ctor, r=petrochenkov,varkorbors-19/+46
Implement RFC 2302: tuple_struct_self_ctor Tracking issue: https://github.com/rust-lang/rust/issues/51994
2018-09-13Suggest valid crate type if invalidPhilipp Hansch-0/+9
This adds a suggestion to the `invalid_crate_types` lint. The suggestion is based on the Levenshtein distance to existing crate types. If no suggestion is found it will show the lint without any suggestions.
2018-09-14Rollup merge of #53950 - michaelwoerister:more-lto-cli, r=alexcrichtonkennytm-20/+65
Allow for opting out of ThinLTO and clean up LTO related cli flag handling. It turns out that there currently is no way to explicitly disable ThinLTO (except for the nightly-only `-Zthinlto` flag). This PR extends `-C lto` to take `yes` and `no` in addition to `thin` and `fat`. It should be backwards compatible. It also cleans up how LTO mode selection is handled. Note that merging the PR in the current state would make the new values for `-C lto` available on the stable channel. I think that would be fine but maybe some team should vote on it.
2018-09-13introduce SelfCtorF001-19/+46
2018-09-12Auto merge of #54152 - michaelwoerister:cgu-name-fix, r=alexcrichtonbors-3/+20
Really make CGU names unique across crates. This will hopefully fix issue #53794. r? @alexcrichton
2018-09-12A few cleanups for hirljedrz-155/+93
2018-09-12Merge branch 'master' into kenta7777#53719kenta7777-401/+494
2018-09-12Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakisbors-39/+52
stabilize outlives requirements https://github.com/rust-lang/rust/issues/44493 r? @nikomatsakis
2018-09-12Really make CGU names unique across crates.Michael Woerister-3/+20
2018-09-12Rollup merge of #54106 - flip1995:pub_checklintnameresult, r=Manishearthkennytm-1/+1
Reexport CheckLintNameResult Make the enum `CheckLintNameResult` public, so that lint tools (aka Clippy) can use it together with [`LintStore::check_lint_name`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/lint/struct.LintStore.html#method.check_lint_name), to handle the case that a scoped `tool_lint` doesn't exist in the tool. This is currently not handled by the compiler: https://github.com/rust-lang/rust/blob/595345419d12c3ea860151df52f78744a31bafff/src/librustc/lint/levels.rs#L309-L314 Needed for rust-lang-nursery/rust-clippy#3161 r? @Manishearth
2018-09-12Rollup merge of #54074 - toidiu:ak-spimplifyOrd, r=eddybkennytm-12/+2
simplify ordering for Kind Missed from https://github.com/rust-lang/rust/pull/50930 r? @eddyb
2018-09-11Auto merge of #53873 - ↵bors-368/+447
nikomatsakis:nll-universe-subtyping-and-pattern-ascription, r=pnkfelix support ascription for patterns in NLL This implements the strategy outlined in [this comment](https://github.com/rust-lang/rust/issues/47184#issuecomment-416669986): - We first extend the NLL subtyping code so it can handle inference variables and subtyping. - Then we extend HAIR patterns with type ascription. - Then we treat the type `T` in `let pat: T = ...` as an ascription. Before landing, a few things: - [x] Fix the WF rule bug (filed a FIXME https://github.com/rust-lang/rust/issues/54105) - [x] Fix an ICE I encountered locally around bound regions, or else file a follow-up - [x] More tests probably =) r? @pnkfelix
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-39/+52
Co-authored-by: nikomatsakis
2018-09-11renamed emit_nil to emit_unitkenta7777-1/+1
2018-09-11renamed is_nil to is_unitkenta7777-2/+2
2018-09-11Revert "renamed emit_nil to emit_unit"kenta7777-1/+1
This reverts commit d02a5ffaed9c395ae62ee12d0f4e04946c62edb1.
2018-09-11Revert "renamed read_nil to read_unit"kenta7777-1/+1
This reverts commit 37d0600c23ba1890346078bd7f310e15915417b2.
2018-09-11Revert "renamed is_nil to is_unit"kenta7777-2/+2
This reverts commit 6f685ffad42a2d12dd1fad5ccb0471e7fa260826.
2018-09-11Revert "renamed mk_nil_ptr to mk_unit_ptr"kenta7777-1/+1
This reverts commit 2be5c722dedf50a95479bad0b4558e5e76a73a00.
2018-09-11Silence dead code warning for the assertion staticsOliver Schneider-0/+2
2018-09-11Properly access `std::mem::size_of`Oliver Schneider-2/+2
2018-09-11Change debug printing to print in the old concise styleOliver Schneider-3/+21
2018-09-11Use assertion-like static assertionsOliver Schneider-3/+3
2018-09-11Rebase falloutOliver Schneider-5/+27
2018-09-11Split `CrateNum` into an enum instead of having magic constantsOliver Schneider-19/+51
2018-09-11Simplify Scope/ScopeData to have less chance of introducing UB or size increasesOliver Schneider-94/+66
2018-09-11only allow restricting scalar layoutsOliver Schneider-1/+2
2018-09-11Address attribute naming and use `Bound` enumOliver Schneider-37/+42
2018-09-11Use the same way to specifiy the `SCOPE_DATA_*` constants as used for the MAXOliver Schneider-4/+4
2018-09-11Forbid the upper indices of `IndexVec` indices to allow for niche optimizationsOliver Schneider-4/+4
2018-09-11Get rid of the `non_zero` lang item in favour of arbitrary range specificationsOliver Schneider-9/+38