about summary refs log tree commit diff
path: root/src/librustc_save_analysis/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-1095/+0
2020-08-17Auto merge of #75120 - JulianKnodt:rm_reps, r=oli-obkbors-1/+1
rust_ast::ast => rustc_ast Rework of #71199 which is a rework #70621 Still working on this but just made the PR to track progress r? @Dylan-DPC
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-16save_analysis: support `QPath::LangItem`David Wood-25/+17
This commit implements support for `QPath::LangItem` and `GenericBound::LangItemTrait` in save analysis. Signed-off-by: David Wood <david@davidtw.co>
2020-08-16hir: introduce `QPath::LangItem`David Wood-0/+3
This commit introduces `QPath::LangItem` to the HIR and uses it in AST lowering instead of constructing a `hir::Path` from a slice of symbols. This might be better for performance, but is also much cleaner as the previous approach is fragile. In addition, it resolves a bug (#61019) where an extern crate imported as "std" would result in the paths created during AST lowering being resolved incorrectly (or not at all). Co-authored-by: Matthew Jasper <mjjasper1@gmail.com> Signed-off-by: David Wood <david@davidtw.co>
2020-08-15replaced log with tracingGurpreet Singh-1/+1
2020-08-08Auto merge of #74932 - nnethercote:rm-ast-session-globals, r=petrochenkovbors-1/+1
Remove `librustc_ast` session globals By moving the data onto `Session`. r? @petrochenkov
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-1/+1
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-08-07fix clippy::unneeded_wildcard_pattern: remove redundant wildcard patternMatthias Krüger-1/+1
2020-08-06rustc_expand: Don not beautify doc comments before passing them to macrosVadim Petrochenkov-6/+3
Beautify all doc strings in rustdoc instead, including those in `#[doc]` attributes
2020-08-06rustc_ast: Stop using "string typing" for doc comment tokensVadim Petrochenkov-2/+2
Explicitly store their kind and style retrieved during lexing in the token
2020-08-04rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`Vadim Petrochenkov-2/+2
For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc
2020-07-26Hygiene serialization implementationAaron Hill-1/+1
2020-07-17Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakisbors-12/+12
Rename TypeckTables to TypeckResults. Originally suggested by @eddyb.
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-12/+12
2020-07-16apply bootstrap cfgsMark Rousskov-1/+0
2020-07-15Remove lots of `Symbol::as_str()` calls.Nicholas Nethercote-1/+1
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
2020-07-03Use 'tcx for references to AccessLevels wherever possible.Eduard-Mihai Burtescu-12/+9
2020-07-02rustc_save_analysis: avoid using TypeckTables::empty for SaveContext.Eduard-Mihai Burtescu-14/+22
2020-06-19save_analysis: improve handling of enum struct variantmarmeladema-19/+6
Fixes #61385
2020-06-15make all uses of ty::Error or ConstKind::Error delay a span bugmark-1/+1
2020-06-15Auto merge of #72080 - matthewjasper:uniform-impl-trait, r=nikomatsakisbors-1/+0
Clean up type alias impl trait implementation - Removes special case for top-level impl trait - Removes associated opaque types - Forbid lifetime elision in let position impl trait. This is consistent with the behavior for inferred types. - Handle lifetimes in type alias impl trait more uniformly with other parameters cc #69323 cc #63063 Closes #57188 Closes #62988 Closes #69136 Closes #73061
2020-06-12Rollup merge of #72906 - lzutao:migrate-numeric-assoc-consts, r=dtolnayDylan DPC-1/+1
Migrate to numeric associated consts The deprecation PR is #72885 cc #68490 cc rust-lang/rfcs#2700
2020-06-11Remove associated opaque typesMatthew Jasper-1/+0
They're unused now.
2020-06-10Migrate to numeric associated constsLzu Tao-1/+1
2020-06-09save_analysis: fix enum reference to point to variant rather than constructormarmeladema-11/+7
Fixes #61302
2020-06-09save_analysis: improve pretty printing of enummarmeladema-5/+4
2020-06-09save_analysis: better handle functions signaturemarmeladema-29/+28
2020-06-09save_analysis: better handle pathsmarmeladema-3/+7
2020-06-06save_analysis: fix ice in `get_expr_data`marmeladema-3/+7
2020-06-04save_analysis: work on HIR tree instead of ASTmarmeladema-253/+220
2020-05-22Use `OnceCell` instead of `Once`Dylan MacKenzie-3/+2
2020-05-18Fix ICE in -Zsave-analysisNathan Corbyn-1/+5
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-2/+3
2020-04-24Split out the `Generator` case from `DefKind::Closure`.Eduard-Mihai Burtescu-1/+2
2020-04-24add a few more DefKindsmark-2/+15
make Map::def_kind take LocalDefId Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> crates are DefKind::Mod
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-23/+30
2020-04-10librustc_middle: return LocalDefId instead of DefId in local_def_id_from_node_idmarmeladema-10/+23
2020-04-10librustc_middle: return LocalDefId instead of DefId in ↵marmeladema-1/+1
opt_local_def_id_from_node_id
2020-03-31more clippy fixesMatthias Krüger-1/+1
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-4/+4
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-27clarify hir_id <-> node_id method namesBastian Kauschke-8/+8
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-3/+4
2020-03-22remove redundant closures (clippy::redundant_closure)Matthias Krüger-10/+7
2020-03-21Rollup merge of #69965 - mark-i-m:codegen-utils, r=eddybMazdak Farrokhzad-1/+1
Refactorings to get rid of rustc_codegen_utils r? @eddyb cc #45276 After this, the only modules left in `rustc_codegen_utils` are - `link`: a bunch of linking-related functions (many dealing with file names). These are mostly consumed by save analysis, rustc_driver, rustc_interface, and of course codegen. I assume they live here because we don't want a dependency of save analysis on codegen... Perhaps they can be moved to librustc? - ~`symbol_names` and `symbol_names_test`: honestly it seems odd that `symbol_names_test` is not a submodule of `symbol_names`. It seems like these could honestly live in their own crate or move to librustc. Already name mangling is exported as the `symbol_name` query.~ (move it to its own crate) I don't mind doing either of the above as part of this PR or a followup if you want.
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-2/+2
2020-03-19Refactorings to begin getting rid of rustc_codegen_utilsMark Mansi-1/+1
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+1
2020-03-15Rollup merge of #69988 - petrochenkov:nomacrodef, r=CentrilMazdak Farrokhzad-13/+0
rustc_metadata: Remove `rmeta::MacroDef` And other related cleanups. Follow-up to https://github.com/rust-lang/rust/pull/66364. r? @Centril