summary refs log tree commit diff
path: root/src/librustc/query
AgeCommit message (Collapse)AuthorLines
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
2019-09-19add is_async_fn querycsmoe-0/+4
2019-09-17Get rid of special const intrinsic query in favour of `const_eval`Oliver Scherer-9/+0
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: librustcAlexander Regueiro-3/+2
2019-08-30Add a "diagnostic item" schemeOliver Scherer-1/+18
This allows lints and other diagnostics to refer to items by a unique ID instead of relying on whacky path resolution schemes that may break when items are relocated.
2019-08-22Fix tidyWesley Wiser-1/+5
2019-08-22Move promoted out of mir::BodyWesley Wiser-2/+12
2019-07-30Do not downgrade NLL errors for bind_by_move_pattern_guards when AST says it ↵Mazdak Farrokhzad-1/+1
is OK.
2019-07-23normalize use of backticks for compiler messages in remaining modulesSamy Kacimi-3/+3
https://github.com/rust-lang/rust/issues/60532
2019-07-16Auto merge of #62322 - wesleywiser:promoted_query, r=oli-obkbors-0/+2
Add a query to get the `promoted`s for a `mir::Body` This is a builidng block toward removing a lot of duplicated code between miri and the cosnt-propagator pass. See this thread for more info: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Using.20.60InterpCx.60.20more/near/169030661 r? @spastorino but feel free to hand it off to somebody else
2019-07-02Add a query to get the `promoted`s for a `mir::Body`Wesley Wiser-0/+2
This is a builidng block toward removing a lot of duplicated code between miri and the cosnt-propagator pass. See this thread for more info: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Using.20.60InterpCx.60.20more/near/169030661
2019-07-02Derive which queries to save using the proc macroJohn Kåre Alsaker-5/+0
2019-06-30Keep caching for non-promoted queriesJohn Kåre Alsaker-0/+2
2019-06-30Clean up query cache codeJohn Kåre Alsaker-23/+38
2019-06-02query-fy type_nameMark Mansi-0/+9
2019-06-02query-ify const_fieldMark Mansi-0/+10
2019-06-01rustc: use indexmap instead of a plain vector for upvars.Eduard-Mihai Burtescu-1/+1
2019-06-01Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddybMazdak Farrokhzad-3/+3
Remove GlobalArenas and use Arena instead r? @eddyb