about summary refs log tree commit diff
path: root/compiler/rustc_span/src/tests.rs
diff options
context:
space:
mode:
authorJacob Kiesel <jake@bitcrafters.co>2024-06-22 01:27:59 -0600
committerJacob Kiesel <jake@bitcrafters.co>2024-10-01 21:23:20 -0600
commitbb5a8276be2d3dbc97d0f52e90db15455d542edf (patch)
treeee179495725a17cf0a862ce5f6db95e0c6969813 /compiler/rustc_span/src/tests.rs
parentbfe5e8cef698ccc4fca655b4cdbabf78fed43816 (diff)
downloadrust-bb5a8276be2d3dbc97d0f52e90db15455d542edf.tar.gz
rust-bb5a8276be2d3dbc97d0f52e90db15455d542edf.zip
add unstable support for outputting file checksums for use in cargo
Diffstat (limited to 'compiler/rustc_span/src/tests.rs')
-rw-r--r--compiler/rustc_span/src/tests.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/tests.rs b/compiler/rustc_span/src/tests.rs
index 48fa786fb1c..ed1db344634 100644
--- a/compiler/rustc_span/src/tests.rs
+++ b/compiler/rustc_span/src/tests.rs
@@ -3,9 +3,13 @@ use super::*;
 #[test]
 fn test_lookup_line() {
     let source = "abcdefghijklm\nabcdefghij\n...".to_owned();
-    let mut sf =
-        SourceFile::new(FileName::Anon(Hash64::ZERO), source, SourceFileHashAlgorithm::Sha256)
-            .unwrap();
+    let mut sf = SourceFile::new(
+        FileName::Anon(Hash64::ZERO),
+        source,
+        SourceFileHashAlgorithm::Sha256,
+        Some(SourceFileHashAlgorithm::Sha256),
+    )
+    .unwrap();
     sf.start_pos = BytePos(3);
     assert_eq!(sf.lines(), &[RelativeBytePos(0), RelativeBytePos(14), RelativeBytePos(25)]);