about summary refs log tree commit diff
path: root/src/librustc/ty/layout.rs
AgeCommit message (Collapse)AuthorLines
2019-04-26Update handling of Tuplevarkor-3/+4
2019-04-11Add discr_index to multi-variant layoutsTyler Mandry-0/+4
We relax the assumption that the discriminant is always field 0, in preparations for layouts like generators where this is not going to be the case.
2019-03-29rustc_target: factor out common fields of non-Single Variants.Eduard-Mihai Burtescu-23/+34
2019-02-28Ensure `record_layout_for_printing()` is inlined.Nicholas Nethercote-10/+12
This reduces instruction counts for the `ctfe-stress-2` benchmark by about 1%.
2019-02-10rustc: doc commentsAlexander Regueiro-3/+3
2019-02-05move librustc to 2018Mark Mansi-11/+11
2019-01-12Rollup merge of #57042 - ↵Mazdak Farrokhzad-1/+5
pnkfelix:issue-57038-sidestep-ice-in-fieldplacement-count, r=michaelwoerister Don't call `FieldPlacement::count` when count is too large Sidestep ICE in `FieldPlacement::count` by not calling it when count will not fit in host's usize. (I briefly played with trying to fix this by changing `FieldPlacement::count` to return a `u64`. However, based on how `FieldPlacement` is used, it seems like this would be a largely pointless pursuit... I'm open to counter-arguments, however.) Fix #57038
2018-12-26Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`.Alexander Regueiro-5/+5
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-21Sidestep ICE in `FieldPlacement::count` by not calling it when count will ↵Felix S. Klock II-1/+5
not fit in host's usize.
2018-12-11Consider privacy in more locationsvarkor-2/+2
2018-12-11Use unions for uninhabitedness checking rather than mem::transmutevarkor-1/+1
2018-12-11conservative_is_uninhabited implies abi.is_uninhabitedvarkor-4/+10
2018-12-11Nonempty arrays of uninhabited arrays are Abi::Uninhabitedvarkor-1/+7
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-7/+7
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-1/+3
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-46/+41
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-14/+18
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-7/+7
2018-11-18Rollup merge of #55834 - ogoffart:union-abi, r=eddybPietro Albini-1/+34
Forward the ABI of the non-zero sized fields of an union if they have the same ABI This is supposed to fix the performence regression of using MaybeUninit in https://github.com/rust-lang/rust/pull/54668
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-1/+1
fix various typos in doc comments
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-13Forward the ABI of the non-zero sized fields of an union if they have the ↵Olivier Goffart-1/+34
same ABI This is supposed to fix the performence regression of using MaybeUninit in https://github.com/rust-lang/rust/pull/54668
2018-11-12Use IndexVec instead of `usize` in librustcOliver Scherer-26/+45
2018-11-04rustc_target: pass contexts by reference, not value.Eduard-Mihai Burtescu-15/+14
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-2/+7
2018-10-05Auto merge of #54743 - ljedrz:cleanup_ty_p2, r=zackmdavisbors-19/+20
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-3/+3
2018-10-03rustc/ty: whitespace fixesljedrz-19/+20
2018-09-30use is_uninhabited in more placesJorge Aparicio-5/+5
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-7/+7
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-09-29Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"Ralf Jung-5/+5
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
2018-09-22use is_uninhabited in more placesJorge Aparicio-5/+5
2018-09-14Auto merge of #54032 - oli-obk:layout_scalar_ranges, r=eddybbors-11/+28
Add forever unstable attribute to allow specifying arbitrary scalar ranges r? @eddyb for the first commit and @nikomatsakis for the second one
2018-09-11only allow restricting scalar layoutsOliver Schneider-1/+2
2018-09-11Address attribute naming and use `Bound` enumOliver Schneider-19/+27
2018-09-11Get rid of the `non_zero` lang item in favour of arbitrary range specificationsOliver Schneider-7/+15
2018-09-10renamed mk_nil to mk_unitkenta7777-2/+2
2018-09-05Changing TyAnon -> TyOpaque and relevant functionsms2300-3/+3
2018-08-28Warn about naively fixing the FIXMEOliver Schneider-0/+7
2018-08-28Use partial but correct vtable layoutOliver Schneider-10/+2
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-14/+14
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-6/+6
2018-08-22Remove Ty prefix from ↵varkor-45/+45
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-10Consider changing assert! to debug_assert! when it calls visit_withljedrz-3/+3
2018-07-29Sanity-check all constantsOliver Schneider-5/+20
2018-07-05Store scalar pair bools as i8 in memoryJosh Stone-7/+2
We represent `bool` as `i1` in a `ScalarPair`, unlike other aggregates, to optimize IR for checked operators and the like. With this patch, we still do so when the pair is an immediate value, but we use the `i8` memory type when the value is loaded or stored as an LLVM aggregate. So `(bool, bool)` looks like an `{ i1, i1 }` immediate, but `{ i8, i8 }` in memory. When a pair is a direct function argument, `PassMode::Pair`, it is still passed using the immediate `i1` type, but as a return value it will use the `i8` memory type. Also, `bool`-like` enum tags will now use scalar pairs when possible, where they were previously excluded due to optimization issues.
2018-07-02Use LitToConstError rather than bool for errorsvarkor-4/+1
2018-07-02Fix ICEs with match/return expressions inside array lengthsvarkor-1/+4
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-4/+4