1
Fork 0

Rename Ctxt and CTX to Tcx and Qcx

This makes it consistent and clear which context is used.
This commit is contained in:
Nilstrieb 2022-11-05 21:04:19 +01:00
parent 16558bd267
commit 6d26ea86da
No known key found for this signature in database
7 changed files with 109 additions and 109 deletions

View file

@ -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.