Replace absolute paths with relative ones
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
This commit is contained in:
parent
f54072bb81
commit
a0fc455d30
32 changed files with 73 additions and 76 deletions
|
@ -22,6 +22,7 @@ use rustc_middle::ty::{
|
|||
use rustc_middle::ty::{TypeAndMut, TypeckResults};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{MultiSpan, Span, DUMMY_SP};
|
||||
use rustc_target::spec::abi;
|
||||
use std::fmt;
|
||||
|
||||
use super::InferCtxtPrivExt;
|
||||
|
@ -1157,15 +1158,15 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
::rustc_target::spec::abi::Abi::Rust,
|
||||
abi::Abi::Rust,
|
||||
)
|
||||
} else {
|
||||
tcx.mk_fn_sig(
|
||||
::std::iter::once(inputs),
|
||||
std::iter::once(inputs),
|
||||
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
::rustc_target::spec::abi::Abi::Rust,
|
||||
abi::Abi::Rust,
|
||||
)
|
||||
};
|
||||
ty::Binder::bind(sig).to_string()
|
||||
|
|
|
@ -44,7 +44,7 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
|
|||
{
|
||||
debug!(
|
||||
"normalize::<{}>(value={:?}, param_env={:?})",
|
||||
::std::any::type_name::<T>(),
|
||||
std::any::type_name::<T>(),
|
||||
value,
|
||||
self.param_env,
|
||||
);
|
||||
|
@ -65,13 +65,13 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
|
|||
let result = value.fold_with(&mut normalizer);
|
||||
debug!(
|
||||
"normalize::<{}>: result={:?} with {} obligations",
|
||||
::std::any::type_name::<T>(),
|
||||
std::any::type_name::<T>(),
|
||||
result,
|
||||
normalizer.obligations.len(),
|
||||
);
|
||||
debug!(
|
||||
"normalize::<{}>: obligations={:?}",
|
||||
::std::any::type_name::<T>(),
|
||||
std::any::type_name::<T>(),
|
||||
normalizer.obligations,
|
||||
);
|
||||
if normalizer.error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue