Skip to content

Commit 32c6006

Browse files
committed
Test lowering byte strings some more
1 parent e666589 commit 32c6006

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

crates/hir_ty/src/tests/simple.rs

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -488,23 +488,34 @@ fn infer_literals() {
488488
mod foo {}
489489
"#;
490490
br#"yolo"#;
491+
let a = b"a\x20b\
492+
c";
493+
let b = br"g\
494+
h";
495+
let c = br#"x"\"yb"#;
491496
}
492497
"##,
493498
expect![[r##"
494-
10..216 '{ ...o"#; }': ()
495-
16..20 '5i32': i32
496-
26..30 '5f32': f32
497-
36..40 '5f64': f64
498-
46..53 '"hello"': &str
499-
59..67 'b"bytes"': &[u8; 5]
500-
73..76 ''c'': char
501-
82..86 'b'b'': u8
502-
92..96 '3.14': f64
503-
102..106 '5000': i32
504-
112..117 'false': bool
505-
123..127 'true': bool
506-
133..197 'r#" ... "#': &str
507-
203..213 'br#"yolo"#': &[u8; 4]
499+
18..478 '{ ... }': ()
500+
32..36 '5i32': i32
501+
50..54 '5f32': f32
502+
68..72 '5f64': f64
503+
86..93 '"hello"': &str
504+
107..115 'b"bytes"': &[u8; 5]
505+
129..132 ''c'': char
506+
146..150 'b'b'': u8
507+
164..168 '3.14': f64
508+
182..186 '5000': i32
509+
200..205 'false': bool
510+
219..223 'true': bool
511+
237..333 'r#" ... "#': &str
512+
347..357 'br#"yolo"#': &[u8; 4]
513+
375..376 'a': &[u8; 4]
514+
379..403 'b"a\x2... c"': &[u8; 4]
515+
421..422 'b': &[u8; 4]
516+
425..433 'br"g\ h"': &[u8; 4]
517+
451..452 'c': &[u8; 6]
518+
455..467 'br#"x"\"yb"#': &[u8; 6]
508519
"##]],
509520
);
510521
}

0 commit comments

Comments
 (0)