Skip to content

Commit 914891f

Browse files
authored
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```
2 parents 802f71b + 0b25415 commit 914891f

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

compiler/rustc_smir/src/rustc_smir/mod.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,13 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
7272

7373
fn get_filename(&self, span: &Span) -> Filename {
7474
let tables = self.0.borrow();
75-
opaque(
76-
&tables
77-
.tcx
78-
.sess
79-
.source_map()
80-
.span_to_filename(tables[*span])
81-
.display(rustc_span::FileNameDisplayPreference::Local)
82-
.to_string(),
83-
)
75+
tables
76+
.tcx
77+
.sess
78+
.source_map()
79+
.span_to_filename(tables[*span])
80+
.display(rustc_span::FileNameDisplayPreference::Local)
81+
.to_string()
8482
}
8583

8684
fn get_lines(&self, span: &Span) -> LineInfo {

compiler/stable_mir/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub enum ItemKind {
110110
Const,
111111
}
112112

113-
pub type Filename = Opaque;
113+
pub type Filename = String;
114114

115115
/// Holds information about an item in the crate.
116116
#[derive(Copy, Clone, PartialEq, Eq, Debug)]

0 commit comments

Comments
 (0)