Rename Ctxt
and CTX
to Tcx
and Qcx
This makes it consistent and clear which context is used.
This commit is contained in:
parent
16558bd267
commit
6d26ea86da
7 changed files with 109 additions and 109 deletions
|
@ -1,12 +1,12 @@
|
|||
use crate::dep_graph::DepContext;
|
||||
use crate::query::QueryInfo;
|
||||
|
||||
pub trait Value<CTX: DepContext>: Sized {
|
||||
fn from_cycle_error(tcx: CTX, cycle: &[QueryInfo]) -> Self;
|
||||
pub trait Value<Tcx: DepContext>: Sized {
|
||||
fn from_cycle_error(tcx: Tcx, cycle: &[QueryInfo]) -> Self;
|
||||
}
|
||||
|
||||
impl<CTX: DepContext, T> Value<CTX> for T {
|
||||
default fn from_cycle_error(tcx: CTX, _: &[QueryInfo]) -> T {
|
||||
impl<Tcx: DepContext, T> Value<Tcx> for T {
|
||||
default fn from_cycle_error(tcx: Tcx, _: &[QueryInfo]) -> T {
|
||||
tcx.sess().abort_if_errors();
|
||||
// Ideally we would use `bug!` here. But bug! is only defined in rustc_middle, and it's
|
||||
// non-trivial to define it earlier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue