programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
brokenix@emacs.ch to Rust Programming@lemmy.ml ·
edit-2
10 months ago

#rust folks it's supposed to throw this error without lazy_static crate , but it doesn't?

message-square
message-square
5
link
fedilink
1
message-square

#rust folks it's supposed to throw this error without lazy_static crate , but it doesn't?

brokenix@emacs.ch to Rust Programming@lemmy.ml ·
edit-2
10 months ago
message-square
5
link
fedilink

#rust folks it’s supposed to throw this error without lazy_static crate , but it doesn’t?
https://git.sr.ht/~carnotweat/morning-rust/tree/main/item/sum.rs#L14
cc @rust @learningrustandlemmy

  • brokenix@emacs.chOP
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    10 months ago

    @rust @learningrustandlemmy
    I might have missed some subtle syntactical difference here, I guess
    aas in Vec<...> is a type definition, and Vec::<...> is referring to the struct itself, but with a type parameter given.
    context - https://www.reddit.com/r/learnrust/comments/exmqyc/what_are_the_rules_for_turbofish/

Rust Programming@lemmy.ml

rust@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 12 users / day
  • 27 users / week
  • 77 users / month
  • 579 users / 6 months
  • 269 local subscribers
  • 8.76K subscribers
  • 292 Posts
  • 955 Comments
  • Modlog
  • mods:
  • Nutomic@lemmy.ml
  • Joe@lemmy.ml
  • AgreeableLandscape@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org