about summary refs log tree commit diff
path: root/src/librustc_mir_build/thir
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-6984/+0
2020-08-26Point to a move-related span when pointing to closure upvarsAaron Hill-2/+2
Fixes #75904 When emitting move/borrow errors, we may point into a closure to indicate why an upvar is used in the closure. However, we use the 'upvar span', which is just an arbitrary usage of the upvar. If the upvar is used in multiple places (e.g. a borrow and a move), we may end up pointing to the borrow. If the overall error is a move error, this can be confusing. This PR tracks the span that caused an upvar to become captured by-value instead of by-ref (assuming that it's not a `move` closure). We use this span instead of the 'upvar' span when we need to point to an upvar usage during borrow checking.
2020-08-24hir: consistent use and naming of lang itemsDavid Wood-2/+1
This commit adjusts the naming of various lang items so that they are consistent and don't include prefixes containing the target or "LangItem". In addition, lang item variants are no longer exported from the `lang_items` module. Signed-off-by: David Wood <david@davidtw.co>
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-5/+5
2020-08-13merge `as_local_hir_id` with `local_def_id_to_hir_id`Bastian Kauschke-2/+2
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-2/+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-02fix typosliuzhenyu-1/+1
2020-07-31Rename HAIR to THIR (Typed HIR).Valentin Lazureanu-0/+6986