File: normalize-hidden-types.current.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 (55 lines) | stat: -rw-r--r-- 2,204 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
48
49
50
51
52
53
54
55
error: concrete type differs from previous defining opaque type use
  --> $DIR/normalize-hidden-types.rs:26:20
   |
LL |     fn define() -> Opaque {
   |                    ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`
   |
note: previous use here
  --> $DIR/normalize-hidden-types.rs:27:9
   |
LL |         dyn_hoops::<_>(0)
   |         ^^^^^^^^^^^^^^^^^

error: concrete type differs from previous defining opaque type use
  --> $DIR/normalize-hidden-types.rs:34:22
   |
LL |     fn define_1() -> Opaque { dyn_hoops::<_>(0) }
   |                      ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`
   |
note: previous use here
  --> $DIR/normalize-hidden-types.rs:34:31
   |
LL |     fn define_1() -> Opaque { dyn_hoops::<_>(0) }
   |                               ^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> $DIR/normalize-hidden-types.rs:43:25
   |
LL |     type Opaque = impl Sized;
   |                   ---------- the expected opaque type
...
LL |         let _: Opaque = dyn_hoops::<u8>(0);
   |                ------   ^^^^^^^^^^^^^^^^^^ expected opaque type, found `*const dyn FnOnce(())`
   |                |
   |                expected due to this
   |
   = note: expected opaque type `typeck::Opaque`
              found raw pointer `*const (dyn FnOnce(()) + 'static)`
   = help: consider constraining the associated type `<u8 as Trait>::Gat<'_>` to `()` or calling a method that returns `<u8 as Trait>::Gat<'_>`
   = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html

error: concrete type differs from previous defining opaque type use
  --> $DIR/normalize-hidden-types.rs:52:25
   |
LL |         let _: Opaque = dyn_hoops::<_>(0);
   |                         ^^^^^^^^^^^^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`
   |
note: previous use here
  --> $DIR/normalize-hidden-types.rs:53:9
   |
LL |         None
   |         ^^^^

error: aborting due to 4 previous errors

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