File: normalize-hidden-types.current.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (31 lines) | stat: -rw-r--r-- 1,326 bytes parent folder | download | duplicates (7)
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
error: concrete type differs from previous defining opaque type use
  --> $DIR/normalize-hidden-types.rs:38:22
   |
LL |     fn define_2() -> Opaque { dyn_hoops::<u8>(0) }
   |                      ^^^^^^ expected `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`, got `*const dyn FnOnce(())`
   |
note: previous use here
  --> $DIR/normalize-hidden-types.rs:36:22
   |
LL |     fn define_1() -> Opaque { dyn_hoops::<_>(0) }
   |                      ^^^^^^

error[E0308]: mismatched types
  --> $DIR/normalize-hidden-types.rs:47: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: aborting due to 2 previous errors

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