]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_middle/src/util/mod.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / compiler / rustc_middle / src / util / mod.rs
CommitLineData
49aad941
FG
1pub mod bug;
2pub mod call_kind;
3pub mod common;
4pub mod find_self_call;
5
6pub use call_kind::{call_kind, CallDesugaringKind, CallKind};
7pub use find_self_call::find_self_call;
781aab86
FG
8
9#[derive(Default, Copy, Clone)]
10pub struct Providers {
11 pub queries: rustc_middle::query::Providers,
12 pub extern_queries: rustc_middle::query::ExternProviders,
13 pub hooks: rustc_middle::hooks::Providers,
14}
15
16/// Backwards compatibility hack to keep the diff small. This
17/// gives direct access to the `queries` field's fields, which
18/// are what almost everything wants access to.
19impl std::ops::DerefMut for Providers {
20 fn deref_mut(&mut self) -> &mut Self::Target {
21 &mut self.queries
22 }
23}
24
25impl std::ops::Deref for Providers {
26 type Target = rustc_middle::query::Providers;
27
28 fn deref(&self) -> &Self::Target {
29 &self.queries
30 }
31}