about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/print
AgeCommit message (Collapse)AuthorLines
2020-10-30Remove implicit `Continue` typeLeSeulArtichaut-1/+1
2020-10-30TypeVisitor: use `std::ops::ControlFlow` instead of `bool`LeSeulArtichaut-2/+2
2020-10-22Prefer to use `print_def_path`Yuki Okushi-2/+2
2020-10-21Lift: take self by valueBastian Kauschke-1/+1
2020-10-16map_bound_ref -> rebindJack Huey-1/+1
2020-10-16Review commentsJack Huey-1/+1
2020-10-16Use map_bound(_ref) instead of Binder::bind when possibleJack Huey-4/+3
2020-10-15Auto merge of #77873 - sexxi-goose:use_tuple_inference_for_closures, ↵bors-29/+17
r=nikomatsakis Replace tuple of infer vars for upvar_tys with single infer var This commit allows us to decide the number of captures required after completing capture ananysis, which is required as part of implementing RFC-2229. closes https://github.com/rust-lang/project-rfc-2229/issues/4 r? `@nikomatsakis`
2020-10-13Replace absolute paths with relative onesest31-1/+1
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-11Replace tuple of infer vars for upvar_tys with single infer varRoxane-29/+17
This commit allows us to decide the number of captures required after completing capture ananysis, which is required as part of implementing RFC-2229. Co-authored-by: Aman Arora <me@aman-arora.com> Co-authored-by: Jenny Wills <wills.jenniferg@gmail.com>
2020-10-06Separate bounds and predicates for associated/opaque typesMatthew Jasper-2/+3
2020-10-06Split bounds from predicatesMatthew Jasper-2/+2
2020-10-05Auto merge of #77171 - VFLashM:better_sso_structures, r=oli-obkbors-3/+3
Better sso structures This change greatly expands interface of MiniSet/MiniMap and renames them because they are no longer "Mini".
2020-10-03fixed going over 100 chars in lineJake Vossen-1/+3
2020-10-02made multiline macro calls into single lineJake Vossen-18/+6
2020-09-30cargo fmtJake Vossen-10/+2
2020-09-30fixed merge conflictsJake Vossen-43/+0
2020-09-30updated p! macro to accept literalsJake Vossen-0/+43
2020-09-30Fixed more write literals after master mergeJake Vossen-11/+11
2020-09-30updated p! macro to accept literalsJake Vossen-81/+92
2020-09-28pretty.rs: Update Closure and Generator printAman Arora-72/+54
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com> Co-authored-by: Logan Mosier <logmosier@gmail.com>
2020-09-26MiniSet/MiniMap moved and renamed into SsoHashSet/SsoHashMapValerii Lashmanov-3/+3
It is a more descriptive name and with upcoming changes there will be nothing "mini" about them.
2020-09-25Move `is_raw_guess` check in `ty::print::pretty`marmeladema-0/+6
2020-09-25Rename `DefPathData::get_name()` to `DefPathData::name()`marmeladema-1/+1
2020-09-25Fix pretty-printing of `DisambiguatedDefPathData`marmeladema-15/+4
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-10/+11
2020-09-23Move MiniSet to data_structuresAndreas Jonson-1/+1
remove the need for T to be copy from MiniSet as was done for MiniMap
2020-09-20use if let instead of single match arm expressions to compact code and ↵Matthias Krüger-8/+1
reduce nesting (clippy::single_match)
2020-09-18Auto merge of #72412 - VFLashM:issue-72408-nested-closures-exponential, ↵bors-9/+33
r=tmandry Issue 72408 nested closures exponential This fixes #72408. Nested closures were resulting in exponential compilation time. This PR is enhancing asymptotic complexity, but also increasing the constant, so I would love to see perf run results.
2020-09-18Remove redundancy in cache keyTyler Mandry-1/+1
2020-09-17Better handling for exponential-sized types in misc placesValerii Lashmanov-9/+33
Mostly to fix ui/issues/issue-37311-type-length-limit/issue-37311.rs. Most parts of the compiler can handle deeply nested types with a lot of duplicates just fine, but some parts still attempt to naively traverse type tree. Before such problems were caught by type length limit check, but now these places will have to be changed to handle duplicated types gracefully.
2020-09-15fix a couple of stylistic clippy warningsMatthias Krüger-2/+2
namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
2020-09-09Remove def_id field from ParamEnvBram van den Heuvel-0/+5
2020-09-04Change ty.kind to a methodLeSeulArtichaut-7/+7
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+176
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-30ty: remove obsolete printerDavid Wood-253/+0
This commit removes the obsolete printer and replaces all uses of it with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!` logging, two cases were notable: - `MonoItem::to_string` is used in `-Z print-mono-items` and therefore affects the output of all codegen-units tests. - `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs` with `LLVMStructCreateNamed` and that'll now get different values, but this should result in no functional change. Signed-off-by: David Wood <david@davidtw.co>
2020-08-30mv compiler to compiler/mark-0/+2663