Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/simple.rs')
| -rw-r--r-- | crates/hir-ty/src/tests/simple.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/crates/hir-ty/src/tests/simple.rs b/crates/hir-ty/src/tests/simple.rs index 98503452d3..7d4f04268a 100644 --- a/crates/hir-ty/src/tests/simple.rs +++ b/crates/hir-ty/src/tests/simple.rs @@ -2152,10 +2152,11 @@ async fn main() { let z: core::ops::ControlFlow<(), _> = try { () }; let w = const { 92 }; let t = 'a: { 92 }; + let u = try bikeshed core::ops::ControlFlow<(), _> { () }; } "#, expect![[r#" - 16..193 '{ ...2 }; }': () + 16..256 '{ ...) }; }': () 26..27 'x': i32 30..43 'unsafe { 92 }': i32 39..41 '92': i32 @@ -2176,6 +2177,13 @@ async fn main() { 176..177 't': i32 180..190 ''a: { 92 }': i32 186..188 '92': i32 + 200..201 'u': ControlFlow<(), ()> + 204..253 'try bi...{ () }': ControlFlow<(), ()> + 204..253 'try bi...{ () }': fn from_output<ControlFlow<(), ()>>(<ControlFlow<(), ()> as Try>::Output) -> ControlFlow<(), ()> + 204..253 'try bi...{ () }': ControlFlow<(), ()> + 204..253 'try bi...{ () }': ControlFlow<(), ()> + 204..253 'try bi...{ () }': ControlFlow<(), ()> + 249..251 '()': () "#]], ) } @@ -4056,3 +4064,13 @@ fn foo() { "#]], ); } + +#[test] +fn include_bytes_len_mismatch() { + check_no_mismatches( + r#" +//- minicore: include_bytes +static S: &[u8; 158] = include_bytes!("/foo/bar/baz.txt"); + "#, + ); +} |