1
1
error[E0658]: pinned reference syntax is experimental
2
- --> $DIR/feature-gate-pin_ergonomics.rs:13:14
2
+ --> $DIR/feature-gate-pin_ergonomics.rs:10:19
3
+ |
4
+ LL | fn foo_sugar(&pin mut self) {}
5
+ | ^^^
6
+ |
7
+ = note: see issue #130494 <https://github.com/rust-lang/rust/issues/130494> for more information
8
+ = help: add `#![feature(pin_ergonomics)]` to the crate attributes to enable
9
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
+
11
+ error[E0658]: pinned reference syntax is experimental
12
+ --> $DIR/feature-gate-pin_ergonomics.rs:11:25
13
+ |
14
+ LL | fn foo_sugar_const(&pin const self) {}
15
+ | ^^^
16
+ |
17
+ = note: see issue #130494 <https://github.com/rust-lang/rust/issues/130494> for more information
18
+ = help: add `#![feature(pin_ergonomics)]` to the crate attributes to enable
19
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20
+
21
+ error[E0658]: pinned reference syntax is experimental
22
+ --> $DIR/feature-gate-pin_ergonomics.rs:17:14
3
23
|
4
24
LL | let _y: &pin mut Foo = x;
5
25
| ^^^
@@ -9,7 +29,7 @@ LL | let _y: &pin mut Foo = x;
9
29
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
30
11
31
error[E0658]: pinned reference syntax is experimental
12
- --> $DIR/feature-gate-pin_ergonomics.rs:16 :18
32
+ --> $DIR/feature-gate-pin_ergonomics.rs:20 :18
13
33
|
14
34
LL | fn foo_sugar(_: &pin mut Foo) {}
15
35
| ^^^
@@ -19,7 +39,7 @@ LL | fn foo_sugar(_: &pin mut Foo) {}
19
39
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20
40
21
41
error[E0658]: pinned reference syntax is experimental
22
- --> $DIR/feature-gate-pin_ergonomics.rs:28 :18
42
+ --> $DIR/feature-gate-pin_ergonomics.rs:32 :18
23
43
|
24
44
LL | fn baz_sugar(_: &pin const Foo) {}
25
45
| ^^^
@@ -29,7 +49,7 @@ LL | fn baz_sugar(_: &pin const Foo) {}
29
49
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
30
50
31
51
error[E0382]: use of moved value: `x`
32
- --> $DIR/feature-gate-pin_ergonomics.rs:20 :9
52
+ --> $DIR/feature-gate-pin_ergonomics.rs:24 :9
33
53
|
34
54
LL | fn bar(x: Pin<&mut Foo>) {
35
55
| - move occurs because `x` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
@@ -39,15 +59,15 @@ LL | foo(x);
39
59
| ^ value used here after move
40
60
|
41
61
note: consider changing this parameter type in function `foo` to borrow instead if owning the value isn't necessary
42
- --> $DIR/feature-gate-pin_ergonomics.rs:12:11
62
+ --> $DIR/feature-gate-pin_ergonomics.rs:14:15
43
63
|
44
- LL | fn foo(x: Pin<&mut Foo>) {
45
- | --- ^^^^^^^^^^^^^ this parameter takes ownership of the value
64
+ LL | fn foo(mut x: Pin<&mut Foo>) {
65
+ | --- ^^^^^^^^^^^^^ this parameter takes ownership of the value
46
66
| |
47
67
| in this function
48
68
49
69
error[E0382]: use of moved value: `x`
50
- --> $DIR/feature-gate-pin_ergonomics.rs:25 :5
70
+ --> $DIR/feature-gate-pin_ergonomics.rs:29 :5
51
71
|
52
72
LL | fn baz(mut x: Pin<&mut Foo>) {
53
73
| ----- move occurs because `x` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
@@ -66,7 +86,7 @@ help: consider reborrowing the `Pin` instead of moving it
66
86
LL | x.as_mut().foo();
67
87
| +++++++++
68
88
69
- error: aborting due to 5 previous errors
89
+ error: aborting due to 7 previous errors
70
90
71
91
Some errors have detailed explanations: E0382, E0658.
72
92
For more information about an error, try `rustc --explain E0382`.
0 commit comments