Made with KolourPaint and screenshots from Kate (with the GitHub theme).

  • nebeker
    link
    fedilink
    English
    arrow-up
    3
    ·
    8 个月前

    And bow to the compiler’s whims? I think not!

    This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side.

    • Haradion@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      7 个月前

      If type constraints later in the function let the compiler infer the type, this syntax totally works.

      • nebeker
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 个月前

        Like if the variable is then used in a function that only takes one type? Huh.