]>
git.proxmox.com Git - rustc.git/blob - src/tools/rust-analyzer/crates/hir-ty/src/tests/diagnostics.rs
1876be303ad44862802ac0aae149a5502749bfe1
4 fn function_return_type_mismatch_1() {
7 fn test() -> &'static str {
9 //^ expected &str, got i32
16 fn function_return_type_mismatch_2() {
19 fn test(x: bool) -> &'static str {
22 //^ expected &str, got i32
31 fn function_return_type_mismatch_3() {
34 fn test(x: bool) -> &'static str {
39 //^ expected &str, got i32
46 fn function_return_type_mismatch_4() {
49 fn test(x: bool) -> &'static str {
54 //^ expected &str, got i32
62 fn function_return_type_mismatch_5() {
65 fn test(x: bool) -> &'static str {
68 //^ expected &str, got i32
78 fn non_unit_block_expr_stmt_no_semi() {
84 //^^^^^^^ expected (), got &str
87 //^^^^ expected (), got &str
89 match x { true => true, false => 0 }
90 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), got bool
91 //^ expected bool, got i32