about summary refs log tree commit diff
path: root/src/librustc/ty/query
AgeCommit message (Collapse)AuthorLines
2020-02-01pacify the parallel compilerMazdak Farrokhzad-2/+2
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-1/+1
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-23Add projection query for upstream drop-glue instances.Michael Woerister-0/+9
This reduces the amount of invalidated data when new types are add to upstream crates.
2020-01-21Rollup merge of #68297 - Aaron1011:fix/new-const-prop-bounds, r=oli-obkYuki Okushi-9/+0
Filter and test predicates using `normalize_and_test_predicates` for const-prop Fixes #68264 Previously, I attempted to use `substitute_normalize_and_test_predicates` to detect unsatisfiable bounds. Unfortunately, since const-prop runs in a generic environment (we don't have any of the function's generic parameters substituted), this could lead to cycle errors when attempting to normalize predicates. This check is replaced with a more precise check. We now only call `normalize_and_test_predicates` on predicates that have the possibility of being proved unsatisfiable - that is, predicates that don't depend on anything local to the function (e.g. generic parameters). This ensures that we don't hit cycle errors when we normalize said predicates, while still ensuring that we detect unsatisfiable predicates. I haven't been able to come up with a minimization of the Diesel issue - however, I've verified that it compiles successfully.
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-2/+0
2020-01-16Revert previous attempt at detecting unsatisfiable predicatesAaron Hill-9/+0
2020-01-15Rollup merge of #67914 - Aaron1011:fix/const-prop-impossible, ↵Yuki Okushi-0/+9
r=matthewjasper,oli-obk Don't run const propagation on items with inconsistent bounds Fixes #67696 Using `#![feature(trivial_bounds)]`, it's possible to write functions with unsatisfiable 'where' clauses, making them uncallable. However, the user can act as if these 'where' clauses are true inside the body of the function, leading to code that would normally be impossible to write. Since const propgation can run even without any user-written calls to a function, we need to explcitly check for these uncallable functions.
2020-01-14perf: eagerly convert literals to consts, this avoids creating loads on ↵Ben Lewis-0/+11
unevaluated consts which requires a lot of unnecessary work to evaluate them further down the line.
2020-01-13Use TraitQueryMode::Canonical when testing predicates in const propAaron Hill-0/+9
2020-01-12Auto merge of #67901 - matthewjasper:split-mir-build, r=nagisabors-1/+1
Split MIR building into its own crate This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`. The new crate only has a `provide` function as it's public API. Based on #67898 cc @Centril @rust-lang/compiler r? @oli-obk
2020-01-12Split `rustc_mir::{build, hair, lints}` into their own crateMatthew Jasper-1/+1
2020-01-11canonicalize some lint importsMazdak Farrokhzad-1/+1
2020-01-11Rollup merge of #68050 - Centril:canon-error, r=Mark-SimulacrumYuki Okushi-2/+2
Canonicalize rustc_error imports r? @Mark-Simulacrum
2020-01-10Fix some rebasing fallout.Michael Woerister-1/+1
2020-01-10Run 'x.py fmt'.Michael Woerister-71/+31
2020-01-10self-profile: Fix issue with handling query blocking.Michael Woerister-11/+27
2020-01-10Initial support for recording query keys in self-profiling data.Michael Woerister-36/+308
2020-01-10self-profile: Switch to new approach for event_id generation that enables ↵Michael Woerister-59/+63
query-invocation-specific event_ids.
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-2/+2
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-3/+3
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-5/+1
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-11/+9
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-16/+14
2020-01-04extract Export, ExportMap from hir::defMazdak Farrokhzad-1/+2
2020-01-04{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemapMazdak Farrokhzad-2/+1
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-2/+2
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-1/+2
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-2/+2
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-2/+2
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-13/+13
2019-12-29Move reachable_set query in librustc_passes.Camille GILLOT-2/+1
2019-12-25Fix skipped setting of syntax::GLOBALSMark Rousskov-2/+4
2019-12-25Store callbacks in global staticsMark Rousskov-3/+2
The callbacks have precisely two states: the default, and the one present throughout almost all of the rustc run (the filled in value which has access to TyCtxt). We used to store this as a thread local, and reset it on each thread to the non-default value. But this is somewhat wasteful, since there is no reason to set it globally -- while the callbacks themselves access TLS, they do not do so in a manner that fails in when we do not have TLS to work with.
2019-12-22Format the worldMark Rousskov-357/+311
2019-12-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-7/+2
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-1/+0
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-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-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+2
2019-11-12Register queries with self profiler in rustc_interfaceMark Rousskov-1/+3
2019-11-12Move self-profile infrastructure to data structuresMark Rousskov-4/+14
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
2019-11-08Stop returning promotables from `mir_const_qualif`Dylan MacKenzie-1/+0
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-1/+1
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-04Avoid hashing the key twice in `get_query()`.Nicholas Nethercote-3/+13
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`.
2019-11-02Convert `x.as_str().to_string()` to `x.to_string()` where possible.Nicholas Nethercote-1/+1
2019-11-01`Span` cannot represent `span.hi < span.lo`Vadim Petrochenkov-5/+0
So we can remove the corresponding checks from various code
2019-10-27Always use consteval to codegen caller_location.Adam Perry-0/+10
2019-10-25self-profiling: Switch query-blocking measurements to RAII-style API.Michael Woerister-2/+12
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-5/+4
Remove `InternedString` This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places. r? @eddyb