Rollup merge of #118135 - ouz-a:fix_stable_span, r=celinval

Remove quotation from filename in stable_mir

Previously we had quotation marks in filenames which is obviously wrong this fixes that.

r? ```@celinval```
This commit is contained in:
Matthias Krüger 2023-11-21 23:46:20 +01:00 committed by GitHub
commit 914891fc58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View File

@ -72,15 +72,13 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
fn get_filename(&self, span: &Span) -> Filename {
let tables = self.0.borrow();
opaque(
&tables
.tcx
.sess
.source_map()
.span_to_filename(tables[*span])
.display(rustc_span::FileNameDisplayPreference::Local)
.to_string(),
)
tables
.tcx
.sess
.source_map()
.span_to_filename(tables[*span])
.display(rustc_span::FileNameDisplayPreference::Local)
.to_string()
}
fn get_lines(&self, span: &Span) -> LineInfo {

View File

@ -110,7 +110,7 @@ pub enum ItemKind {
Const,
}
pub type Filename = Opaque;
pub type Filename = String;
/// Holds information about an item in the crate.
#[derive(Copy, Clone, PartialEq, Eq, Debug)]