about summary refs log tree commit diff
path: root/src/librustc/ty/structural_impls.rs
AgeCommit message (Collapse)AuthorLines
2019-04-16refactor ExprKind to use new PointerCast enumSaleem Jaffer-21/+3
2019-04-16refactor Adjustment to use new PointerCast enumSaleem Jaffer-15/+22
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-1/+1
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-3/+3
2019-03-16Revert the `LazyConst` PROliver Scherer-58/+28
2019-03-15Fix rebase fallout and address some review comments.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: slice substs in ty::print instead of passing the full ones.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.Eduard-Mihai Burtescu-5/+25
2019-03-15rustc: don't thread existential projections through path_generic_args.Eduard-Mihai Burtescu-3/+2
2019-03-15rustc: remove obsolete hacks from ppaux, relating to normalization under HRTB.Eduard-Mihai Burtescu-22/+0
2019-03-15rustc: move Debug impls from ppaux to ty::structural_impls.Eduard-Mihai Burtescu-0/+270
2019-03-15rustc: always rely on '_ to be not printed by ty::Region itself.Eduard-Mihai Burtescu-0/+1
2019-03-15rustc: tie the 'tcx between Print and PrintCx in ty::print.Eduard-Mihai Burtescu-0/+32
2019-03-05Implement structural_impls for const genericsvarkor-1/+21
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-27Rename variadic to c_variadicDan Robertson-2/+2
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-24Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJungMazdak Farrokhzad-2/+2
Const to op simplification r? @RalfJung alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-21restore the actual leak-checkNiko Matsakis-0/+8
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-2/+2
2019-02-09Auto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obkbors-1/+1
Make `intern_lazy_const` actually intern its argument. Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
2019-02-06Make `intern_lazy_const` actually intern its argument.Nicholas Nethercote-1/+1
Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
2019-02-05move librustc to 2018Mark Mansi-27/+27
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-1/+1
2019-01-04Auto merge of #56723 - oli-obk:lazy_const, r=nikomatsakisbors-21/+48
Don't emit `Unevaluated` from `const_eval` cc @eddyb @RalfJung
2019-01-02improve handling for subtypeNiko Matsakis-8/+2
Still not great, but good enough to land this PR.
2019-01-01`<&'tcx ty::Const as Deref>::deref`Oliver Scherer-4/+33
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-20/+18
2018-12-27Add a def-id in `ty::ParamEnv`scalexm-1/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-30Improve the diagnostic messageOliver Scherer-0/+1
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-0/+2
2018-11-12Use IndexVec instead of `usize` in librustcOliver Scherer-1/+1
2018-11-12Shrink some internal enumsOliver Scherer-0/+1
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-6/+26
2018-11-02Auto merge of #55305 - nikomatsakis:universes-refactor-3, r=scalexmbors-2/+0
universes refactor 3 Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this. r? @scalexm
2018-10-31kill old-style-lub warningsNiko Matsakis-2/+0
2018-10-27Auto merge of #54183 - qnighy:by-value-object-safety, r=oli-obkbors-1/+4
Implement by-value object safety This PR implements **by-value object safety**, which is part of unsized rvalues #48055. That means, with `#![feature(unsized_locals)]`, you can call a method `fn foo(self, ...)` on trait objects. One aim of this is to enable `Box<FnOnce>` in the near future. The difficulty here is this: when constructing a vtable for a trait `Foo`, we can't just put the function `<T as Foo>::foo` into the table. If `T` is no larger than `usize`, `self` is usually passed directly. However, as the caller of the vtable doesn't know the concrete `Self` type, we want a variant of `<T as Foo>::foo` where `self` is always passed by reference. Therefore, when the compiler encounters such a method to be generated as a vtable entry, it produces a newly introduced instance called `InstanceDef::VtableShim(def_id)` (that wraps the original instance). the shim just derefs the receiver and calls the original method. We give different symbol names for the shims by appending `::{{vtable-shim}}` to the symbol path (and also adding vtable-shimness as an ingredient to the symbol hash). r? @eddyb
2018-10-26Further foundational stuff on `ProjectionKind` before I add it to ↵Felix S. Klock II-0/+12
`AscribeUserType`.
2018-10-25Report const eval error inside the queryOliver Schneider-159/+1
2018-10-24Add InstanceDef::VtableShim.Masaki Hara-1/+4
2018-10-15make `UniverseIndex` hashable, rename "sub-" to "superuniverse"Niko Matsakis-0/+1
The only name was silly. U1 can contain everything from U0 *plus* more things.
2018-10-09miri engine: also check return type before calling functionRalf Jung-0/+4
2018-10-05Auto merge of #54743 - ljedrz:cleanup_ty_p2, r=zackmdavisbors-20/+13
Cleanup rustc/ty part 2 The second part of cleanups and minor improvements for rustc/ty. - improve allocations - calculate span after a possible early continue - simplify some patterns - mark a comment as FIXME - whitespace fixes The PR is independent from from the first part.
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-1/+6
2018-10-03rustc/ty: simplify some patternsljedrz-13/+7
2018-10-03rustc/ty: whitespace fixesljedrz-7/+6
2018-09-24Shrink StatementKind::InlineAsm.Nicholas Nethercote-0/+10
This shrinks StatementKind from 64 bytes to 48 bytes on 64-bit.
2018-09-10generalize `AscribeUserType` to handle sub or super typeNiko Matsakis-0/+1
2018-09-08Auto merge of #53903 - GabrielMajeri:opt-miri-array-slice, r=oli-obkbors-1/+1
Optimize miri checking of integer array/slices This pull request implements the optimization described in #53845 (the `E-easy` part of that issue, not the refactoring). Instead of checking every element of an integral array, we can check the whole memory range at once. r? @RalfJung
2018-09-08Optimize miri checking of integer array/slicesGabriel Majeri-1/+1
Instead of checking every element, we can check the whole memory range at once.
2018-09-05Changing TyAnon -> TyOpaque and relevant functionsms2300-2/+2