about summary refs log tree commit diff
path: root/src/librustc/ty
AgeCommit message (Collapse)AuthorLines
2020-02-29use .iter() instead of .into_iter() on references.Matthias Krüger-2/+2
2020-02-28remove ScalarMaybeUndef::to_bits and make Scalar::to_bits privateRalf Jung-1/+1
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-11/+11
2020-02-28Auto merge of #68505 - skinny121:canonicalize-const-eval-inputs, r=nikomatsakisbors-2/+2
Canonicalize inputs to const eval where needed Canonicalize inputs to const eval, so that they can contain inference variables. Which enables invoking const eval queries even if the current param env has inference variable within it, which can occur during trait selection. This is a reattempt of #67717, in a far less invasive way. Fixes #68477 r? @nikomatsakis cc @eddyb
2020-02-28Rollup merge of #69496 - matthiaskrgr:filter_next, r=ecstatic-morseDylan DPC-1/+1
use find(x) instead of filter(x).next()
2020-02-28Rollup merge of #69495 - matthiaskrgr:op_ref, r=oli-obkDylan DPC-1/+1
don't take redundant references to operands
2020-02-27Auto merge of #68434 - varkor:astconv-mismatch-error, r=nikomatsakisbors-12/+11
Move generic arg/param validation to `create_substs_for_generic_args` to resolve various const generics issues This changes some diagnostics, but I think they're around as helpful as the previous ones, and occur infrequently regardless. Fixes https://github.com/rust-lang/rust/issues/68257. Fixes https://github.com/rust-lang/rust/issues/68398. r? @eddyb
2020-02-27use find(x) instead of filter(x).next()Matthias Krüger-1/+1
2020-02-27Auto merge of #69507 - JohnTitor:rollup-jqf1gmw, r=JohnTitorbors-1/+1
Rollup of 7 pull requests Successful merges: - #69324 (Backport only: avoid ICE on bad placeholder type) - #69439 (resolve: `lifetimes.rs` -> `late/lifetimes.rs`) - #69473 (update llvm to silence gcc 9 warnings) - #69479 (clarify operator precedence) - #69480 (Clean up E0373 explanation) - #69500 (Simplify the signature of par_for_each_in) - #69505 (Enable setting diagnostic labels) Failed merges: r? @ghost
2020-02-27Rollup merge of #69479 - matthiaskrgr:op_pred, r=Dylan-DPCYuki Okushi-1/+1
clarify operator precedence
2020-02-27Auto merge of #67332 - matthewjasper:drop-in-place-cgus, r=michaelwoeristerbors-4/+21
Don't instantiate so many copies of drop_in_place Split out from #66703. r? @ghost
2020-02-26don't take redundant references to operandsMatthias Krüger-1/+1
2020-02-26Auto merge of #67742 - mark-i-m:describe-it, r=matthewjasperbors-2/+20
Generalized article_and_description r? @matthewjasper The logic of finding the right word and article to print seems to be repeated elsewhere... this is an experimental method to unify this logic...
2020-02-26clarify operator precedenceMatthias Krüger-1/+1
2020-02-26Rollup merge of #69429 - matthiaskrgr:clippy_, r=estebankDylan DPC-3/+3
remove redundant clones and import
2020-02-24Replace uses of Cell::get + Cell::set with Cell::replace.Ana-Maria-6/+3
2020-02-24Also blacklist powerpc-unknown-linux-musl.Ana-Maria-9/+12
2020-02-24librustc{, codegen_ssa,infer,mir_build}: don't clone types that are copyMatthias Krüger-3/+3
2020-02-22remove unneeded fnmark-35/+0
2020-02-22address some review comments/bugsmark-0/+2
2020-02-22article and descr for closuresMark Mansi-4/+5
2020-02-22add generator_kind queryMark Mansi-9/+13
2020-02-22some fixesMark Mansi-7/+4
2020-02-22Generalized article_and_descriptionMark Mansi-1/+50
2020-02-22Make return value of `check_generic_arg_count` semantically clearervarkor-7/+1
2020-02-22Refactor `create_substs_for_generic_args` a littlevarkor-6/+11
2020-02-21Auto merge of #69242 - cjgillot:object_violations, r=Zoxcbors-0/+4
Querify object_safety_violations. Split from #69076 r? @Zoxc
2020-02-21Auto merge of #69281 - nnethercote:inline-some-encoding-decoding-methods, ↵bors-0/+2
r=Centril Inline some encoding and decoding methods. This is a small performance win. r? @Centril
2020-02-20Auto merge of #69072 - ecstatic-morse:associated-items, r=petrochenkovbors-12/+91
O(log n) lookup of associated items by name Resolves #68957, in which compile time is quadratic in the number of associated items. This PR makes name lookup use binary search instead of a linear scan to improve its asymptotic performance. As a result, the pathological case from that issue now runs in 8 seconds on my local machine, as opposed to many minutes on the current stable. Currently, method resolution must do a linear scan through all associated items of a type to find one with a certain name. This PR changes the result of the `associated_items` query to a data structure that preserves the definition order of associated items (which is used, e.g., for the layout of trait object vtables) while adding an index of those items sorted by (unhygienic) name. When doing name lookup, we first find all items with the same `Symbol` using binary search, then run hygienic comparison to find the one we are looking for. Ideally, this would be implemented using an insertion-order preserving, hash-based multi-map, but one is not readily available. Someone who is more familiar with identifier hygiene could probably make this better by auditing the uses of the `AssociatedItems` interface. My goal was to preserve the current behavior exactly, even if it seemed strange (I left at least one FIXME to this effect). For example, some places use comparison with `ident.modern()` and some places use `tcx.hygienic_eq` which requires the `DefId` of the containing `impl`. I don't know whether those approaches are equivalent or which one should be preferred.
2020-02-20Change FIXME message to indicate plan to handle inference variables within ↵Ben Lewis-2/+2
this code path.
2020-02-19Construct `AssociatedItems` from an iterator instead of a `Vec`Dylan MacKenzie-1/+1
2020-02-19Make lookup of associated item by name O(log n)Dylan MacKenzie-11/+83
2020-02-19Replace `rustc_typeck::Namespace` with `rustc_hir::def::Namespace`Dylan MacKenzie-1/+8
2020-02-19Make is_object_safe a method.Camille GILLOT-0/+4
2020-02-19Use a constructor function per dep node instead of an enum and a single functionJohn Kåre Alsaker-6/+4
2020-02-19Fix cache hit statsJohn Kåre Alsaker-4/+14
2020-02-19Add a stat for local DefId densityJohn Kåre Alsaker-2/+35
2020-02-19Split query stats into its own fileJohn Kåre Alsaker-96/+105
2020-02-19Add a `storage` query modifier to override the query cacheJohn Kåre Alsaker-14/+26
2020-02-19Add an abstraction for custom query cachesJohn Kåre Alsaker-123/+305
2020-02-19Make `try_get_cached` take closuresJohn Kåre Alsaker-39/+47
2020-02-19Split query execution into hot and cold pathsJohn Kåre Alsaker-103/+154
2020-02-19Inline some encoding and decoding methods.Nicholas Nethercote-0/+2
This is a small performance win.
2020-02-18Rollup merge of #69146 - matthewjasper:literal-qualif, r=eddybMazdak Farrokhzad-2/+38
Always const qualify literals by type r? @eddyb
2020-02-18Blacklist powerpc-unknown-linux-gnu as having non-ignored GNU C ZSTs.Ana-Maria-3/+8
2020-02-18Rollup merge of #69181 - skinny121:const-eval-return, r=oli-obkDylan DPC-6/+13
Change const eval to just return the value As discussed in https://github.com/rust-lang/rust/pull/68505#discussion_r370956535, the type of consts shouldn't be returned from const eval queries. r? @eddyb cc @nikomatsakis
2020-02-16Auto merge of #67953 - cjgillot:split_infer, r=Zoxcbors-4/+4
Split librustc::{traits,infer} to a separate crate rustc_infer This is still very much work in progress. Three functions are between dimensions (at the end of `rustc::traits`), waiting for some dependency breaking scheme. Please tell me if the approach seems sound, and how you would like to split this PR up. The formatting is deliberately off, to ease rebasing. cc #65031
2020-02-16Make librustc compile.Camille GILLOT-4/+4
2020-02-16Code review changes.Ben Lewis-2/+7
2020-02-15Treat NodeIs as pure values for incremental compilationJohn Kåre Alsaker-24/+1