Merge pull request #529 from Kibiandkimi/master

add editable to problem 4&6 in zh-CN/src/lifetime/advance.md
This commit is contained in:
Sunface
2025-04-25 12:01:29 +08:00
committed by GitHub

View File

@ -101,7 +101,7 @@ impl<'a> PartialEq<i32> for &'a T {
这里只能使用更高级别的约束,因为引用的生命周期比函数上任何可能的生命周期参数都短。
4. 🌟🌟🌟
```rust
```rust,editable
/* 添加 HRTB 使下面代码正常运行! */
fn call_on_ref_zero<'a, F>(f: F) where F: Fn(&'a i32) {
let zero = 0;
@ -237,7 +237,7 @@ struct Ref<'a, T> {
## 艰难的练习
6. 🌟🌟🌟🌟
```rust
```rust,editable
/* 使下面代码正常运行 */
struct Interface<'a> {
manager: &'a mut Manager<'a>