File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ fn copy < R : Unpin , W > ( _: R , _: W ) { }
2+
3+ fn f < T > ( r : T ) {
4+ let w = ( ) ;
5+ copy ( r, w) ;
6+ //~^ ERROR [E0277]
7+ }
8+
9+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0277]: `T` cannot be unpinned
2+ --> $DIR/issue-90164.rs:5:10
3+ |
4+ LL | copy(r, w);
5+ | ---- ^ the trait `Unpin` is not implemented for `T`
6+ | |
7+ | required by a bound introduced by this call
8+ |
9+ = note: consider using `Box::pin`
10+ note: required by a bound in `copy`
11+ --> $DIR/issue-90164.rs:1:12
12+ |
13+ LL | fn copy<R: Unpin, W>(_: R, _: W) {}
14+ | ^^^^^ required by this bound in `copy`
15+ help: consider restricting type parameter `T`
16+ |
17+ LL | fn f<T: std::marker::Unpin>(r: T) {
18+ | ++++++++++++++++++++
19+
20+ error: aborting due to previous error
21+
22+ For more information about this error, try `rustc --explain E0277`.
You can’t perform that action at this time.
0 commit comments