Skip to content

Commit c146be0

Browse files
Update src/librustc_span/lib.rs
Use the `new` function instead of an if
1 parent 20e50bf commit c146be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_span/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ impl SourceFile {
13561356
analyze_source_file::analyze_source_file(&src[..], start_pos);
13571357

13581358
SourceFile {
1359-
name: if name_was_remapped { Name::Remapped(name) } else { Name::Normal(name) },
1359+
name: Name::new(name, name_was_remapped),
13601360
unmapped_path: Some(unmapped_path),
13611361
src: Some(Lrc::new(src)),
13621362
src_hash,

0 commit comments

Comments
 (0)