Adapt Clippy to the overhaul filename handling
This commit is contained in:
parent
fb7ab6de16
commit
799eecf1eb
2 changed files with 3 additions and 3 deletions
|
|
@ -81,7 +81,7 @@ pub struct ModStyle {
|
|||
|
||||
impl EarlyLintPass for ModStyle {
|
||||
fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) {
|
||||
self.working_dir = cx.sess().opts.working_dir.local_path().map(Path::to_path_buf);
|
||||
self.working_dir = cx.sess().source_map().working_dir().local_path().map(Path::to_path_buf);
|
||||
}
|
||||
|
||||
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use rustc_middle::ty::TyCtxt;
|
|||
use rustc_session::Session;
|
||||
use rustc_span::source_map::{SourceMap, original_sp};
|
||||
use rustc_span::{
|
||||
BytePos, DUMMY_SP, DesugaringKind, FileNameDisplayPreference, Pos, RelativeBytePos, SourceFile, SourceFileAndLine,
|
||||
BytePos, DUMMY_SP, DesugaringKind, Pos, RelativeBytePos, SourceFile, SourceFileAndLine,
|
||||
Span, SpanData, SyntaxContext, hygiene,
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
|
|
@ -268,7 +268,7 @@ fn map_range(
|
|||
debug_assert!(
|
||||
range.start <= text.len() && range.end <= text.len(),
|
||||
"Range `{range:?}` is outside the source file (file `{}`, length `{}`)",
|
||||
src.sf.name.display(FileNameDisplayPreference::Local),
|
||||
src.sf.name.prefer_local_unconditionally(),
|
||||
text.len(),
|
||||
);
|
||||
debug_assert!(range.start <= range.end, "Range `{range:?}` has overlapping bounds");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue