Skip to content

#[event(fetch)] should name the generated function after the input #9

@jyn514

Description

@jyn514

This error is confusing:

error[E0428]: the name `fetch` is defined multiple times
  --> rust-sandbox/src/lib.rs:38:1
   |
36 | fn fetch() {}
   | ---------- previous definition of the value `fetch` here
37 | 
38 | #[event(fetch, respond_with_errors)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fetch` redefined here
   |
   = note: `fetch` must be defined only once in the value namespace of this module
   = note: this error originates in the attribute macro `event` (in Nightly builds, run with -Z macro-backtrace for more info)

It would be better to name the generated function whatever it was originally (in this case, main).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions