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
|
@ -96,14 +96,14 @@ impl PatCtxt<'_, '_> {
|
|||
}
|
||||
PatternError::FloatBug => {
|
||||
// FIXME(#31407) this is only necessary because float parsing is buggy
|
||||
::rustc_middle::mir::interpret::struct_error(
|
||||
rustc_middle::mir::interpret::struct_error(
|
||||
self.tcx.at(pat_span),
|
||||
"could not evaluate float literal (see issue #31407)",
|
||||
)
|
||||
.emit();
|
||||
}
|
||||
PatternError::NonConstPath(span) => {
|
||||
::rustc_middle::mir::interpret::struct_error(
|
||||
rustc_middle::mir::interpret::struct_error(
|
||||
self.tcx.at(span),
|
||||
"runtime values cannot be referenced in patterns",
|
||||
)
|
||||
|
|
|
@ -1060,13 +1060,13 @@ crate fn compare_const_vals<'tcx>(
|
|||
use rustc_apfloat::Float;
|
||||
return match *ty.kind() {
|
||||
ty::Float(ast::FloatTy::F32) => {
|
||||
let l = ::rustc_apfloat::ieee::Single::from_bits(a);
|
||||
let r = ::rustc_apfloat::ieee::Single::from_bits(b);
|
||||
let l = rustc_apfloat::ieee::Single::from_bits(a);
|
||||
let r = rustc_apfloat::ieee::Single::from_bits(b);
|
||||
l.partial_cmp(&r)
|
||||
}
|
||||
ty::Float(ast::FloatTy::F64) => {
|
||||
let l = ::rustc_apfloat::ieee::Double::from_bits(a);
|
||||
let r = ::rustc_apfloat::ieee::Double::from_bits(b);
|
||||
let l = rustc_apfloat::ieee::Double::from_bits(a);
|
||||
let r = rustc_apfloat::ieee::Double::from_bits(b);
|
||||
l.partial_cmp(&r)
|
||||
}
|
||||
ty::Int(ity) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue