-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix codegen issue for parameters with lifetimes
This commit implements a workaround for an [issue within rustc]. The problem showed itself when using e.g. a `Vec<&str>` argument in an async route handler (but not `&str`), which resulted in a "implementation of `FromForm` is not general enough" error. The workaround itself works by gathering all invocations of `FromForm`'s methods inside a block without any `.await` points [ref]. [issue within rustc]: rust-lang/rust#69663 [ref]: rust-lang/rust#57478 (comment)
- Loading branch information
1 parent
42a0fb8
commit b14e8da
Showing
2 changed files
with
38 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters