about summary refs log tree commit diff
path: root/src/librustc_hir_pretty
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-2522/+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-16hir: introduce `QPath::LangItem`David Wood-0/+10
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-07-15Remove lots of `Symbol::as_str()` calls.Nicholas Nethercote-5/+5
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
2020-06-15Auto merge of #72080 - matthewjasper:uniform-impl-trait, r=nikomatsakisbors-7/+1
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-11Rollup merge of #73182 - Aaron1011:feature/call-fn-span, r=matthewjasperDylan DPC-2/+2
Track span of function in method calls, and use this in #[track_caller] 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-06-11Rename `TyKind::Def` to `OpaqueDef`Matthew Jasper-1/+1
2020-06-11Remove associated opaque typesMatthew Jasper-6/+0
They're unused now.
2020-06-11Make pretty printing `TyKind::Def` do somethingMatthew Jasper-1/+1
2020-06-10Track span of function in method calls, and use this in #[track_caller]Aaron Hill-2/+2
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-06-09save_analysis: improve pretty printing of enummarmeladema-0/+10
2020-06-09save_analysis: better handle functions signaturemarmeladema-0/+12
2020-06-04save_analysis: work on HIR tree instead of ASTmarmeladema-0/+24
2020-05-18Move InlineAsmTemplatePiece and InlineAsmOptions to librustc_astAmanieu d'Antras-10/+9
2020-05-18Implement att_syntax optionAmanieu d'Antras-0/+3
2020-05-18Add asm! to HIRAmanieu d'Antras-0/+102
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-16/+16
2020-04-20Remove unused dependenciesShotaro Yamada-1/+0
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-2/+4
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-16/+9
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-27Auto merge of #68404 - Amanieu:llvm-asm, r=estebankbors-3/+3
Rename asm! to llvm_asm! As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850. This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
2020-03-26rustc_hir_pretty: bump recursion_limitMazdak Farrokhzad-0/+2
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-0/+18
2020-03-24move rustc_hir::print -> rustc_hir_prettyMazdak Farrokhzad-0/+2354