File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
crates/ide-completion/src/completions Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -541,6 +541,26 @@ fn main() {
541541 r#"fn main() { loop { foo }.$0 }"# ,
542542 r#"fn main() { unsafe { loop { foo } } }"# ,
543543 ) ;
544+ check_edit (
545+ "unsafe" ,
546+ r#"fn main() { if true {}.$0 }"# ,
547+ r#"fn main() { unsafe { if true {} } }"# ,
548+ ) ;
549+ check_edit (
550+ "unsafe" ,
551+ r#"fn main() { while true {}.$0 }"# ,
552+ r#"fn main() { unsafe { while true {} } }"# ,
553+ ) ;
554+ check_edit (
555+ "unsafe" ,
556+ r#"fn main() { for i in 0..10 {}.$0 }"# ,
557+ r#"fn main() { unsafe { for i in 0..10 {} } }"# ,
558+ ) ;
559+ check_edit (
560+ "unsafe" ,
561+ r#"fn main() { let x = if true {1} else {2}.$0 }"# ,
562+ r#"fn main() { let x = unsafe { if true {1} else {2} } }"# ,
563+ ) ;
544564 }
545565
546566 #[ test]
You can’t perform that action at this time.
0 commit comments