Skip to content

Commit 532e3f6

Browse files
committed
Use the correct unit for file size limit
1 parent e73d974 commit 532e3f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_span/src/source_map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl FileLoader for RealFileLoader {
116116

117117
fn read_file(&self, path: &Path) -> io::Result<String> {
118118
if path.metadata().is_ok_and(|metadata| metadata.len() > u32::MAX.into()) {
119-
eprintln!("fatal error: rustc does not support files larger than 4GB");
119+
eprintln!("fatal error: rustc does not support files larger than 4 GiB");
120120
crate::fatal_error::FatalError.raise()
121121
}
122122
fs::read_to_string(path)
@@ -301,7 +301,7 @@ impl SourceMap {
301301
/// unmodified.
302302
pub fn new_source_file(&self, filename: FileName, src: String) -> Lrc<SourceFile> {
303303
self.try_new_source_file(filename, src).unwrap_or_else(|OffsetOverflowError| {
304-
eprintln!("fatal error: rustc does not support files larger than 4GB");
304+
eprintln!("fatal error: rustc does not support files larger than 4 GiB");
305305
crate::fatal_error::FatalError.raise()
306306
})
307307
}

0 commit comments

Comments
 (0)