about summary refs log tree commit diff
path: root/src/librustc/query
AgeCommit message (Collapse)AuthorLines
2020-01-20Make sure that all upstream generics get re-exported from Rust dylibs.Michael Woerister-0/+8
2020-01-16Revert previous attempt at detecting unsatisfiable predicatesAaron Hill-3/+3
2020-01-15Rollup merge of #67914 - Aaron1011:fix/const-prop-impossible, ↵Yuki Okushi-3/+3
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-1/+8
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-3/+3
2020-01-12Auto merge of #67901 - matthewjasper:split-mir-build, r=nagisabors-0/+9
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-0/+9
2020-01-11canonicalize some lint importsMazdak Farrokhzad-1/+1
2020-01-09Remove sanitizer_runtime attributeTomasz Miąsko-4/+0
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-04move describe_as_module to where it's usedMazdak Farrokhzad-11/+19
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-2/+2
2019-12-31Auto merge of #67597 - estebank:placeholder-type, r=oli-obkbors-0/+10
Suggest type param when encountering `_` in item signatures Fix #27435.
2019-12-29clean up logicEsteban Küber-0/+10
2019-12-29Move reachable_set query in librustc_passes.Camille GILLOT-1/+1
2019-12-22Format the worldMark Rousskov-9/+8
2019-12-22Add simpler entry points to const eval for common usages.Ben Lewis-2/+9
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+1
functions with a `const` modifier
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-9/+9
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-2/+2
rename all body_cache back to body
2019-12-02Fix remaining compilation issuesPaul Daniel Faria-1/+7
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-11/+15
(lifetime errors still exist)
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-1/+1
2019-11-20Rollup merge of #66060 - traxys:test_65401, r=michaelwoeristerMazdak Farrokhzad-0/+6
Making ICEs and test them in incremental This adds: - A way to make the compiler ICE - A way to check for ICE in `cfail` tests with `should-ice` - A regression test for issue #65401 I am not sure the attribute added `should-ice` is the best for this job
2019-11-15Fix nits from reviewDylan MacKenzie-3/+3
2019-11-15Use a bespoke type for the result of `mir_const_qualif`Dylan MacKenzie-1/+1
2019-11-13Add HIR pass to check for `if`s and `loop`s in a `const`Dylan MacKenzie-0/+5
These high-level constructs get mapped to control-flow primitives by the time the MIR const-checker runs, making it hard to get the span for the erroneous expression.
2019-11-08Stop returning promotables from `mir_const_qualif`Dylan MacKenzie-1/+1
2019-11-05Rollup merge of #66012 - nnethercote:dequery-trivial_dropck_outlives, ↵Pietro Albini-6/+0
r=michaelwoerister De-querify `trivial_dropck_outlives`. It's sufficiently simple and fast that memoizing it is a slight pessimization. r? @michaelwoerister
2019-11-03add rustc_error(delay_span_bug_from_inside_query) attributeQuentin Boyer-0/+6
2019-11-01De-querify `trivial_dropck_outlives`.Nicholas Nethercote-6/+0
It's sufficiently simple and fast that memoizing it is a slight pessimization.
2019-10-31Implement dual proc macro hashingmsizanoen-0/+4
This changes the mechanism of `-Z dual-proc-macro` to record the host proc macro hash in the transistive dependency information and use it during dependency resolution instead of resolving only by name.
2019-10-29Don't use eval_always for miri queries used from codegen.Eduard-Mihai Burtescu-2/+0
2019-10-28Rollup merge of #65664 - anp:panic-location, r=eddybMazdak Farrokhzad-0/+6
`std::panic::Location` is a lang_item, add `core::intrinsics::caller_location` (RFC 2091 3/N) [Tracking issue](https://github.com/rust-lang/rust/issues/47809) [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) @eddyb suggested doing this intrinsic implementation ahead of actually implementing the `#[track_caller]` attribute so that there's an easily tested intermediate step between adding the shim and wiring up the attribute.
2019-10-27Always use consteval to codegen caller_location.Adam Perry-0/+6
2019-10-24rustc: add `Span`s to `inferred_outlives_of` predicates.Eduard-Mihai Burtescu-1/+1
2019-10-21Use `Symbol` for codegen unit names.Nicholas Nethercote-2/+2
This is a straightforward replacement except for two places where we have to convert to `LocalInternedString` to get a stable sort.
2019-10-18rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole ↵Eduard-Mihai Burtescu-8/+5
struct.
2019-10-12Make trivial dropck outlives a queryMark Rousskov-0/+6
This allows caching some recursive types and getting to an error much more quickly.
2019-09-30Remove HIR based const qualificationMatthew Jasper-13/+1
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+1
2019-09-27cleanup dead ast-borrowck / migrate-mode code.Mazdak Farrokhzad-4/+0
2019-09-27cleanup check_match wrt. SignalledError.Mazdak Farrokhzad-1/+1
2019-09-26Auto merge of #62661 - arielb1:never-reserve, r=nikomatsakisbors-1/+1
reserve `impl<T> From<!> for T` this is necessary for never-type stabilization. cc #57012 #35121 I think we wanted a crater run for this @nikomatsakis? r? @nikomatsakis
2019-09-25Rollup merge of #64599 - csmoe:doc_async_reexport, r=nikomatsakisMazdak Farrokhzad-0/+4
Rustdoc render async function re-export Closes #63710 r? @nikomatsakis
2019-09-24resolve the rustc_reservation_impl attribute in 1 placeAriel Ben-Yehuda-1/+1
2019-09-23rustc: Fix mixing crates with different `share_generics`Alex Crichton-1/+3
This commit addresses #64319 by removing the `dylib` crate type from the list of crate type that exports generic symbols. The bug in #64319 arises because a `dylib` crate type was trying to export a symbol in an uptream crate but it miscalculated the symbol name of the uptream symbol. This isn't really necessary, though, since `dylib` crates aren't that heavily used, so we can just conservatively say that the `dylib` crate type never exports generic symbols, forcibly removing them from the exported symbol lists if were to otherwise find them. The fix here happens in two places: * First is in the `local_crate_exports_generics` method, indicating that it's now `false` for the `Dylib` crate type. Only rlibs actually export generics at this point. * Next is when we load exported symbols from upstream crate. If, for our compilation session, the crate may be included from a dynamic library, then its generic symbols are removed. When the crate was linked into a dynamic library its symbols weren't exported, so we can't consider them a candidate to link against. Overally this should avoid situations where we incorrectly calculate the upstream symbol names in the face of differnet `share_generics` options, ultimately... Closes #64319
2019-09-23rustc: Convert `dependency_formats` to a queryAlex Crichton-0/+4
This commit converts a field of `Session`, `dependency_formats`, into a query of `TyCtxt`. This information then also needed to be threaded through to other remaining portions of the linker, but it's relatively straightforward. The only change here is that instead of `HashMap<CrateType, T>` the data structure changed to `Vec<(CrateType, T)>` to make it easier to deal with in queries.
2019-09-21rename is_async_fn to asyncnesscsmoe-1/+1
2019-09-19append asyncness info to functionscsmoe-1/+1