File: ice-index-out-of-bounds-issue-117446.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, 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 (33 lines) | stat: -rw-r--r-- 1,323 bytes parent folder | download | duplicates (4)
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
error[E0049]: associated function `outer` has 0 type parameters but its trait declaration has 1 type parameter
  --> $DIR/ice-index-out-of-bounds-issue-117446.rs:12:13
   |
LL |     fn outer<D>() -> Option<()>;
   |              - expected 1 type parameter
...
LL |     fn outer() -> Option<()> {
   |             ^ found 0 type parameters

error[E0308]: mismatched types
  --> $DIR/ice-index-out-of-bounds-issue-117446.rs:12:19
   |
LL |     fn outer() -> Option<()> {
   |        -----      ^^^^^^^^^^ expected `Option<()>`, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression
   |
   = note:   expected enum `Option<()>`
           found unit type `()`

error[E0401]: can't reference `Self` constructor from outer item
  --> $DIR/ice-index-out-of-bounds-issue-117446.rs:17:22
   |
LL | impl<'a, T> Foo<'a> for Repeated<T> {
   | ----------------------------------- the inner item doesn't inherit generics from this impl, so `Self` is invalid to reference
...
LL |                 _ => Self(unimplemented!()),
   |                      ^^^^ help: replace `Self` with the actual type: `Repeated`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0049, E0308, E0401.
For more information about an error, try `rustc --explain E0049`.