summary refs log tree commit diff
path: root/src/librustc/middle
AgeCommit message (Collapse)AuthorLines
2019-04-06Don't report deprecation lints in derive expansionsOliver Scherer-1/+4
2019-03-17Do not accidentally treat multi-segment meta-items as single-segmentVadim Petrochenkov-8/+9
2019-03-16Make migrate mode work at item level granularityMatthew Jasper-2/+6
2019-02-24Auto merge of #58232 - ljedrz:HirIdification_continued, r=Zoxcbors-8/+8
HirId-ify intravisit A big step towards https://github.com/rust-lang/rust/pull/57578. This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
2019-02-20hir: HirId-ify intravisitljedrz-8/+8
2019-02-20Rollup merge of #58562 - dlrobertson:fix_nits, r=alexregkennytm-4/+4
Fix style nits Fix style nits discovered in reading code. r? @alexreg
2019-02-18Fix style nitsDan Robertson-4/+4
Fix style nits discovered in reading code.
2019-02-15Drive-by cleanupvarkor-2/+5
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Take Const into account in HIRvarkor-83/+84
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-13Rollup merge of #58276 - varkor:missing-stability-attr-top-level, r=davidtwcoMazdak Farrokhzad-10/+13
Improve the error messages for missing stability attributes This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
2019-02-13Rollup merge of #58202 - varkor:deprecated-future-external, r=GuillaumeGomezMazdak Farrokhzad-27/+1
Ignore future deprecations in #[deprecated] The future deprecation warnings should only apply to `#[rustc_deprecated]` as they take into account rustc's version. Fixes #57952. I've also slightly modified rustdoc's display of future deprecation notices to make it more consistent, so I'm assigning a rustdoc team member for review to make sure this is okay. r? @GuillaumeGomez
2019-02-13Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasperMazdak Farrokhzad-6/+6
Rename rustc_errors dependency in rust 2018 crates I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules. Related: rust-lang/cargo#5653 cc #58099 r? @Centril
2019-02-13Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebankMazdak Farrokhzad-4/+4
Cleanup: rename node_id_to_type(_opt) Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here. In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-89/+85
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-13Cleanup importsTaiki Endo-5/+5
2019-02-13Rename rustc_errors dependency in rust 2018 cratesTaiki Endo-3/+3
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-5/+4
2019-02-11Do not apply future deprecation warning for #[deprecated]varkor-27/+1
2019-02-10rustc: doc commentsAlexander Regueiro-89/+85
2019-02-10Auto merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxcbors-6/+6
Partially HirId-ify rustc Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-09cleanup: rename node_id_to_type(_opt)ljedrz-4/+4
2019-02-08Correct descriptive item name for implvarkor-4/+2
2019-02-08Use descriptive variant namevarkor-2/+2
2019-02-07Improve the error messages for missing stability attributesvarkor-10/+15
This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
2019-02-07Auto merge of #58010 - Zoxc:parallel-passes, r=michaelwoeristerbors-1/+0
Move privacy checking later in the pipeline and make some passes run in parallel r? @michaelwoerister
2019-02-07Rollup merge of #58193 - mark-i-m:rustc-2018, r=Centrilkennytm-153/+153
Move librustc to 2018 r? @Centril Part of #58099 It would be great to get this reviewed quickly to avoid merge conflicts...
2019-02-05rustc: partially HirIdifyljedrz-6/+6
2019-02-05move librustc to 2018Mark Mansi-153/+153
2019-02-04Fix #58101Tatsuyuki Ishi-1/+3
2019-02-04Auto merge of #58090 - ljedrz:HirIdification_phase_2, r=Zoxcbors-1/+1
HirIdification: add key HirId methods This is another PR in a series dedicated to `HirId`-ification, i.e. deprecating `ast::NodeId`s after the AST > HIR lowering process. The bigger proof of concept can be seen in #57578. **Phase 2**: add key `HirId` methods mirroring the `NodeId` ones. These should be counterparts of the most widely used `Hir` methods using `NodeId`s. Note that this expands `hir::map::Definitions` with an additional `hir_to_def_index` map (with the intention of later removing `node_to_def_index`). As a bonus there is also a small cleanup commit removing unnecessary calls to `node_to_hir_id` where `HirId` is already available. r? @Zoxc Cc @varkor
2019-02-03Auto merge of #57922 - davidtwco:issue-57410, r=petrochenkovbors-7/+12
Update visibility of intermediate use items. Fixes #57410 and fixes #53925 and fixes #47816. Currently, the target of a use statement will be updated with the visibility of the use statement itself (if the use statement was visible). This PR ensures that if the path to the target item is via another use statement then that intermediate use statement will also have the visibility updated like the target. This silences incorrect `unreachable_pub` lints with inactionable suggestions.
2019-02-03cleanup: don't use node_to_hir_id where unneededljedrz-1/+1
2019-02-02hir: add HirId to main Hir nodesljedrz-1/+1
2019-02-02Update visibility of intermediate use items.David Wood-7/+12
Currently, the target of a use statement will be updated with the visibility of the use statement itself (if the use statement was visible). This commit ensures that if the path to the target item is via another use statement then that intermediate use statement will also have the visibility updated like the target. This silences incorrect `unreachable_pub` lints with inactionable suggestions.
2019-02-01Auto merge of #57916 - Zoxc:incr-passes4, r=michaelwoeristerbors-6/+5
Misc performance tweaks r? @michaelwoerister
2019-01-30Move privacy checking later in the pipeline and make some passes run in parallelJohn Kåre Alsaker-1/+0
2019-01-30Add suggestions to deprecation lintsOliver Scherer-22/+40
2019-01-29Add an ensure() method to TyCtxt used to ensure queries are runJohn Kåre Alsaker-6/+5
2019-01-28Auto merge of #55704 - Nemo157:pinned-generators, r=Zoxcbors-0/+2
Use pinning for generators to make trait safe I'm unsure whether there needs to be any changes to the actual generator transform. Tests are passing so the fact that `Pin<&mut T>` is fundamentally the same as `&mut T` seems to allow it to still work, but maybe there's something subtle here that could go wrong. This is specified in [RFC 2349 § Immovable generators](https://github.com/rust-lang/rfcs/blob/master/text/2349-pin.md#immovable-generators) (although, since that RFC it has become safe to create an immovable generator, and instead it's unsafe to resume any generator; with these changes both are now safe and instead the unsafety is moved to creating a `Pin<&mut [static generator]>` which there are safe APIs for). CC #43122
2019-01-28Unused variable suggestions on all patterns.David Wood-34/+50
This commit extends existing suggestions to prefix unused variable bindings in match arms with an underscore so that it applies to all patterns in a match arm.
2019-01-27Update generator transform and generated function signatureWim Looman-0/+1
2019-01-27Mark static generators as !UnpinWim Looman-0/+1
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-9/+13
2019-01-21Differentiate between closure and function bodiesOliver Scherer-2/+2
2019-01-19Rollup merge of #57689 - nnethercote:redo-hir-Stmt, r=petrochenkovMazdak Farrokhzad-61/+47
Redo `hir::Stmt` A couple of changes that make things simpler and more consistent. This should probably wait until after 1.32 lands to land, to avoid late breakage for tools.
2019-01-19Auto merge of #57752 - Centril:rollup, r=Centrilbors-32/+47
Rollup of 10 pull requests Successful merges: - #57268 (Add a target option "merge-functions", and a corresponding -Z flag (works around #57356)) - #57476 (Move glob map use to query and get rid of CrateAnalysis) - #57501 (High priority resolutions for associated variants) - #57573 (Querify `entry_fn`) - #57610 (Fix nested `?` matchers) - #57634 (Remove an unused function argument) - #57653 (Make the contribution doc reference the guide more) - #57666 (Generalize `huge-enum.rs` test and expected stderr for more cross platform cases) - #57698 (Fix typo bug in DepGraph::try_mark_green().) - #57746 (Update README.md) Failed merges: r? @ghost
2019-01-19Rollup merge of #57573 - Xanewok:querify-entry-fn, r=ZoxcMazdak Farrokhzad-32/+47
Querify `entry_fn` Analogous to https://github.com/rust-lang/rust/pull/57570 but this will also require few fixups in Miri so I decided to separate that (and it seems [CI doesn't let us break tools anymore](https://github.com/rust-lang/rust/pull/57392#issuecomment-453801540)? Or was that because it was a rollup PR?) r? @nikomatsakis
2019-01-19Auto merge of #57253 - Zoxc:incr-passes2, r=michaelwoeristerbors-5/+34
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on https://github.com/rust-lang/rust/pull/51487 r? @michaelwoerister
2019-01-18Rollup merge of #57302 - sinkuu:unused_assignments_fp, r=estebankMazdak Farrokhzad-23/+6
Fix unused_assignments false positive Fixes #22630. In liveness analysis, make `continue` jump to the loop condition's `LiveNode` (`cond` as in comment) instead of the loop's one (`expr`). https://github.com/rust-lang/rust/blob/069b0c410808c1d1d33b495e048b1186e9f8d57f/src/librustc/middle/liveness.rs#L1358-L1370
2019-01-17Remove `hir::StmtKind::Decl`.Nicholas Nethercote-57/+43
It's a level of indirection that hurts far more than it helps. The code is simpler without it. (This commit cuts more than 120 lines of code.) In particular, this commit removes some unnecessary `Span`s within `DeclKind` that were always identical to those in the enclosing `Stmt`, and some unnecessary allocations via `P`.