bjorn3
8e9bbc899c
Move some code from Compiler::enter to GlobalCtxt::finish
2024-11-09 17:55:39 +00:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
Nicholas Nethercote
84ac80f192
Reformat use
declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Mohammad Omidvar
0d508bb0cd
Introduce and provide a hook for should_codegen_locally
2024-07-15 19:54:47 +00:00
Nicholas Nethercote
e9a59dbed8
Remove #[macro_use] extern crate tracing
from rustc_middle
.
2024-05-23 18:02:40 +10:00
Guillaume Gomez
4779115f2b
Rollup merge of #124016 - DaniPopes:dedup-default-providers, r=lcnr
...
Outline default query and hook provider function implementations
The default query and hook provider functions call `bug!` with a decently long message.
Due to argument inlining in `format_args!` ([`flatten_format_args`](https://github.com/rust-lang/rust/issues/78356 )), this ends up duplicating the message for each query, adding ~90KB to `librustc_driver.so` of unreachable panic messages.
To avoid this, we can outline the common `bug!` logic.
2024-04-16 21:41:26 +02:00
DaniPopes
780dfb803f
Outline default query and hook provider function implementations
2024-04-16 15:41:02 +02:00
Michael Goulet
81bf9ae263
Make thir_tree and thir_flat into hooks
2024-04-15 20:08:21 -04:00
Oli Scherer
24fc6e96d6
Make def_path_hash_to_def_id
a hook
2024-03-27 08:20:06 +00:00
Oli Scherer
0f5911c626
Move CrateStore::expn_hash_to_expn_id
to a hook
2024-03-27 08:20:06 +00:00
Oli Scherer
32bd3c30d8
Start replacing CStore
trait methods with hooks.
...
This also avoids the cyclic definition issues with CrateStore being
defined after TyCtxt, but needing to be used in TyCtxt.
2024-03-27 08:20:00 +00:00
Oli Scherer
afdcae2860
Rename mir_const query to mir_built
2024-03-20 09:05:22 +00:00
Oli Scherer
36728f1cdd
Replace mir_built
query with a hook and use mir_const everywhere instead
2024-03-20 09:05:09 +00:00
Zalathar
73475d0d59
coverage: Make is_eligible_for_coverage
a hook method
...
This will allow MIR building to check whether a function is eligible for
coverage instrumentation, and avoid collecting branch coverage info if it is
not.
2024-03-13 20:43:35 +11:00
Camille GILLOT
3a55c283d0
Rename hook.
2023-11-01 16:49:18 +00:00
Oli Scherer
77174d3f29
Turn const_caller_location from a query to a hook
2023-10-31 16:15:18 +00:00
Ralf Jung
13e58755d7
add some docs to hooks/mod.rs
2023-09-30 22:33:22 +02:00
Oli Scherer
9defc971f1
Add tracing instrumentation, just like queries automatically add it
2023-09-22 09:25:38 +00:00
Oli Scherer
2157f31731
Add a way to decouple the implementation and the declaration of a TyCtxt method.
2023-09-22 09:23:15 +00:00