The Wayback Machine - https://web.archive.org/web/20220328231204/https://github.com/actix/actix-web/issues/2706
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Documentation For Guard Functions On Attribute Macros #2706

Open
AldaronLau opened this issue Mar 21, 2022 · 0 comments
Open

Incorrect Documentation For Guard Functions On Attribute Macros #2706

AldaronLau opened this issue Mar 21, 2022 · 0 comments
Labels
A-codegen C-docs good-first-issue

Comments

@AldaronLau
Copy link

@AldaronLau AldaronLau commented Mar 21, 2022

Expected Behavior

The notes at https://docs.rs/actix-web/4.0.1/actix_web/attr.get.html#notes hold true.

Current Behavior

Macro expects an Ident here

Possible Solution

Either change from Ident to to Path, or remove the note, since it's not currently true.

Steps to Reproduce (for bugs)

Simply using the syntax:

#[get("path", guard = "module::guard_function")]

Context

I'm trying to use a guard function located within a module with actix-web's #[get] attribute macro, and can't.

Your Environment

  • Rust Version (I.e, output of rustc -V): rustc 1.59.0 (9d1b2106e 2022-02-23)
  • Actix Web Version: 4.0.1
@robjtede robjtede added good-first-issue C-docs A-codegen labels Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen C-docs good-first-issue
2 participants