Skip to content

Commit

Permalink
Rename a misnamed Session parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Mar 4, 2024
1 parent 0d4ebe1 commit 4260f7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/rustc_expand/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ impl<'a> ExtCtxt<'a> {
///
/// This unifies the logic used for resolving `include_X!`.
pub fn resolve_path(
parse_sess: &Session,
sess: &Session,
path: impl Into<PathBuf>,
span: Span,
) -> PResult<'_, PathBuf> {
Expand All @@ -1227,15 +1227,15 @@ pub fn resolve_path(
// after macro expansion (that is, they are unhygienic).
if !path.is_absolute() {
let callsite = span.source_callsite();
let mut result = match parse_sess.source_map().span_to_filename(callsite) {
let mut result = match sess.source_map().span_to_filename(callsite) {
FileName::Real(name) => name
.into_local_path()
.expect("attempting to resolve a file path in an external file"),
FileName::DocTest(path, _) => path,
other => {
return Err(parse_sess.dcx().create_err(errors::ResolveRelativePath {
return Err(sess.dcx().create_err(errors::ResolveRelativePath {
span,
path: parse_sess.source_map().filename_for_diagnostics(&other).to_string(),
path: sess.source_map().filename_for_diagnostics(&other).to_string(),
}));
}
};
Expand Down

0 comments on commit 4260f7e

Please sign in to comment.