Skip to content

Commit c95a568

Browse files
committed
Remove def_path_str.
1 parent eb82187 commit c95a568

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

compiler/rustc_query_impl/src/plumbing.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc_data_structures::sync::Lock;
1414
use rustc_data_structures::thin_vec::ThinVec;
1515
use rustc_errors::Diagnostic;
1616
use rustc_serialize::opaque;
17-
use rustc_span::def_id::{DefId, LocalDefId};
17+
use rustc_span::def_id::LocalDefId;
1818

1919
#[derive(Copy, Clone)]
2020
pub struct QueryCtxt<'tcx> {
@@ -25,6 +25,7 @@ pub struct QueryCtxt<'tcx> {
2525
impl<'tcx> std::ops::Deref for QueryCtxt<'tcx> {
2626
type Target = TyCtxt<'tcx>;
2727

28+
#[inline]
2829
fn deref(&self) -> &Self::Target {
2930
&self.tcx
3031
}
@@ -42,10 +43,6 @@ impl HasDepContext for QueryCtxt<'tcx> {
4243
}
4344

4445
impl QueryContext for QueryCtxt<'tcx> {
45-
fn def_path_str(&self, def_id: DefId) -> String {
46-
self.tcx.def_path_str(def_id)
47-
}
48-
4946
fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>> {
5047
tls::with_related_context(**self, |icx| icx.query)
5148
}

compiler/rustc_query_system/src/query/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::dep_graph::{DepNode, DepNodeIndex, HasDepContext, SerializedDepNodeIn
1919
use rustc_data_structures::sync::Lock;
2020
use rustc_data_structures::thin_vec::ThinVec;
2121
use rustc_errors::Diagnostic;
22-
use rustc_span::def_id::DefId;
2322
use rustc_span::Span;
2423

2524
/// Description of a frame in the query stack.
@@ -64,9 +63,6 @@ impl QueryStackFrame {
6463
}
6564

6665
pub trait QueryContext: HasDepContext {
67-
/// Get string representation from DefPath.
68-
fn def_path_str(&self, def_id: DefId) -> String;
69-
7066
/// Get the query information from the TLS context.
7167
fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>>;
7268

0 commit comments

Comments
 (0)