about summary refs log tree commit diff
path: root/src/librustc_privacy
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1/+1
2020-03-27Rollup merge of #70344 - Centril:hir-pretty, r=eddybDylan DPC-6/+10
Decouple `rustc_hir::print` into `rustc_hir_pretty` High level summary: - The HIR pretty printer, `rustc_hir::print` is moved into a new crate `rustc_hir_pretty`. - `rustc_ast_pretty` and `rustc_errors` are dropped as `rustc_hir` dependencies. - The dependence on HIR pretty is generally reduced, leaving `rustc_save_analysis`, `rustdoc`, `rustc_metadata`, and `rustc_driver` as the remaining clients. The main goal here is to reduce `rustc_hir`'s dependencies and its size such that it can start and finish earlier, thereby working towards https://github.com/rust-lang/rust/issues/65031. r? @Zoxc
2020-03-24fmtJeremy Stucki-1/+1
2020-03-24decouple rustc_hir::print from crateMazdak Farrokhzad-6/+10
2020-03-23Increase verbosity when using update syntaxJeremy Stucki-4/+11
2020-03-22Normalize wording of privacy access labelsEsteban Küber-4/+12
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-2/+2
2020-03-19rustc: use LocalDefId instead of DefIndex in HirId.Eduard-Mihai Burtescu-1/+1
2020-03-18Rollup merge of #69920 - Centril:hir-cleanup, r=ZoxcMazdak Farrokhzad-2/+3
Remove some imports to the rustc crate - When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code). - Use `rustc_session::` imports instead of `rustc::{session, lint}`. r? @Zoxc
2020-03-16Rollup merge of #69989 - petrochenkov:nolegacy, r=eddyb,matthewjasperDylan DPC-1/+1
resolve/hygiene: `macro_rules` are not "legacy" The "modern" vs "legacy" naming was introduced by jseyfried during initial implementation of macros 2.0. At this point it's clear that `macro_rules` are not going anywhere and won't be deprecated in the near future. So this PR changes the naming "legacy" (when it implies "macro_rules") to "macro_rules". This should also help people reading this code because it's wasn't obvious that "legacy" actually meant "macro_rules" in these contexts. The most contentious renaming here is probably ``` fn modern -> fn normalize_to_macros_2_0 fn modern_and_legacy -> fn normalize_to_macro_rules ``` Other alternatives that I could think of are `normalize_to_opaque`/`normalize_to_semitransparent`, or `strip_non_opaque`/`strip_transparent`, but they seemed less intuitive. The documentation to these functions can be found in `symbol.rs`. r? @matthewjasper
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+2
2020-03-16remove unnecessary hir::map importsMazdak Farrokhzad-1/+1
2020-03-15More Method->Fn renamingMark Mansi-3/+2
2020-03-16ast/hir: `MacroDef::legacy` -> `MacroDef::macro_rules`Vadim Petrochenkov-1/+1
2020-03-15Auto merge of #68944 - Zoxc:hir-map, r=eddybbors-13/+13
Use queries for the HIR map r? @eddyb cc @michaelwoerister
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-13/+13
2020-03-14rustc_metadata: Remove `rmeta::MacroDef`Vadim Petrochenkov-1/+1
Use `ast::MacroDef` instead. Also remove `Session::imported_macro_spans`, external macros have spans now.
2020-03-03DefKind::Method -> DefKind::AssocFnMark Mansi-2/+2
2020-03-01Auto merge of #69380 - Zoxc:parent-module, r=michaelwoeristerbors-1/+1
Use a query to get parent modules Split out from https://github.com/rust-lang/rust/pull/69015 / https://github.com/rust-lang/rust/pull/68944. r? @michaelwoerister
2020-03-01Auto merge of #69592 - petrochenkov:nosyntax, r=Centrilbors-2/+2
Rename `libsyntax` to `librustc_ast` This was the last rustc crate that wasn't following the `rustc_*` naming convention. Follow-up to https://github.com/rust-lang/rust/pull/67763.
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-2/+2
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29Add a `parent_module_from_def_id` queryJohn Kåre Alsaker-1/+1
2020-02-29remove unneeded .as_ref() calls.Matthias Krüger-1/+1
2020-02-11Move more into decorate functions.jumbatm-4/+4
2020-02-11Run RustFmtjumbatm-11/+13
2020-02-11Invert control in struct_lint_level.jumbatm-14/+15
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-1/+2
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-21Rollup merge of #68140 - ecstatic-morse:const-trait-bound-opt-out, r=oli-obkMazdak Farrokhzad-2/+2
Implement `?const` opt-out for trait bounds For now, such bounds are treated exactly the same as unprefixed ones in all contexts. [RFC 2632](https://github.com/rust-lang/rfcs/pull/2632) does not specify whether such bounds are forbidden outside of `const` contexts, so they are allowed at the moment. Prior to this PR, the constness of a trait bound/impl was stored in `TraitRef`. Now, the constness of an `impl` is stored in `ast::ItemKind::Impl` and the constness of a bound in `ast::TraitBoundModifer`. Additionally, constness of trait bounds is now stored in an additional field of `ty::Predicate::Trait`, and the combination of the constness of the item along with any `TraitBoundModifier` determines the constness of the bound in accordance with the RFC. Encoding the constness of impls at the `ty` level is left for a later PR. After a discussion in \#wg-grammar on Discord, it was decided that the grammar should not encode the mutual exclusivity of trait bound modifiers. The grammar for trait bound modifiers remains `[?const] [?]`. To encode this, I add a dummy variant to `ast::TraitBoundModifier` that is used when the syntax `?const ?` appears. This variant causes an error in AST validation and disappears during HIR lowering. cc #67794 r? @oli-obk
2020-01-20Track constness while lowering boundsDylan MacKenzie-1/+1
2020-01-20Add `constness` field to `ty::Predicate::Trait`Dylan MacKenzie-1/+1
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-3/+0
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-22/+22
2020-01-10Fix issue with using `self` module via indirectionvarkor-0/+3
2020-01-08normalize rustc::hir::intravisit importsMazdak Farrokhzad-1/+1
2020-01-08intravisit: abstract over HIR MapMazdak Farrokhzad-7/+22
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-3/+2
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-3/+5
2020-01-04move {Par}DeepVisitor to intravisitMazdak Farrokhzad-2/+1
2020-01-04{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemapMazdak Farrokhzad-2/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-31Auto merge of #67032 - cjgillot:hirene, r=Zoxcbors-1/+1
Allocate HIR on an arena 4/4 This is the fourth and last PR in the series started by #66931, #66936 and #66942. The last commits should compile on their own. The difference with the previous PR is given by https://github.com/cjgillot/rust/compare/hirene-ty...hirene A few more cleanups may be necessary, please tell me. r? @eddyb like the other cc @Zoxc
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-30Remove HirVec from Generics.Camille GILLOT-1/+1
2019-12-27Fallout in other crates.Camille GILLOT-14/+17
2019-12-26Fallout in other crates.Camille GILLOT-11/+11
2019-12-23Add span information to `ExprKind::Assign`varkor-1/+1
2019-12-22Format the worldMark Rousskov-199/+260
2019-12-21Use Arena inside hir::Mod.Camille GILLOT-4/+4