about summary refs log tree commit diff
path: root/src/librustc/ty
AgeCommit message (Collapse)AuthorLines
2019-11-29Rollup merge of #66613 - Areredify:trait-ref-print, r=eddybRalf Jung-10/+37
Allow customising ty::TraitRef's printing behavior This pr allows to explicitly choose which representation of `TraitRef` (`<T as Trait<U>>` or `Trait<U>`) you want to print. `Debug` and `Display` representations of `TraitRef` now match. Closes #59188.
2019-11-29improve lifetime errors with implicit trait object lifetimesMark Mansi-1/+1
2019-11-29Auto merge of #66697 - petrochenkov:nocstore, r=eddybbors-14/+2
rustc_metadata: Privatize more things and a couple of other refactorings This PR continues https://github.com/rust-lang/rust/pull/66496 and hits the point of diminishing returns. All fields of `CrateRoot` and `CrateMetadata` are privatized. For read-only fields this certainly makes sense, but for a few fields updateable from outside of `rmeta.rs` (mostly `creader.rs`) it was done mostly for consistency, I can make them `pub(crate)` again if requested. `cstore.rs` (which became small after #66496) was merged into `creader.rs`. A few things noticed while making the privacy changes were addressed in the remaining refactoring commits. Fixes https://github.com/rust-lang/rust/issues/66550 r? @eddyb @Mark-Simulacrum
2019-11-29allow customising ty::TraitRef's printing behaviorMikhail Babenko-10/+37
fix clippy allow customising ty::TraitRef's printing behavior fix clippy stylistic fix
2019-11-29Auto merge of #66645 - RalfJung:dereferenceable, r=pnkfelixbors-1/+8
remove the 'dereferenceable' attribute from Box Fixes https://github.com/rust-lang/rust/issues/66600 r? @eddyb @rkruppe
2019-11-28rustc: hide HirId's fmt::Debug output from -Z span_free_formats.Eduard-Mihai Burtescu-1/+1
2019-11-28rustc: Move some queries to `rustc_metadata`Vadim Petrochenkov-18/+2
2019-11-28rustc_metadata: Move `has_global_allocator` from session to cstoreVadim Petrochenkov-0/+4
2019-11-27Misc renames.Camille GILLOT-2/+2
2019-11-26Fix spelling typosBrian Wignall-3/+3
2019-11-26Record temporary static references in generator witnessesMatthew Jasper-0/+17
2019-11-26Move local Arena to Queries.Camille GILLOT-2/+3
2019-11-25review feedback: comments and spacingRalf Jung-2/+3
2019-11-25Auto merge of #66682 - estebank:fn-type-err, r=davidtwcobors-8/+23
Highlight parts of fn in type errors When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each. Examples: <img width="699" alt="" src="https://user-images.githubusercontent.com/1606434/69487597-ab561600-0e11-11ea-9b4e-d4fd9e91d5dc.png"> <img width="528" alt="" src="https://user-images.githubusercontent.com/1606434/69487207-9033d800-0e0a-11ea-93e3-8c4d002411a5.png"> <img width="468" alt="" src="https://user-images.githubusercontent.com/1606434/69487208-9033d800-0e0a-11ea-92e3-2b2cee120335.png"> <img width="775" alt="" src="https://user-images.githubusercontent.com/1606434/69487209-9033d800-0e0a-11ea-9e68-7f6ed5c8cb08.png">
2019-11-24Rollup merge of #66594 - Aaron1011:fix/debug-print-cycle, r=matthewjasperMazdak Farrokhzad-38/+65
Fix cycle when debug-printing opaque types Fixes #61577 When printing an opaque type in non-verbose mode, we use the `tcx.predicates_of` query to retrieve the opaque type's bounds for pretty-printing. However, the pervasiveness of logging within librustc means that we may already be executing `tcx.predicates_of` for the opaque type we're trying to print, leading to a cycle error. This commit adds a new 'no queries' thread-local flag to the pretty printer. This flag is enabled during the computation of `predicates_of` for opaque types, and causes us to print the opaque type in 'verbose' mode (which does not require computing any additinal queries). This should only affect debug logging for highly nested log messages, not any user-visible output.
2019-11-23Highlight parts of fn in type errorsEsteban Küber-8/+23
When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each.
2019-11-22remove the 'dereferenceable' attribute from BoxRalf Jung-1/+7
2019-11-22Auto merge of #66460 - cjgillot:hashstable_generic, r=Zoxcbors-152/+0
Add a proc-macro to derive HashStable in librustc dependencies A second proc-macro is added to derive HashStable for crates librustc depends on. This proc-macro HashStable_Generic (to bikeshed) allows to decouple code and some librustc's boilerplate. Not everything is migrated, because `Span` and `TokenKind` require to be placed inside librustc. Types using them stay there too. Split out of #66279 r? @Zoxc
2019-11-21Auto merge of #66610 - alexreg:trait-upcasting-cosmetic, r=Centrilbors-57/+65
Aggregation of drive-by cosmetic changes for trait-upcasting PR Cherry-picked from #60900. As requested by @Centril (and @nikomatsakis, I believe). r? @Centril
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-57/+65
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-53/+144
Specific labels when referring to "expected" and "found" types
2019-11-21Rollup merge of #66515 - Centril:cheaper-inline-asm, r=oli-obkMazdak Farrokhzad-1/+1
Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm` r? @oli-obk
2019-11-21Rollup merge of #66468 - RalfJung:simd-cleanup, r=oli-obkMazdak Farrokhzad-6/+16
Cleanup Miri SIMD intrinsics r? @oli-obk @eddyb Cc @gnzlbg
2019-11-21Rollup merge of #65730 - csmoe:return-lifetime, r=nikomatsakisMazdak Farrokhzad-3/+4
Suggest to add lifetime constraint at explicit ouput of functions Closes #62097
2019-11-21Gate fallback via `#![feature(never_type_fallback)]`.Mazdak Farrokhzad-1/+5
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-5/+1
2019-11-20Fix cycle when debug-printing opaque typesAaron Hill-38/+65
Fixes #61577 When printing an opaque type in non-verbose mode, we use the `tcx.predicates_of` query to retrieve the opaque type's bounds for pretty-printing. However, the pervasiveness of logging within librustc means that we may already be executing `tcx.predicates_of` for the opaque type we're trying to print, leading to a cycle error. This commit adds a new 'no queries' thread-local flag to the pretty printer. This flag is enabled during the computation of `predicates_of` for opaque types, and causes us to print the opaque type in 'verbose' mode (which does not require computing any additinal queries). This should only affect debug logging for highly nested log messages, not any user-visible output.
2019-11-21reduce size of hir::ExprKindMazdak Farrokhzad-1/+1
2019-11-19Fix derive syntax.Camille GILLOT-1/+1
2019-11-19Fix project syntax.Camille GILLOT-1/+1
2019-11-19Derive HashStable more.Camille GILLOT-21/+5
2019-11-19More HashStable.Camille GILLOT-6/+1
2019-11-19Derive HashStable in librustc.Camille GILLOT-18/+7
2019-11-19Auto merge of #66454 - cjgillot:lift, r=Zoxcbors-60/+9
Derive Lift using a proc-macro Based on #66384 r? @Zoxc
2019-11-19Move the definition of `QueryResult` into `plumbing.rs`.Nicholas Nethercote-13/+11
Because it's the only file that uses it, and removes the need for importing it.
2019-11-18review commentsEsteban Küber-44/+58
2019-11-18Surround types with backticks in type errorsEsteban Küber-6/+6
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-29/+75
2019-11-18review comments: tweak prefix stringsEsteban Küber-4/+4
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-0/+31
2019-11-18Retire EnumLiftImpl.Camille GILLOT-9/+2
2019-11-18Retire BraceStructLiftImpl.Camille GILLOT-51/+7
2019-11-17Derive HashStable in librustc_target.Camille GILLOT-152/+0
2019-11-17Auto merge of #66384 - cjgillot:typefoldable, r=Zoxcbors-270/+48
Derive TypeFoldable using a proc-macro A new proc macro is added in librustc_macros. It is used to derive TypeFoldable inside librustc and librustc_traits. For now, the macro uses the `'tcx` lifetime implicitly, and does not allow for a more robust selection of the adequate lifetime. The Clone-based TypeFoldable implementations are not migrated. Closes #65674
2019-11-16make simd_size return a u64Ralf Jung-5/+5
2019-11-16rename and move read_vector_tyRalf Jung-4/+14
2019-11-15Cleaned up unused labelsBart Massey-1/+1
Deleted unused labels from compiler and fixed or allowed unused labels in tests. This patch removes some gratuitous unused labels and turns off the warning for unused labels that are a necessary part of tests. This will permit setting the `unused_labels` lint to `warn`.
2019-11-15Rollup merge of #66013 - nnethercote:avoid-hashing-twice-in-get_query, r=ZoxcYuki Okushi-3/+13
Avoid hashing the key twice in `get_query()`. For a single-threaded parallel compiler, this reduces instruction counts across several benchmarks, by up to 2.8%. The commit also adds documentation about `Sharded`'s use of `FxHasher`. r? @Zoxc
2019-11-14Use multiple derive clauses.Camille GILLOT-30/+30
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+2