mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
fix: change 、to .
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
1、
|
||||
1.
|
||||
|
||||
```rust
|
||||
struct DoubleRef<'a,'b:'a, T> {
|
||||
@ -10,7 +10,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
2、
|
||||
2.
|
||||
|
||||
```rust
|
||||
struct ImportantExcerpt<'a> {
|
||||
@ -29,7 +29,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
3、
|
||||
3.
|
||||
|
||||
```rust
|
||||
fn f<'a, 'b>(x: &'a i32, mut y: &'b i32) where 'a: 'b {
|
||||
@ -41,7 +41,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
4、
|
||||
4.
|
||||
|
||||
```rust
|
||||
fn call_on_ref_zero<F>(f: F) where for<'a> F: Fn(&'a i32) {
|
||||
@ -65,7 +65,7 @@ fn call_on_ref_zero<F>(f: F) where F: for<'a> Fn(&'a i32) {
|
||||
}
|
||||
```
|
||||
|
||||
5、
|
||||
5.
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
@ -80,7 +80,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
6、
|
||||
6.
|
||||
|
||||
```rust
|
||||
struct Interface<'b, 'a: 'b> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
1、
|
||||
1.
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
@ -26,7 +26,7 @@ fn need_static(r : &'static str) {
|
||||
}
|
||||
```
|
||||
|
||||
2、
|
||||
2.
|
||||
|
||||
```rust
|
||||
#[derive(Debug)]
|
||||
@ -55,7 +55,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
3、
|
||||
3.
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
@ -67,7 +67,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
5、
|
||||
5.
|
||||
|
||||
```rust
|
||||
use std::fmt::Debug;
|
||||
|
Reference in New Issue
Block a user