diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-08-31 22:12:47 +0200 | 
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-09-07 13:05:05 +0200 | 
| commit | f49382c0508db608aa9c33d6a8c77d2955d8f62c (patch) | |
| tree | 85be68eacbc6325822cf64fba8e4841474065607 /compiler/rustc_span/src/tests.rs | |
| parent | c5996b80beaba54502fa86583b48cd6980b17b18 (diff) | |
| download | rust-f49382c0508db608aa9c33d6a8c77d2955d8f62c.tar.gz rust-f49382c0508db608aa9c33d6a8c77d2955d8f62c.zip  | |
Use `Freeze` for `SourceFile.lines`
Diffstat (limited to 'compiler/rustc_span/src/tests.rs')
| -rw-r--r-- | compiler/rustc_span/src/tests.rs | 4 | 
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/tests.rs b/compiler/rustc_span/src/tests.rs index a980ee8d9e0..cb88fa89058 100644 --- a/compiler/rustc_span/src/tests.rs +++ b/compiler/rustc_span/src/tests.rs @@ -7,9 +7,7 @@ fn test_lookup_line() { SourceFile::new(FileName::Anon(Hash64::ZERO), source, SourceFileHashAlgorithm::Sha256) .unwrap(); sf.start_pos = BytePos(3); - sf.lines(|lines| { - assert_eq!(lines, &[RelativeBytePos(0), RelativeBytePos(14), RelativeBytePos(25)]) - }); + assert_eq!(sf.lines(), &[RelativeBytePos(0), RelativeBytePos(14), RelativeBytePos(25)]); assert_eq!(sf.lookup_line(RelativeBytePos(0)), Some(0)); assert_eq!(sf.lookup_line(RelativeBytePos(1)), Some(0));  | 
