File: nested-impl-trait-in-tait.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 (47 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download | duplicates (5)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
error[E0261]: use of undeclared lifetime name `'db`
  --> $DIR/nested-impl-trait-in-tait.rs:3:40
   |
LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
   |                                        ^^^ undeclared lifetime
   |
   = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'db` lifetime
   |
LL | pub type Tait = impl for<'db> Iterator<Item = (&'db LocalKey, impl Iterator)>;
   |                      ++++++++
help: consider introducing lifetime `'db` here
   |
LL | pub type Tait<'db> = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
   |              +++++

error[E0412]: cannot find type `LocalKey` in this scope
  --> $DIR/nested-impl-trait-in-tait.rs:3:44
   |
LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
   |                                            ^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
LL + use std::thread::LocalKey;
   |

error: unconstrained opaque type
  --> $DIR/nested-impl-trait-in-tait.rs:3:17
   |
LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `Tait` must be used in combination with a concrete type within the same module

error: unconstrained opaque type
  --> $DIR/nested-impl-trait-in-tait.rs:3:54
   |
LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
   |                                                      ^^^^^^^^^^^^^
   |
   = note: `Tait` must be used in combination with a concrete type within the same module

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0261, E0412.
For more information about an error, try `rustc --explain E0261`.