about summary refs log tree commit diff
path: root/src/librustc/ty
AgeCommit message (Collapse)AuthorLines
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-21rustc: implement and use Default on more types.Eduard-Mihai Burtescu-1/+1
2018-11-21rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.Eduard-Mihai Burtescu-14/+14
2018-11-20Incorporate `dyn` into more comments and docs.Corey Farwell-2/+2
2018-11-19Make const_eval_raw query return just an AllocIdRalf Jung-2/+2
2018-11-19Rollup merge of #55953 - blitzerr:master, r=nikomatsakisPietro Albini-4/+9
#53488 Refactoring UpvarId
2018-11-19Rollup merge of #55949 - ↵Pietro Albini-20/+58
ljedrz:return_impl_Iterator_from_Predicate_walk_tys, r=oli-obk ty: return impl Iterator from Predicate::walk_tys Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function. It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
2018-11-18Rollup merge of #55834 - ogoffart:union-abi, r=eddybPietro Albini-1/+40
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-18Rollup merge of #55827 - ljedrz:various_stashed, r=alexcrichtonPietro Albini-1/+1
A few tweaks to iterations/collecting - simplify and speed up `dot::GraphWalk::nodes` for `cfg::CFG` - `reserve` the capacity for `edges` in `DepGraph::query` - collect directly to a `HirVec` in `LoweringContext::lower_attrs` - fix overallocation in `OnDiskCache::serialize` - preallocate the `new_partitioning` vector in `merge_codegen_units` - simplify `impl FromHex for str` - improve the creation of `self_arg_names` in `impl MethodDef`
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-7/+0
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-17Don't auto-inline `const fn`Oliver Scherer-4/+1
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-4/+4
fix various typos in doc comments
2018-11-15Rollup merge of #55778 - nnethercote:LrcPreds, r=eddybPietro Albini-8/+9
Wrap some query results in `Lrc`. So that the frequent clones in `try_get` are cheaper.
2018-11-15ty: return impl Iterator from Predicate::walk_tysljedrz-20/+58
2018-11-14capture_disjoint_fields(rust-lang#53488)Blitzerr-4/+9
Refactoring out the HirId of the UpvarId in another struct.
2018-11-14Wrap some query results in `Lrc`.Nicholas Nethercote-8/+9
So that the frequent clones in `try_get` are cheaper. Fixes #54274.
2018-11-13Auto merge of #55912 - kennytm:rollup, r=kennytmbors-9/+12
Rollup of 20 pull requests Successful merges: - #55136 (Remove short doc where it starts with a codeblock) - #55711 (Format BtreeMap::range_mut example) - #55722 (impl_stable_hash_for: support enums and tuple structs with generic parameters) - #55754 (Avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/err) - #55804 (rustdoc: don't inline `pub use some_crate` unless directly asked to) - #55805 (Move `static_assert!` into librustc_data_structures) - #55837 (Make PhantomData #[structural_match]) - #55840 (Fix TLS errors when downloading stage0) - #55843 (add FromIterator<A> to Box<[A]>) - #55858 (Small fixes on code blocks in rustdoc) - #55863 (Fix a typo in std::panic) - #55870 (Fix typos.) - #55874 (string: Add documentation for `From` impls) - #55879 (save-analysis: Don't panic for macro-generated use globs) - #55882 (Reference count `crate_inherent_impls`s return value.) - #55888 (miri: for uniformity, also move memory_deallocated to AllocationExtra) - #55889 (global allocators: add a few comments) - #55896 (Document optimizations enabled by FusedIterator) - #55905 (Change `Lit::short_name` to `Lit::literal_name`.) - #55908 (Fix their/there grammar nit)
2018-11-13fix various typos in doc commentsAndy Russell-4/+4
2018-11-13Instantiate all bound vars existentiallyscalexm-16/+14
2018-11-13Adjust documentationscalexm-0/+4
2018-11-13Replace type params with bound vars in `rustc_traits::lowering`scalexm-1/+25
2018-11-13Rollup merge of #55882 - hugwijst:rc_return_crate_inherent_impls, ↵kennytm-1/+2
r=Mark-Simulacrum Reference count `crate_inherent_impls`s return value. The repeated cloning of the result in `inherent_impls` queries has quite an impact on crates with many inherent trait implementations. For instance on https://github.com/jmesmon/stm32f429, `cargo check` went from 75 seconds to 38 seconds on my machine.
2018-11-13Rollup merge of #55870 - waywardmonkeys:typo-fixes, r=wesleywiserkennytm-2/+2
Fix typos.
2018-11-13Rollup merge of #55805 - nnethercote:mv-static_assert, r=Mark-Simulacrumkennytm-6/+8
Move `static_assert!` into librustc_data_structures
2018-11-13Forward the ABI of the non-zero sized fields of an union if they have the ↵Olivier Goffart-1/+40
same ABI This is supposed to fix the performence regression of using MaybeUninit in https://github.com/rust-lang/rust/pull/54668
2018-11-13A few tweaks to iterations/collectingljedrz-1/+1
2018-11-13Move two `static_assert!`s to better spots.Nicholas Nethercote-6/+8
And make them x86_64-only so they can use `==` instead of `<=`.
2018-11-12Use type safe `VariantIdx` instead of `usize` everywhereOliver Scherer-3/+4
2018-11-12Use IndexVec instead of `usize` in librustcOliver Scherer-44/+63
2018-11-12Shrink some internal enumsOliver Scherer-0/+2
2018-11-12Avoid the Box in `TyCtxt::associated_items`.Niko Matsakis-4/+27
This reduces instruction counts on packed_simd by 2%.
2018-11-11Reference count `crate_inherent_impls`s return value.Hugo van der Wijst-1/+2
The repeated cloning of the result in `inherent_impls` queries has quite an impact on crates with many inherent trait implementations.
2018-11-11Fix typos.Bruce Mitchener-2/+2
2018-11-11Rollup merge of #55800 - estebank:abolish-ice-for-lifetime, r=oli-obkPietro Albini-1/+15
Fix ICE in `return_type_impl_trait` Fix #55796.
2018-11-11Rollup merge of #55745 - nnethercote:outlives_components-SmallVec, ↵Pietro Albini-27/+26
r=matthewjasper Convert `outlives_components`' return value to a `SmallVec` outparam. This avoids some allocations, reducing instruction counts by 1% on a couple of benchmarks.
2018-11-11Rollup merge of #55687 - alexreg:fix-24010, r=scalexmPietro Albini-64/+66
Take supertraits into account when calculating associated types Fixes #24010 and #23856. Applies to trait aliases too. As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See #50589 for more info. I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+. N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this. CC @carllerche @theemathas @durka @mbrubeck
2018-11-09Simplify logicEsteban Küber-8/+2
2018-11-08Rollup merge of #55755 - ljedrz:a_few_indexvec_tweaks, r=varkorMark Rousskov-2/+1
Improve creation of 3 IndexVecs - preallocate when the minimal size is known - use `from_elem_n` instead of `new`+`resize`
2018-11-08Sidestep ICE in `type_of_def_id()` when called from `return_type_impl_trait`Esteban Küber-1/+21
2018-11-08Improve creation of 3 IndexVecsljedrz-2/+1
2018-11-08Use `SmallVec` outparams in several functions.Nicholas Nethercote-27/+26
This avoids some allocations, reducing instruction counts by 1% on a couple of benchmarks.
2018-11-07Only do check for trait objects, not trait or trait alias definitions.Alexander Regueiro-2/+3
2018-11-07Added error for duplicate bindings of associated type.Alexander Regueiro-39/+39
2018-11-07Added tests.Alexander Regueiro-2/+2
2018-11-07Look at projections from supertraits when constructing trait objects.Alexander Regueiro-23/+24
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-2/+2
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-11-04rustc_target: pass contexts by reference, not value.Eduard-Mihai Burtescu-18/+17
2018-11-03Auto merge of #55101 - alexreg:trait-aliases, r=nikomatsakisbors-15/+29
Implement trait aliases (RFC 1733) Extends groundwork done in https://github.com/rust-lang/rust/pull/45047, and fully implements https://github.com/rust-lang/rfcs/pull/1733. CC @durka @nikomatsakis