Update src/basic/compound-type/string-slice.md

pull/1577/head
Sunface 1 week ago committed by GitHub
parent d8d592f578
commit c1c1980860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -15,7 +15,7 @@ fn greet(name: String) {
} }
``` ```
`greet` 函数接受一个字符串类型的 `name` 参数,然后打印到终端控制台中,非常好理解,你们猜猜,这段代码能否通过编译? `greet` 函数接受字符串类型的 `name` 参数,打印到终端控制台中,非常好理解。但大家猜猜,这段代码能否通过编译?
```console ```console
error[E0308]: mismatched types error[E0308]: mismatched types

Loading…
Cancel
Save