about summary refs log tree commit diff
path: root/src/librustc/middle
AgeCommit message (Collapse)AuthorLines
2019-03-12review commentsEsteban Küber-1/+1
2019-03-12Suggest return lifetime when there's only one named lifetimeEsteban Küber-4/+33
2019-03-12Visit impl Trait for dead_code lintSeo Sanghyeon-1/+12
2019-03-10Make migrate mode work at item level granularityMatthew Jasper-2/+6
2019-03-09Rollup merge of #58679 - Zoxc:passes-refactor, r=michaelwoeristerMazdak Farrokhzad-18/+0
Refactor passes and pass execution to be more parallel For `syntex_syntax` (with 16 threads and 8 cores): - Cuts `misc checking 1` from `0.096s` to `0.08325s`. - Cuts `misc checking 2` from `0.3575s` to `0.2545s`. - Cuts `misc checking 3` from `0.34625s` to `0.21375s`. - Cuts `wf checking` from `0.3085s` to `0.05025s`. Reduces overall execution time for `syntex_syntax` (with 8 threads and cores) from `4.92s` to `4.34s`. Subsumes https://github.com/rust-lang/rust/pull/58494 Blocked on https://github.com/rust-lang/rust/pull/58250 r? @michaelwoerister
2019-03-09Auto merge of #57882 - euclio:unused-doc-attributes, r=estebankbors-18/+17
overhaul unused doc comments lint This PR contains a number of improvements to the `unused_doc_comments` lint. - Extends the span to cover the entire comment when using sugared doc comments. - Triggers the lint for all unused doc comments on a node, instead of just the first one. - Triggers the lint on macro expansions, and provides a help note explaining that doc comments must be expanded by the macro. - Adds a label pointing at the node that cannot be documented. Furthermore, this PR fixes any instances in rustc where a macro expansion was erroneously documented.
2019-03-09Auto merge of #59012 - pietroalbini:rollup, r=pietroalbinibors-1/+14
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
2019-03-08expand unused doc comment diagnosticAndy Russell-18/+17
Report the diagnostic on macro expansions, and add a label indicating why the comment is unused.
2019-03-08Rollup merge of #58883 - estebank:unused-closure-arg, r=varkorPietro Albini-1/+14
Suggest appropriate code for unused field when destructuring pattern Fix #56472.
2019-03-07hir: replace NodeId with HirId in Destinationljedrz-9/+7
2019-03-07hir: remove NodeId from PatKindljedrz-2/+2
2019-03-07HirIdification: replace NodeId method callsljedrz-25/+23
2019-03-06Make misc checking 1 more parallelJohn Kåre Alsaker-6/+0
2019-03-06Make misc checking 2 more parallelJohn Kåre Alsaker-12/+0
2019-03-05Handle const generics elsewherevarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-02Suggest appropriate code for unused field when desrtucturing pattternEsteban Küber-1/+14
Fix #56472.
2019-03-02hir: HirIdify Impl&TraitItemIdljedrz-15/+10
2019-03-02hir: remove NodeId from Pat and FieldPatljedrz-14/+12
2019-03-02hir: remove NodeId from Itemljedrz-31/+29
2019-03-02hir: remove NodeId from StructFieldljedrz-3/+2
2019-03-02middle & privacy: partially HirIdifyljedrz-29/+35
2019-03-01hir: remove NodeId from ImplItemljedrz-2/+3
2019-03-01ty: HirIdify some lintsljedrz-3/+2
2019-03-01hir: remove NodeId from TraitItemljedrz-4/+4
2019-03-01middle: HirIdify deadljedrz-58/+59
2019-02-27Support defining C compatible variadic functionsDan Robertson-10/+21
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-27Auto merge of #58741 - varkor:lang-lib-feature-shared-name, r=alexregbors-4/+8
Allow lang and lib features to share names Fixes https://github.com/rust-lang/rust/issues/58715. I didn't add a test, because there's currently no standard lang test feature and I felt apprehensive about adding a permanently unstable feature. Instead, a shared lang/lib feature will be used in https://github.com/rust-lang/rust/pull/57760 and will essentially provide an immediately test.
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-2/+2
2019-02-25Allow lang and lib features to share namesvarkor-4/+8
2019-02-24hir: remove NodeId from Exprljedrz-60/+63
2019-02-24hir: remove NodeId from Blockljedrz-4/+5
2019-02-24middle: partially HirIdify stabilityljedrz-29/+23
2019-02-24hir: remove NodeId from GenericParamljedrz-13/+12
2019-02-24hir: remove NodeId from Lifetime and Tyljedrz-30/+33
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