File: implementation-not-general-enough-ice-133252.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (34 lines) | stat: -rw-r--r-- 1,501 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
error: implementation of `LoadQuery` is not general enough
  --> $DIR/implementation-not-general-enough-ice-133252.rs:9:9
   |
LL |         force_send(async_load(&not_static));
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `LoadQuery` is not general enough
   |
   = note: `LoadQuery<'0>` would have to be implemented for the type `&u8`, for any lifetime `'0`...
   = note: ...but `LoadQuery<'1>` is actually implemented for the type `&'1 u8`, for some specific lifetime `'1`

error[E0597]: `not_static` does not live long enough
  --> $DIR/implementation-not-general-enough-ice-133252.rs:9:31
   |
LL |     async {
   |         - return type of async block is &(dyn Owned + '1)
LL |         let not_static = 0;
   |             ---------- binding `not_static` declared here
LL |         force_send(async_load(&not_static));
   |                    -----------^^^^^^^^^^^-
   |                    |          |
   |                    |          borrowed value does not live long enough
   |                    argument requires that `not_static` is borrowed for `'1`
...
LL |     }
   |     - `not_static` dropped here while still borrowed
   |
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
  --> $DIR/implementation-not-general-enough-ice-133252.rs:16:18
   |
LL | fn force_send<T: Send>(_: T) {}
   |                  ^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0597`.