about summary refs log tree commit diff
path: root/src/librustc_privacy
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-2138/+0
2020-08-16hir: introduce `QPath::LangItem`David Wood-2/+4
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-2/+2
2020-08-13merge `as_local_hir_id` with `local_def_id_to_hir_id`Bastian Kauschke-9/+9
2020-08-10Auto merge of #75127 - jyn514:impl-trait, r=pnkfelixbors-5/+12
Fix async-std by special-casing rustdoc in typeck https://github.com/rust-lang/rust/issues/75100
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-5/+12
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-07EXTREMELY hacky fixJoshua Nelson-2/+2
This runs _just_ enough of typeck that later queries don't panic. Because this is in the same part of the compiler that errors on `impl Trait`, this special-cases impl Trait for rustdoc and no one else. Everything is fine.
2020-08-03Revert to the old `impl Trait` behavior for everyone except rustdocJoshua Nelson-2/+14
2020-08-03Fix async-std at the price of breaking half the test suiteJoshua Nelson-7/+2
- Don't mark impl trait as an error
2020-08-01Rollup merge of #75022 - cuviper:sliced-rchunk, r=lcnrManish Goregaokar-1/+1
Use a slice pattern instead of rchunks_exact(_).next() This is a minor cleanup, but trying a single-use `rchunks` iterator can be more directly matched with a slice pattern, `[.., a, b]`.
2020-08-01Use a slice pattern instead of rchunks_exact(_).next()Josh Stone-1/+1
This is a minor cleanup, but trying a single-use `rchunks` iterator can be more directly matched with a slice pattern, `[.., a, b]`.
2020-07-31Move from `log` to `tracing`Oliver Scherer-1/+1
2020-07-27introduce PredicateAtomBastian Kauschke-10/+5
2020-07-27add reuse_or_mk_predicateBastian Kauschke-1/+1
2020-07-27split ignore_qualifiersBastian Kauschke-23/+25
2020-07-27`PredicateKint` -> `PredicateKind`, the beginning of the endBastian Kauschke-8/+5
2020-07-27progressBastian Kauschke-4/+1
2020-07-17Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakisbors-35/+39
Rename TypeckTables to TypeckResults. Originally suggested by @eddyb.
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-35/+39
2020-07-16apply bootstrap cfgsMark Rousskov-1/+0
2020-07-05Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.Eduard-Mihai Burtescu-1/+1
2020-07-02rustc_privacy: avoid using TypeckTables::empty for {Name,Type}PrivacyVisitor.Eduard-Mihai Burtescu-98/+58
2020-06-30change `skip_binder` to use T by valueBastian Kauschke-5/+5
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-12/+2
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-11Remove associated opaque typesMatthew Jasper-12/+2
They're unused now.
2020-06-10Track span of function in method calls, and use this in #[track_caller]Aaron Hill-1/+1
Fixes #69977 When we parse a chain of method calls like `foo.a().b().c()`, each `MethodCallExpr` gets assigned a span that starts at the beginning of the call chain (`foo`). While this is useful for diagnostics, it means that `Location::caller` will return the same location for every call in a call chain. This PR makes us separately record the span of the function name and arguments for a method call (e.g. `b()` in `foo.a().b().c()`). This `Span` is passed through HIR lowering and MIR building to `TerminatorKind::Call`, where it is used in preference to `Terminator.source_info.span` when determining `Location::caller`. This new span is also useful for diagnostics where we want to emphasize a particular method call - for an example, see https://github.com/rust-lang/rust/pull/72389#discussion_r436035990
2020-05-23iterate List by valueBastian Kauschke-1/+1
2020-05-20introduce newtype'd `Predicate<'tcx>`Bastian Kauschke-1/+1
2020-05-20rename `Predicate` to `PredicateKind`, introduce aliasBastian Kauschke-4/+4
2020-05-12Remove ty::UnnormalizedProjectionJack Huey-1/+1
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-3/+1
2020-04-27Accept `LocalDefId` as key for `check_mod_privacy` querymarmeladema-9/+9
2020-04-24Remove `Option` from the return type of `def_kind`.Eduard-Mihai Burtescu-5/+4
2020-04-24Split out the `Generator` case from `DefKind::Closure`.Eduard-Mihai Burtescu-3/+4
2020-04-24add a few more DefKindsmark-3/+13
make Map::def_kind take LocalDefId Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> crates are DefKind::Mod
2020-04-23Address comments from reviewmarmeladema-10/+6
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-11/+10
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-15/+26
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-9/+12
2020-04-14Do not use `DUMMY_HIR_ID` as placeholder value in node_id_to_hir_id tablemarmeladema-1/+6
Some helpers functions have been introduced to deal with (buggy) cases where either a `NodeId` or a `DefId` do not have a corresponding `HirId`. Those cases are tracked in issue #71104.
2020-04-14Auto merge of #70643 - Rustin-Liu:rustin-patch-rename, r=eddybbors-2/+2
Rename AssocKind::Method to AssocKind::Fn Part of https://github.com/rust-lang/rust/issues/60163. https://github.com/rust-lang/rust/issues/60163#issuecomment-607284413
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-2/+2
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-13Remove usage of `DUMMY_HIR_ID` in some visitorsmarmeladema-4/+4
2020-04-10librustc_middle: return LocalDefId instead of DefId in get_parent_didmarmeladema-3/+4
2020-04-07fix another ICEmark-1/+1
2020-04-07fix abuses of tykind::errmark-1/+7
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-37/+31
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-7/+7
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-7/+7