repo stringclasses 47
values | pull_number int64 2 17k | instance_id stringlengths 14 36 | issue_numbers listlengths 1 3 | base_commit stringlengths 40 40 | patch stringlengths 274 1.45M | test_patch stringlengths 254 594k | problem_statement stringlengths 34 44.3k | hints_text stringlengths 0 66.2k | created_at stringdate 2017-03-29 16:32:14 2024-12-29 18:55:13 | version stringclasses 76
values | updated_at stringdate 2017-04-05 19:13:00 2025-03-25 20:07:17 | environment_setup_commit stringlengths 40 40 | FAIL_TO_PASS listlengths 1 1.57k | PASS_TO_PASS listlengths 0 1.78k | FAIL_TO_FAIL listlengths 0 83 | PASS_TO_FAIL listlengths 0 3 | source_dir stringclasses 13
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
async-graphql/async-graphql | 1,524 | async-graphql__async-graphql-1524 | [
"1187"
] | 9d1befde1444a3d6a9dfdc62750ba271159c7173 | diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs
--- a/src/registry/export_sdl.rs
+++ b/src/registry/export_sdl.rs
@@ -95,15 +95,6 @@ impl Registry {
pub(crate) fn export_sdl(&self, options: SDLExportOptions) -> String {
let mut sdl = String::new();
- let has_oneof = self
- ... | diff --git a/tests/directive.rs b/tests/directive.rs
--- a/tests/directive.rs
+++ b/tests/directive.rs
@@ -1,4 +1,5 @@
use async_graphql::*;
+use serde::{Deserialize, Serialize};
#[tokio::test]
pub async fn test_directive_skip() {
diff --git a/tests/directive.rs b/tests/directive.rs
--- a/tests/directive.rs
+++ b/... | Oneof directive not included in introspection result
## Expected Behavior
I would expect the `@oneof` directive to be included in the result of an introspection query whenever the `#[derive(OneofObject)]` macro is used on a struct.
## Actual Behavior
The directive is not listed in the introspection query result:
... | GraphiQL doesn't seem to support oneof.
`Type` contains `oneOf` field, but GraphiQL is not querying it.
https://github.com/async-graphql/async-graphql/blob/e2e35ce93f1032d6467144c7fa8f0783e1dde04b/src/model/type.rs#L241
Yes, that is true. Probably because it is still in RFC2 (Draft) phase. They renamed it to `isO... | 2024-05-18T14:33:38Z | 7.0 | 2024-05-19T00:59:07Z | faa78d071cfae795dacc39fd46900fdfb6157d0d | [
"test_includes_deprecated_directive",
"test_includes_specified_by_directive",
"test_introspection_directives",
"test_type_directive_2"
] | [
"dataloader::tests::test_dataloader_load_empty",
"dataloader::tests::test_dataloader_disable_cache",
"dataloader::tests::test_duplicate_keys",
"dataloader::tests::test_dataloader_disable_all_cache",
"dynamic::check::tests::test_recursive_input_objects_bad",
"dynamic::check::tests::test_recursive_input_obj... | [] | [] | auto_2025-06-06 |
async-graphql/async-graphql | 1,491 | async-graphql__async-graphql-1491 | [
"1486"
] | 759fb0e594606aecf4a239b00d6f3f8aeb22d885 | diff --git a/src/validation/rules/default_values_of_correct_type.rs b/src/validation/rules/default_values_of_correct_type.rs
--- a/src/validation/rules/default_values_of_correct_type.rs
+++ b/src/validation/rules/default_values_of_correct_type.rs
@@ -29,12 +29,7 @@ impl<'a> Visitor<'a> for DefaultValuesOfCorrectType {
... | diff --git a/src/validation/rules/default_values_of_correct_type.rs b/src/validation/rules/default_values_of_correct_type.rs
--- a/src/validation/rules/default_values_of_correct_type.rs
+++ b/src/validation/rules/default_values_of_correct_type.rs
@@ -101,8 +96,8 @@ mod tests {
}
#[test]
- fn no_required_... | Non nullable variables should allow default values
## Expected Behavior
Queries should be able to define non-nullable variables with default variables. This is currently prevented by the check here:
https://github.com/async-graphql/async-graphql/blob/759fb0e594606aecf4a239b00d6f3f8aeb22d885/src/validation/rules/de... | Here's a quick example of this working using the reference graphql-js implementation: https://stackblitz.com/edit/typescript-5qrssw?file=index.ts
Could you be so kind to share a snippet of the source code, that raises the error above?
Here's a simple reproduction: https://github.com/hayes/repro-async-graphql-non-null-v... | 2024-03-13T23:43:22Z | 7.0 | 2024-03-16T01:52:32Z | faa78d071cfae795dacc39fd46900fdfb6157d0d | [
"validation::rules::default_values_of_correct_type::tests::required_variables_with_default_values",
"test_required_variable_with_default"
] | [
"dataloader::tests::test_dataloader_load_empty",
"dataloader::tests::test_dataloader_disable_cache",
"dataloader::tests::test_dataloader_disable_all_cache",
"dataloader::tests::test_duplicate_keys",
"dynamic::check::tests::test_recursive_input_objects_bad",
"dynamic::check::tests::test_recursive_input_obj... | [] | [] | auto_2025-06-06 |
async-graphql/async-graphql | 10 | async-graphql__async-graphql-10 | [
"9"
] | ba64ecc31d8c94b29b481a4c6a6573e397a1a132 | diff --git /dev/null b/examples/error_extensions.rs
new file mode 100644
--- /dev/null
+++ b/examples/error_extensions.rs
@@ -0,0 +1,108 @@
+use actix_rt;
+use actix_web::{guard, web, App, HttpResponse, HttpServer};
+use async_graphql::http::{graphiql_source, playground_source, GQLRequest, GQLResponse};
+use async_grap... | diff --git a/src/http/mod.rs b/src/http/mod.rs
--- a/src/http/mod.rs
+++ b/src/http/mod.rs
@@ -259,6 +270,30 @@ mod tests {
);
}
+ #[test]
+ fn test_response_error_with_extension() {
+ let err = ExtendedError(
+ "MyErrorMessage".to_owned(),
+ json!({
+ "... | Support Error Extensions
Hey,
first of all, I really enjoy using your library so far. I think it is already very comprehensive. One thing I am missing though is returning extensions for errors as described [here](https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md) in the spec. Some... | Thank you for your advice, that's a great idea, and I really need your help. These days I want to optimize the code in the subscription to make it easier to use, so our work doesn't conflict.If you have time, you can help implement `ErrorExtensions'.😁
Thanks again!
I thought a little about it and started implementing... | 2020-03-29T15:00:42Z | 1.6 | 2020-03-30T06:36:27Z | ba64ecc31d8c94b29b481a4c6a6573e397a1a132 | [
"http::tests::test_request",
"http::tests::test_request_with_operation_name",
"http::tests::test_response_data",
"http::tests::test_request_with_variables",
"http::tests::test_response_error",
"scalars::tests::test_scalar_type",
"types::list::tests::test_list_type",
"http::tests::test_response_error_w... | [] | [] | [] | auto_2025-06-06 |
async-graphql/async-graphql | 170 | async-graphql__async-graphql-170 | [
"169"
] | 2e9557ff1c1482acce1337508b81ccdde09009a9 | diff --git a/src/context.rs b/src/context.rs
--- a/src/context.rs
+++ b/src/context.rs
@@ -424,6 +424,16 @@ impl<'a, T> ContextBase<'a, T> {
} else if let Some(default) = &def.default_value {
return Ok(default.clone_inner());
}
+ match def.var_type.deref() {
+ ... | diff --git a/tests/variables.rs b/tests/variables.rs
--- a/tests/variables.rs
+++ b/tests/variables.rs
@@ -71,6 +71,69 @@ pub async fn test_variable_default_value() {
);
}
+#[async_std::test]
+pub async fn test_variable_no_value() {
+ struct QueryRoot;
+
+ #[Object]
+ impl QueryRoot {
+ pub asyn... | invalid: Variable "$var" is not defined
When executing a query in async-graphql, I'm getting a "Variable ... is not defined" error when I don't think I should be.
A query like
```graphql
query TestQuery($var: Boolean) {
test(var: $var) {
id
}
}
```
with no variables
```json
{}
```
... | 2020-06-11T15:33:20Z | 1.15 | 2020-06-12T01:35:38Z | 2e9557ff1c1482acce1337508b81ccdde09009a9 | [
"test_variable_no_value"
] | [
"validation::rules::arguments_of_correct_type::tests::incorrect_item_type",
"validation::rules::arguments_of_correct_type::tests::incorrect_value_and_missing_argument",
"types::list::tests::test_list_type",
"http::tests::test_request",
"validation::rules::arguments_of_correct_type::tests::boolean_into_id",
... | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 233 | dtolnay__async-trait-233 | [
"232"
] | d71c74de7b445060462c40f223f10cbe270c5250 | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -297,10 +297,16 @@ fn transform_sig(
}) => {}
FnArg::Receiver(arg) => arg.mutability = None,
FnArg::Typed(arg) => {
- if let Pat::Ident(ident) = &mut *arg.pat {
- ... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1489,3 +1489,37 @@ pub mod issue226 {
}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/232
+pub mod issue232 {
+ use async_trait::async_trait;
+
+ #[async_trait]
+ pub trait Generic<T> {
+ asyn... | Do not require Sync on unused shared reference arguments
```rust
use async_trait::async_trait;
#[async_trait]
trait Generic<T> {
async fn takes_ref(&self, thing: &T);
}
#[async_trait]
impl<T> Generic<T> for () {
async fn takes_ref(&self, _: &T) {}
}
```
This currently fails because it expands t... | 2023-01-22T21:22:12Z | 0.1 | 2023-01-22T21:25:44Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"issue199::test",
"drop_order::test_drop_order",
"issue45::tracing",
"src/lib.rs - (line 165) - compile fail",
"src/lib.rs - (line 15) - compile fail",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 47)",
"src/lib.rs - (line 211)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 265)",
"src/lib.r... | [] | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 107 | dtolnay__async-trait-107 | [
"106"
] | 7c746b6ee601c51c557c9f4c32230f5c9a9934be | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -81,6 +81,13 @@ pub fn expand(input: &mut Item, is_local: bool) {
}
}
Item::Impl(input) => {
+ let mut lifetimes = CollectLifetimes::with("'impl_life");
+ lifetimes.visit_type_mut(&... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -905,3 +905,35 @@ mod issue104 {
impl_t1!(Foo, 1);
}
+
+// https://github.com/dtolnay/async-trait/issues/106
+mod issue106 {
+ use async_trait::async_trait;
+ use std::future::Future;
+
+ #[async_trait]
+ pub trait... | Translation of lifetimes in Fn trait input parameters
I think this is a fairly niche and easy to work around case but it's a surprising footgun that might be worth a fix?
```rust
use async_trait::async_trait;
use core::future::Future;
#[async_trait]
pub trait ProcessPool: Send + Sync {
type ThreadPool;
... | EDIT: Sorry, this comment is incorrect. I was trying to convert an irrelevant lifetime to `'static`.
EDIT2: See https://github.com/dtolnay/async-trait/issues/106#issuecomment-640927871
> This can be resolved by translating instead to `<&'static P as ProcessPool>::ThreadPool`. I don't know if this breaks other use c... | 2020-06-09T01:15:55Z | 0.1 | 2020-06-09T01:33:55Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"issue45::tracing",
"src/lib.rs - (line 15)",
"src/lib.rs - (line 165)",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 211)",
"src/lib.rs - (line 47)"
] | [] | [] | [] | auto_2025-06-06 |
dtolnay/async-trait | 105 | dtolnay__async-trait-105 | [
"104"
] | 5220bbd2bdf30fa43c78d08a8e9a9f311a239cf8 | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -258,7 +258,7 @@ fn transform_block(
let inner = format_ident!("__{}", sig.ident);
let args = sig.inputs.iter().enumerate().map(|(i, arg)| match arg {
- FnArg::Receiver(_) => quote!(self),
+ FnArg::Receiver(R... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -556,10 +556,10 @@ pub mod issue45 {
pub mod issue46 {
use async_trait::async_trait;
- macro_rules! implement_commands {
+ macro_rules! implement_commands_workaround {
($tyargs:tt : $ty:tt) => {
#[a... | Problem with declarative macros
Hello there. I have problem with declarative macros. The code is simplified as below:
```Rust
use async_trait::async_trait;
#[async_trait]
trait T1 {
async fn id(&self) -> i32;
}
macro_rules! impl_t1 {
($ty: ty, $id: expr) => {
#[async_trait]
impl ... | This is a compiler bug (https://github.com/rust-lang/rust/issues/43081). You can work around it by writing the decl macro as:
```rust
macro_rules! impl_t1 {
($ty:tt, $($id:tt)*) => {
#[async_trait]
impl T1 for $ty {
async fn id(&self) -> i32 {
$($id)*
... | 2020-06-08T03:01:30Z | 0.1 | 2020-06-08T23:44:42Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"issue45::tracing",
"src/lib.rs - (line 15)",
"src/lib.rs - (line 165)",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 211)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 47)"
] | [] | [] | [] | auto_2025-06-06 |
dtolnay/async-trait | 100 | dtolnay__async-trait-100 | [
"92"
] | bee997398ff951b505f251b237dd08eeddd8e9c7 | diff --git a/src/receiver.rs b/src/receiver.rs
--- a/src/receiver.rs
+++ b/src/receiver.rs
@@ -1,4 +1,5 @@
use proc_macro2::{Group, TokenStream, TokenTree};
+use quote::quote;
use std::iter::FromIterator;
use std::mem;
use syn::punctuated::Punctuated;
diff --git a/src/receiver.rs b/src/receiver.rs
--- a/src/receive... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -785,3 +785,85 @@ pub mod issue89 {
async fn f(&self) {}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/92
+pub mod issue92 {
+ use async_trait::async_trait;
+
+ macro_rules! mac {
+ ($($tt:tt)*) =... | Self keyword inside macro invocations in trait impl
Issue #73 only revealed part of the problem, and only part of it was fixed.
Since Merge Request #74 `Self` inside macro invocation works when used in the trait declaration, but the issue persists in the trait impl. See this example:
```rust
use async_trait::asy... | I ran into the same bug, it's still present in 0.1.31 and the workaround still works. | 2020-05-25T12:31:51Z | 0.1 | 2020-06-01T05:15:59Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"issue45::tracing",
"src/lib.rs - (line 15)",
"src/lib.rs - (line 165)",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 211)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 47)"
] | [] | [] | [] | auto_2025-06-06 |
dtolnay/async-trait | 90 | dtolnay__async-trait-90 | [
"89"
] | 05c24928d08c46ee1a916b1dff7f6dd389b21c94 | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -342,8 +342,17 @@ fn transform_block(
};
}
Context::Impl { receiver, .. } => {
+ let mut ty = quote!(#receiver);
+ if let Type::TraitObject(t... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -622,3 +622,30 @@ pub mod issue87 {
}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/89
+pub mod issue89 {
+ #![allow(bare_trait_objects)]
+
+ use async_trait::async_trait;
+
+ #[async_trait]
+ trai... | Forgetting "dyn" before Fn() + Trait causes panic
In non-async-trait code, this is currently legal, though it emits a warning that it should have the `dyn` keyword:
```
impl<F> Foo for Fn(i8) -> F + Send + Sync
where F: ... {}
```
In async-trait code, this causes a panic:
```
#[async_trait::async_trait]
i... | 2020-04-07T03:09:00Z | 0.1 | 2020-04-07T03:12:34Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"src/lib.rs - (line 10)",
"src/lib.rs - (line 160)",
"src/lib.rs - (line 121)",
"src/lib.rs - (line 281)",
"src/lib.rs - (line 181)",
"src/lib.rs - (line 260)",
"src/lib.rs - (line 42)",
"src/lib.rs - (line 206)"
] | [] | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 160 | dtolnay__async-trait-160 | [
"158"
] | 6bff4e0c5935b30b4d5af42bb06d9972866c752d | diff --git a/src/receiver.rs b/src/receiver.rs
--- a/src/receiver.rs
+++ b/src/receiver.rs
@@ -2,7 +2,7 @@ use proc_macro2::{Group, Span, TokenStream, TokenTree};
use std::iter::FromIterator;
use syn::visit_mut::{self, VisitMut};
use syn::{
- Block, ExprPath, Ident, Item, Macro, Pat, PatIdent, PatPath, Receiver, ... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1321,3 +1321,17 @@ pub mod issue154 {
}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/158
+pub mod issue158 {
+ use async_trait::async_trait;
+
+ fn f() {}
+
+ #[async_trait]
+ pub trait Trait {
+... | Failed to resolve `self` in path
Macro doesn't handle when `self` is used as path.
```rust
use async_trait::async_trait; // 0.1.48
fn bar() {}
#[async_trait]
trait Foo {
async fn bar(&self) {
self::bar()
}
}
```
```rust
error[E0433]: failed to resolve: use of undeclared crate or module `... | 2021-04-14T06:06:02Z | 0.1 | 2021-04-14T06:09:19Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"drop_order::test_drop_order",
"issue45::tracing",
"src/lib.rs - (line 15)",
"src/lib.rs - (line 165)",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 47)",
"src/lib.rs - (line 211)"
] | [] | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 150 | dtolnay__async-trait-150 | [
"149"
] | 2c4cde7ce826c77fe08a8f67d6fdc47b023adf0f | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -350,6 +350,9 @@ fn transform_block(sig: &mut Signature, block: &mut Block) {
let _: () = { #(#decls)* #(#stmts)* };
},
ReturnType::Type(_, ret) => quote_spanned! {block.brace_token.span=>
+ i... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1258,3 +1258,23 @@ pub mod issue147 {
}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/149
+pub mod issue149 {
+ use async_trait::async_trait;
+
+ pub struct Thing;
+ pub trait Ret {}
+ impl Ret fo... | Unsize coercion fails if end of method is unreachable
The following async trait fails to compile. Notice that the same method body is fine in an ordinary async fn outside of an async trait.
This worked prior to #143.
```rust
use async_trait::async_trait;
struct Thing;
trait Ret {}
impl Ret for Thing {}
a... | 2021-03-07T05:06:30Z | 0.1 | 2021-03-07T05:12:13Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"issue45::tracing",
"drop_order::test_drop_order",
"src/lib.rs - (line 15)",
"src/lib.rs - (line 165)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 211)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 47)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 126)"
] | [] | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 227 | dtolnay__async-trait-227 | [
"226"
] | 6050c94ca7be287be1657fcefd299165e39c7ef2 | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -362,6 +362,12 @@ fn transform_block(context: Context, sig: &mut Signature, block: &mut Block) {
quote!(let #mutability #ident = #self_token;)
}
FnArg::Typed(arg) => {
+ // If ... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -54,6 +54,10 @@ trait Trait {
async fn calls_mut(&mut self) {
self.selfmut().await;
}
+
+ async fn cfg_param(&self, param: u8);
+ async fn cfg_param_wildcard(&self, _: u8);
+ async fn cfg_param_tuple(&self,... | Attributes on impl parameters are not forwarded to body
Heya, I was implementing a trait function with `#[cfg(..)]` in its parameters, and encountered the following error:
```rust
// within trait impl
async fn cfg_param(
&self,
#[cfg(not(feature = "something"))] param: u8,
#[cfg(feature = "something... | 2023-01-06T01:44:31Z | 0.1 | 2023-01-06T22:57:17Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"drop_order::test_drop_order",
"issue199::test",
"issue45::tracing",
"src/lib.rs - (line 15) - compile fail",
"src/lib.rs - (line 165) - compile fail",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 47)",
"src/lib.r... | [] | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 223 | dtolnay__async-trait-223 | [
"210"
] | 9ed6489ee0cedf31fef8a06a1dcd1f18b4afdd39 | diff --git a/src/expand.rs b/src/expand.rs
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -9,9 +9,9 @@ use std::mem;
use syn::punctuated::Punctuated;
use syn::visit_mut::{self, VisitMut};
use syn::{
- parse_quote, parse_quote_spanned, Attribute, Block, FnArg, GenericParam, Generics, Ident,
- ImplItem, Lifetime, Li... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1450,3 +1450,14 @@ pub mod issue204 {
async fn g(arg: *const impl Trait);
}
}
+
+// https://github.com/dtolnay/async-trait/issues/210
+pub mod issue210 {
+ use async_trait::async_trait;
+ use std::sync::Arc;
+
+ ... | Defaulted method with `self: Arc<Self>` doesn't work
`Arc` generates a `where Self: Send` bound, but for `Arc` it is not enough - it requires also `T: Sync` to be `Send`. This make the following code failing to compile:
```rust
#[async_trait]
trait Trait {
async fn foo(self: Arc<Self>) {}
}
```
https://play... | 2022-11-29T08:05:19Z | 0.1 | 2022-11-29T08:11:36Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"drop_order::test_drop_order",
"issue199::test",
"issue45::tracing",
"src/lib.rs - (line 165) - compile fail",
"src/lib.rs - (line 15) - compile fail",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 47)",
"src/lib.r... | [] | [] | [] | auto_2025-06-06 | |
dtolnay/async-trait | 201 | dtolnay__async-trait-201 | [
"177"
] | 9a323ed6dad1dfc651147814d4d418cf09d6e17b | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
-syn = { version = "1.0.84", features = ["full", "visit-mut"] }
+syn = { version = "1.0.96", features = ["full", "visit-mut"] }
[dev-dependencies]
futures = ... | diff --git a/tests/test.rs b/tests/test.rs
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1374,6 +1374,23 @@ pub mod issue169 {
pub fn test(_t: &dyn Trait) {}
}
+// https://github.com/dtolnay/async-trait/issues/177
+pub mod issue177 {
+ use async_trait::async_trait;
+
+ #[async_trait]
+ pub trait Trait {
... | Lifetime issue when using "impl FnMut" as argument type
**Case 1:**
```rust
async fn foo(&self, mut callback: impl FnMut(&str) + Send)
```
expands to:
```rust
fn foo<'life0, 'life1, 'async_trait>(
&'life0 self,
callback: impl FnMut(&'life1 str) + Send,
) -> ::core::pin::Pin<
B... | I would accept a PR to support this as suggested in the forum thread (`callback: impl 'async_trait + FnMut(&str) + Send`). | 2022-06-02T20:27:22Z | 0.1 | 2022-06-02T20:33:38Z | f8e5bb43181450a17068f160e8a51d410ede1705 | [
"drop_order::test_drop_order",
"issue45::tracing",
"src/lib.rs - (line 15) - compile fail",
"src/lib.rs - (line 165) - compile fail",
"src/lib.rs - (line 126)",
"src/lib.rs - (line 186)",
"src/lib.rs - (line 286)",
"src/lib.rs - (line 265)",
"src/lib.rs - (line 47)",
"src/lib.rs - (line 211)"
] | [] | [] | [] | auto_2025-06-06 |
atuinsh/atuin | 747 | atuinsh__atuin-747 | [
"745"
] | d46e3ad47d03e53232269973806fb9da2248ba19 | diff --git a/atuin-client/src/import/bash.rs b/atuin-client/src/import/bash.rs
--- a/atuin-client/src/import/bash.rs
+++ b/atuin-client/src/import/bash.rs
@@ -1,8 +1,10 @@
-use std::{fs::File, io::Read, path::PathBuf};
+use std::{fs::File, io::Read, path::PathBuf, str};
use async_trait::async_trait;
+use chrono::{Da... | diff --git a/atuin-client/src/import/bash.rs b/atuin-client/src/import/bash.rs
--- a/atuin-client/src/import/bash.rs
+++ b/atuin-client/src/import/bash.rs
@@ -70,18 +89,47 @@ impl Importer for Bash {
}
}
+#[derive(Debug, Clone)]
+enum LineType<'a> {
+ NotUtf8,
+ /// A timestamp line start with a '#', foll... | Bash history import issues
I spotted two issues while trying to import my Bash history:
1. Import ordering is incorrectly reversed.
2. `.bash_history` can be configured to store timestamps, a case not handled.
---
## Ordering
In the following snippet, lines from the top of the file will receive the newest ... | 2023-03-01T16:30:56Z | 13.0 | 2023-04-05T15:22:17Z | edcd477153d00944c5dae16ec3ba69e339e1450c | [
"encryption::test::test_encrypt_decrypt",
"import::zsh::test::test_parse_extended_simple",
"import::zsh::test::test_parse_file",
"import::fish::test::parse_complex",
"import::zsh_histdb::test::test_env_vars",
"import::zsh_histdb::test::test_import",
"database::test::test_search_prefix",
"database::tes... | [] | [] | [] | auto_2025-06-06 | |
atuinsh/atuin | 1,238 | atuinsh__atuin-1238 | [
"691"
] | 15abf429842969e56598b1922a21693a7253f117 | diff --git a/atuin-client/src/api_client.rs b/atuin-client/src/api_client.rs
--- a/atuin-client/src/api_client.rs
+++ b/atuin-client/src/api_client.rs
@@ -1,5 +1,6 @@
use std::collections::HashMap;
use std::env;
+use std::time::Duration;
use eyre::{bail, Result};
use reqwest::{
diff --git a/atuin-client/src/api_c... | diff --git a/atuin-client/src/api_client.rs b/atuin-client/src/api_client.rs
--- a/atuin-client/src/api_client.rs
+++ b/atuin-client/src/api_client.rs
@@ -106,7 +107,12 @@ pub async fn latest_version() -> Result<Version> {
}
impl<'a> Client<'a> {
- pub fn new(sync_addr: &'a str, session_token: &'a str) -> Result... | atuin hangs at first start in bad network environments
This issue can be reproduced with the following preconditions:
- a really (as in awfully) bad network environment with a rather large-ish (>=98%) packet loss rate
- using atuin to browse the history the first time after boot
Atuin hangs for an indefinite amo... | Thanks for the report. I reckon I can rewrite this part to get the version lazily
https://user-images.githubusercontent.com/6625462/216926816-fd536a1c-8f35-4a89-b097-8224638960bd.mov
There we go :)
This issue is sort of fixed but there's a related problem. There were 2 issues here:
1. Atuin _was_ blocking on that... | 2023-09-17T17:26:20Z | 16.0 | 2023-09-18T07:39:20Z | 1735be05d71ec21ffb8648866fca83e210cfe31a | [
"encryption::test::test_decode_old",
"encryption::test::test_decode",
"encryption::test::key_encodings",
"encryption::test::test_decode_deleted",
"encryption::test::test_encrypt_decrypt",
"kv::tests::encode_decode",
"import::zsh::test::test_parse_extended_simple",
"import::bash::test::parse_with_parti... | [] | [] | [] | auto_2025-06-06 |
atuinsh/atuin | 2,058 | atuinsh__atuin-2058 | [
"1882"
] | 4d74e38a515bc14381e1342afdf5ee2ec345f589 | diff --git a/crates/atuin-history/src/stats.rs b/crates/atuin-history/src/stats.rs
--- a/crates/atuin-history/src/stats.rs
+++ b/crates/atuin-history/src/stats.rs
@@ -92,7 +92,7 @@ fn split_at_pipe(command: &str) -> Vec<&str> {
"\\" => if graphemes.next().is_some() {},
"|" => {
... | diff --git a/crates/atuin-history/src/stats.rs b/crates/atuin-history/src/stats.rs
--- a/crates/atuin-history/src/stats.rs
+++ b/crates/atuin-history/src/stats.rs
@@ -396,4 +396,20 @@ mod tests {
["git commit -m \"🚀\""]
);
}
+
+ #[test]
+ fn starts_with_pipe() {
+ assert_eq!(
+ ... | [Bug]: atuin stats panics when faced with unusual string in history
### What did you expect to happen?
No panic! ;]
### What happened?
When running `atuin stats` it panics with:
```
❯ RUST_BACKTRACE=1 atuin stats
thread 'main' panicked at atuin/src/command/client/stats.rs:56:41:
begin <= end (1 <= 0) when slic... | seconding this- here's another fun string this happens with.
```console
$ RUST_BACKTRACE=1 atuin stats
thread 'main' panicked at atuin/src/command/client/stats.rs:56:41:
begin <= end (1 <= 0) when slicing `|_| |____||___||_| |_| |___||_|_`
stack backtrace:
0: 0x1054a29d0 - <std::sys_common::backtrace... | 2024-05-30T14:26:22Z | 18.2 | 2024-05-30T14:58:06Z | 4d74e38a515bc14381e1342afdf5ee2ec345f589 | [
"stats::tests::starts_with_pipe"
] | [
"stats::tests::escaped_pipes",
"stats::tests::interesting_commands_spaces",
"stats::tests::split_multi_quoted",
"stats::tests::starts_with_spaces_and_pipe",
"stats::tests::interesting_commands",
"stats::tests::split_simple_quoted",
"stats::tests::split_multi",
"stats::tests::split_simple",
"stats::t... | [] | [] | auto_2025-06-06 |
atuinsh/atuin | 1,739 | atuinsh__atuin-1739 | [
"1054"
] | 2a65f89cd54b8b8187240a1fdc288867b35f6b01 | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -217,6 +217,7 @@ dependencies = [
"tracing",
"tracing-subscriber",
"tracing-tree",
+ "unicode-segmentation",
"unicode-width",
"uuid",
"whoami",
diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3937,9 +3938,9 ... | diff --git a/atuin/src/command/client/stats.rs b/atuin/src/command/client/stats.rs
--- a/atuin/src/command/client/stats.rs
+++ b/atuin/src/command/client/stats.rs
@@ -189,7 +266,7 @@ mod tests {
use time::OffsetDateTime;
use super::compute_stats;
- use super::interesting_command;
+ use super::{interes... | Enable multiple command stats to be shown
These changes extend the `stats` subcommand with an `--ngram-size` argument, which supports providing statistics for combinations of commands. I have found this useful for identifying the most common combinations of commands as candidates for further automation.
| 2024-02-20T05:51:10Z | 18.0 | 2024-02-27T19:41:41Z | 2a65f89cd54b8b8187240a1fdc288867b35f6b01 | [
"command::client::search::cursor::cursor_tests::back",
"command::client::search::cursor::cursor_tests::left",
"command::client::search::cursor::cursor_tests::pop",
"command::client::stats::tests::interesting_commands",
"command::client::search::cursor::cursor_tests::test_emacs_get_prev_word_pos",
"command... | [] | [] | [] | auto_2025-06-06 | |
atuinsh/atuin | 1,722 | atuinsh__atuin-1722 | [
"1714"
] | 063d9054d74c0c44781507eed27378415ab9fef5 | diff --git a/atuin-client/config.toml b/atuin-client/config.toml
--- a/atuin-client/config.toml
+++ b/atuin-client/config.toml
@@ -171,3 +171,6 @@ enter_accept = true
## Set commands that should be totally stripped and ignored from stats
#common_prefix = ["sudo"]
+
+## Set commands that will be completely ignored f... | diff --git a/atuin/src/command/client/stats.rs b/atuin/src/command/client/stats.rs
--- a/atuin/src/command/client/stats.rs
+++ b/atuin/src/command/client/stats.rs
@@ -176,10 +184,36 @@ fn interesting_command<'a>(settings: &Settings, mut command: &'a str) -> &'a str
#[cfg(test)]
mod tests {
+ use atuin_client::hi... | `ignore_commands` option for stats
Would you be open to having an `ignore_commands` option for `atuin stats`? `cd`, `ls`, and `vi` are my three top commands by nearly an order of and I don't find this particularly informative; I'd be interested in filtering these out entirely from my stats.
If you're interested in... | I'd be interested!
Otherwise, you can see more commands with the -c arg, if you find them a waste of space
eg
`atuin stats -c 100` will show the top 100, rather than top 10
OK I will see how hard this is and take a stab at a PR.
The issue is not so much a waste of space, but that it makes the histogram kin... | 2024-02-14T17:42:21Z | 18.0 | 2024-02-15T18:52:19Z | 2a65f89cd54b8b8187240a1fdc288867b35f6b01 | [
"command::client::search::cursor::cursor_tests::test_emacs_get_next_word_pos",
"command::client::search::cursor::cursor_tests::test_subl_get_prev_word_pos",
"command::client::search::cursor::cursor_tests::right",
"command::client::search::cursor::cursor_tests::pop",
"command::client::search::cursor::cursor_... | [] | [] | [] | auto_2025-06-06 |
google/autocxx | 129 | google__autocxx-129 | [
"115"
] | 1ce47156f3fe4bbfc013c37616efa77e9577d85f | diff --git a/engine/src/additional_cpp_generator.rs b/engine/src/additional_cpp_generator.rs
--- a/engine/src/additional_cpp_generator.rs
+++ b/engine/src/additional_cpp_generator.rs
@@ -12,7 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use crat... | diff --git a/engine/src/integration_tests.rs b/engine/src/integration_tests.rs
--- a/engine/src/integration_tests.rs
+++ b/engine/src/integration_tests.rs
@@ -113,6 +113,29 @@ fn run_test(
generate,
generate_pods,
TestMethod::BeQuick,
+ None,
+ )
+ .unwrap()
+}
+
+/// A positive ... | Nested types don't work
```c++
class A {
class B {
...
};
};
```
is generated by `bindgen` as
```rust
pub struct A {
...
}
pub struct A_B {
...
}
```
This then gives errors when we refer to `A_B` in generated C++.
| 2020-11-25T22:19:42Z | 0.4 | 2020-11-25T22:48:38Z | 3136e0df01dfe15251b9e796de0e9a46d38a1ba7 | [
"bridge_name_tracker::tests::test",
"byvalue_checker::tests::test_primitive_by_itself",
"byvalue_checker::tests::test_with_cxxstring",
"byvalue_checker::tests::test_primitives",
"byvalue_checker::tests::test_nested_primitives",
"byvalue_checker::tests::test_with_up",
"integration_tests::test_negative_rs... | [] | [] | [] | auto_2025-06-06 | |
google/autocxx | 105 | google__autocxx-105 | [
"103"
] | 88ca58b4391fd8e66c3994f6b7355c8aa36cb2e8 | diff --git a/engine/src/additional_cpp_generator.rs b/engine/src/additional_cpp_generator.rs
--- a/engine/src/additional_cpp_generator.rs
+++ b/engine/src/additional_cpp_generator.rs
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use crate... | diff --git a/engine/src/bridge_converter.rs b/engine/src/bridge_converter.rs
--- a/engine/src/bridge_converter.rs
+++ b/engine/src/bridge_converter.rs
@@ -654,7 +673,7 @@ impl<'a> BridgeConversion<'a> {
// We want to feed cxx methods with just the method name, so let's
// strip off the class n... | std::unique_ptr<T> doesn't appear to qualify T with namespaces
Reproduced on a complex codebase. Need to come up with a test case.
| 2020-11-17T23:50:41Z | 0.4 | 2020-11-17T23:56:59Z | 3136e0df01dfe15251b9e796de0e9a46d38a1ba7 | [
"byvalue_checker::tests::test_with_up",
"byvalue_checker::tests::test_with_cxxstring",
"byvalue_checker::tests::test_primitives",
"byvalue_checker::tests::test_nested_primitives",
"byvalue_checker::tests::test_primitive_by_itself",
"integration_tests::test_negative_rs_nonsense::f",
"types::tests::test_i... | [] | [] | [] | auto_2025-06-06 | |
google/autocxx | 74 | google__autocxx-74 | [
"37"
] | e93e85e61116ce5f0c1e18c69020ab1eca5704fd | diff --git a/demo/src/input.h b/demo/src/input.h
--- a/demo/src/input.h
+++ b/demo/src/input.h
@@ -16,8 +16,6 @@
#include <cstdint>
-uint32_t DoMath(uint32_t a);
-
inline uint32_t DoMath(uint32_t a) {
return a * 3;
}
diff --git a/demo/src/main.rs b/demo/src/main.rs
--- a/demo/src/main.rs
+++ b/demo/src/main... | diff --git a/engine/src/integration_tests.rs b/engine/src/integration_tests.rs
--- a/engine/src/integration_tests.rs
+++ b/engine/src/integration_tests.rs
@@ -17,12 +17,12 @@ use log::info;
use proc_macro2::{Span, TokenStream};
use quote::quote;
use quote::ToTokens;
-use syn::Token;
use std::fs::File;
use std::io:... | Alias all functions and symbols to a single namespace
Right now, to use autocxx-generated bindings from Rust, you need to refer to:
* `ffi::cxxbridge::W` for struct W
* `ffi::cxxbridge::X` for struct X
* `ffi::Y` for constant Y
* `ffi::defs::Z` for preprocessor symbol Z
(I think).
This all needs tidying up;... | C++ namespace support is gradually landing, but currently consists purely of understanding the C++ side of things without attempting to replicate the same namespaces on the Rust side.
Partly I've not done that because we need to finish https://github.com/dtolnay/cxx/issues/353, and partly because we need to finish t... | 2020-11-08T08:23:43Z | 0.3 | 2020-11-08T08:29:52Z | ab37b098380020a2252739b82ee3f1ad0195c440 | [
"byvalue_checker::tests::test_primitive_by_itself",
"byvalue_checker::tests::test_with_cxxstring",
"byvalue_checker::tests::test_primitives",
"byvalue_checker::tests::test_nested_primitives",
"byvalue_checker::tests::test_with_up",
"integration_tests::test_negative_rs_nonsense::f",
"types::tests::test_i... | [] | [] | [] | auto_2025-06-06 |
google/autocxx | 242 | google__autocxx-242 | [
"236"
] | 542fa0d640242c86697dee241fffffee2fd13107 | diff --git a/engine/src/conversion/codegen_cpp/function_wrapper.rs b/engine/src/conversion/codegen_cpp/function_wrapper.rs
--- a/engine/src/conversion/codegen_cpp/function_wrapper.rs
+++ b/engine/src/conversion/codegen_cpp/function_wrapper.rs
@@ -115,7 +115,7 @@ impl ArgumentConversion {
fn make_unique_ptr_type(&s... | diff --git a/engine/src/conversion/analysis/pod/byvalue_checker.rs b/engine/src/conversion/analysis/pod/byvalue_checker.rs
--- a/engine/src/conversion/analysis/pod/byvalue_checker.rs
+++ b/engine/src/conversion/analysis/pod/byvalue_checker.rs
@@ -257,7 +257,7 @@ mod tests {
let mut bvc = ByValueChecker::new();... | Fully qualify all types in bindgen mod
Right now we jump through hoops to add `use` statements to each `bindgen` mod. It will be tidier if we simply fully-qualify all names.
| 2021-02-25T07:24:38Z | 0.5 | 2021-02-25T19:01:44Z | 776e377b5bdf0543b5b9aa9ae7775fec926758a7 | [
"conversion::analysis::fun::overload_tracker::tests::test_by_function",
"conversion::analysis::fun::overload_tracker::tests::test_by_method",
"conversion::analysis::fun::rust_name_tracker::tests::test",
"conversion::analysis::fun::bridge_name_tracker::tests::test",
"conversion::codegen_rs::namespace_organiz... | [] | [] | [] | auto_2025-06-06 | |
google/autocxx | 185 | google__autocxx-185 | [
"183"
] | 75c76ab9ab0075cf5c7d01eaaf800213a98a80ec | diff --git a/engine/src/byvalue_scanner.rs b/engine/src/byvalue_scanner.rs
--- a/engine/src/byvalue_scanner.rs
+++ b/engine/src/byvalue_scanner.rs
@@ -13,12 +13,11 @@
// limitations under the License.
use autocxx_parser::TypeDatabase;
-use syn::Item;
+use syn::{Item, Type, TypePath};
use crate::{
- byvalue_ch... | diff --git a/engine/src/integration_tests.rs b/engine/src/integration_tests.rs
--- a/engine/src/integration_tests.rs
+++ b/engine/src/integration_tests.rs
@@ -3371,7 +3371,6 @@ fn test_cycle_vector() {
}
#[test]
-#[ignore] // https://github.com/google/autocxx/issues/183
fn test_typedef_to_std() {
let hdr = in... | Handle typedefs to std types
e.g.
```rust
pub type t_config_option_key = root::std::string;
```
in bindgen output.
| 2021-01-12T04:16:42Z | 0.5 | 2021-01-12T04:28:28Z | 776e377b5bdf0543b5b9aa9ae7775fec926758a7 | [
"conversion::parse::overload_tracker::tests::test_by_function",
"conversion::parse::rust_name_tracker::tests::test",
"conversion::parse::overload_tracker::tests::test_by_method",
"conversion::parse::bridge_name_tracker::tests::test",
"byvalue_checker::tests::test_primitive_by_itself",
"conversion::namespa... | [] | [] | [] | auto_2025-06-06 | |
google/autocxx | 180 | google__autocxx-180 | [
"174"
] | 3c96fbdeedc9a53620adca003cfa7043952e96ac | diff --git a/engine/src/byvalue_checker.rs b/engine/src/byvalue_checker.rs
--- a/engine/src/byvalue_checker.rs
+++ b/engine/src/byvalue_checker.rs
@@ -67,7 +67,7 @@ impl ByValueChecker {
// For this struct, work out whether it _could_ be safe as a POD.
let tyname = TypeName::new(ns, &def.ident.to_stri... | diff --git a/engine/src/byvalue_checker.rs b/engine/src/byvalue_checker.rs
--- a/engine/src/byvalue_checker.rs
+++ b/engine/src/byvalue_checker.rs
@@ -172,6 +180,19 @@ impl ByValueChecker {
}
results
}
+
+ fn has_vtable(def: &ItemStruct) -> bool {
+ for f in &def.fields {
+ i... | build panic on generating class
## Expected Behavior
Successful build :)
## Actual Behavior
```
thread 'main' panicked at 'expected identifier', /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.57/src/parse_quote.rs:96:21
stack backtrace:
0: rust_begin_unwind
at /rus... | Thanks. Could you do any one of these things (in order of my preference!)
1. Narrow down which C++ construct is causing the problem, and raise a pull request to add a new test to `integration_tests.rs` :)
2. Build with `RUST_LOG=autocxx_engine=info` and add the logs here
3. Let me know where to find the C++ code i... | 2021-01-08T20:12:21Z | 0.5 | 2021-01-08T20:32:53Z | 776e377b5bdf0543b5b9aa9ae7775fec926758a7 | [
"conversion::parse::overload_tracker::tests::test_by_function",
"conversion::parse::overload_tracker::tests::test_by_method",
"conversion::parse::rust_name_tracker::tests::test",
"conversion::parse::bridge_name_tracker::tests::test",
"conversion::namespace_organizer::tests::test_ns_entries_sort",
"byvalue... | [] | [] | [] | auto_2025-06-06 |
google/autocxx | 341 | google__autocxx-341 | [
"331"
] | 7aaf7b65498a73d2cdc12a81390739e091710bab | diff --git a/engine/src/conversion/analysis/fun/mod.rs b/engine/src/conversion/analysis/fun/mod.rs
--- a/engine/src/conversion/analysis/fun/mod.rs
+++ b/engine/src/conversion/analysis/fun/mod.rs
@@ -639,7 +639,7 @@ impl<'a> FnAnalyzer<'a> {
}) => match elem.as_ref() {
... | diff --git a/engine/src/conversion/parse/parse_foreign_mod.rs b/engine/src/conversion/parse/parse_foreign_mod.rs
--- a/engine/src/conversion/parse/parse_foreign_mod.rs
+++ b/engine/src/conversion/parse/parse_foreign_mod.rs
@@ -123,3 +126,34 @@ impl ParseForeignMod {
}
}
}
+
+/// bindgen sometimes generat... | Identically named static methods in multiple classes don't work
Thanks to @nside for preparing a test case.
Reproduction:
* Fetch this branch: https://github.com/google/autocxx/compare/main...nside:s2
* `cd demo && RUST_LOG=autocxx_engine=info cargo build -vvv`
Errors include:
```
cargo:warning=/Users/adri... | Test added in #332. I think the root cause here is https://github.com/rust-lang/rust-bindgen/issues/2019, which means we don't identify that the second of these is a static method.
Yeah. The problem was already known and indeed already recorded against an ignored test in our test suite called `test_conflicting_static_f... | 2021-04-06T13:25:45Z | 0.5 | 2021-04-06T13:34:30Z | 776e377b5bdf0543b5b9aa9ae7775fec926758a7 | [
"conversion::analysis::fun::overload_tracker::tests::test_by_function",
"conversion::analysis::fun::overload_tracker::tests::test_by_method",
"conversion::analysis::fun::rust_name_tracker::tests::test",
"conversion::codegen_rs::namespace_organizer::tests::test_ns_entries_sort",
"conversion::analysis::fun::b... | [] | [] | [] | auto_2025-06-06 |
google/autocxx | 306 | google__autocxx-306 | [
"302"
] | 5922890ca02a55bf5a594fe939c8328a8bcf6d83 | diff --git a/demo/build.rs b/demo/build.rs
--- a/demo/build.rs
+++ b/demo/build.rs
@@ -17,7 +17,8 @@ fn main() {
// C++ codegen and the macro codegen appears to be run from different
// working directories.
let path = std::path::PathBuf::from("src").canonicalize().unwrap();
- let mut b = autocxx_build... | diff --git a/engine/src/integration_tests.rs b/engine/src/integration_tests.rs
--- a/engine/src/integration_tests.rs
+++ b/engine/src/integration_tests.rs
@@ -114,6 +114,7 @@ fn run_test(
generate,
generate_pods,
None,
+ &[],
)
.unwrap()
}
diff --git a/engine/src/integration... | Accept defines
`autocxx-gen` needs to accept `-Dfoo=bar` and `-Dfoo` arguments. `autocxx-build` should do similar.
| 2021-03-24T01:06:10Z | 0.5 | 2021-03-24T01:34:50Z | 776e377b5bdf0543b5b9aa9ae7775fec926758a7 | [
"conversion::analysis::fun::overload_tracker::tests::test_by_function",
"conversion::analysis::fun::overload_tracker::tests::test_by_method",
"conversion::analysis::fun::rust_name_tracker::tests::test",
"conversion::analysis::fun::bridge_name_tracker::tests::test",
"conversion::codegen_rs::namespace_organiz... | [] | [] | [] | auto_2025-06-06 | |
awslabs/aws-lambda-web-adapter | 176 | awslabs__aws-lambda-web-adapter-176 | [
"173"
] | 7dde04cdadde59a0f7061f1edc3efc1723ceb91b | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -530,11 +530,10 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-che... | diff --git a/tests/integ_tests.rs b/tests/integ_tests.rs
--- a/tests/integ_tests.rs
+++ b/tests/integ_tests.rs
@@ -146,6 +146,43 @@ async fn test_http_headers() {
assert_eq!("OK", body_to_string(response).await);
}
+#[tokio::test]
+async fn test_http_path_encoding() {
+ // Start app server
+ let app_serve... | Error when passing a URI with non-alphanumeric characters.
Hi!
I am using the layer version 13 from the us-east-1 region for intel platform (LambdaAdapterLayerX86), to run a nextjs website on AWS Lambda.
It works well generally, except if the URI of any request contains characters like % or ñ, the runtime fail... | Thank for reporting this issue. Do you see this issue with layer version 11? This might be related to a change in the latest version.
I have reproduced this issue with v0.6.2 and v0.6.1. I will look into the cause.
For now, you can use layer version 10 or docker image v0.6.0, they are not affected by this issue.
... | 2023-02-23T14:04:52Z | 0.6 | 2023-02-23T14:28:31Z | 07a44e254d7dab004862d7a6641a96616669a01e | [
"test_http_path_encoding"
] | [
"test_http_basic_request",
"test_http_compress",
"test_http_headers",
"test_http_query_params",
"test_adapter_options_from_env",
"test_http_compress_already_compressed",
"test_http_post_put_delete",
"test_http_compress_disallowed_type",
"test_http_readiness_check"
] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 1,934 | tokio-rs__axum-1934 | [
"1931"
] | 377d73a55ba7bdbb1a47084c684fb1334b200f1b | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
-- None.
+- **fixed:** Don't allow extracting `MatchedPath` in fallbacks ([#1934])
+- **fixed:** Fix pani... | diff --git a/axum/src/extract/matched_path.rs b/axum/src/extract/matched_path.rs
--- a/axum/src/extract/matched_path.rs
+++ b/axum/src/extract/matched_path.rs
@@ -176,6 +176,7 @@ mod tests {
Router,
};
use http::{Request, StatusCode};
+ use hyper::Body;
#[crate::test]
async fn extracti... | Axum 0.6.15 seems to break ServeDir completely
- [x] I have looked for existing issues (including closed) about this
## Bug Report
### Version
`cargo tree | grep axum`
```
axum v0.6.15
│ ├── axum-core v0.3.4
│ ├── axum-core v0.3.4
```
`cargo tree | grep tower-http`
```
tower-http
├── tower-http v0... | Not sure if your actual routing setup is more complex than that but you don't need to crate a `Router` just to put `ServeDir` into a `fallback_service`. You simply do:
```rust
let routes_all = Router::new().fallback_service(ServeDir::new("./"));
```
This works because `ServeDir` implements `Service` which is th... | 2023-04-14T09:58:06Z | 0.6 | 2023-04-17T11:20:56Z | c100650464e96cc9b48a37290760f288d6311ed8 | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::connect_info::traits",
"extract::host::tests::forwarded_parsing",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_err... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 1,889 | tokio-rs__axum-1889 | [
"1884"
] | 24f8dc53f49d8946418f103314ab6a31ff68be5c | diff --git a/axum-extra/CHANGELOG.md b/axum-extra/CHANGELOG.md
--- a/axum-extra/CHANGELOG.md
+++ b/axum-extra/CHANGELOG.md
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning].
# Unreleased
-- None.
+- **added:** Add `OptionalPath` extractor ([#1889])
+
+[#1889]: https://github.com/tokio-rs/axum/pull/... | diff --git /dev/null b/axum-extra/src/extract/optional_path.rs
new file mode 100644
--- /dev/null
+++ b/axum-extra/src/extract/optional_path.rs
@@ -0,0 +1,102 @@
+use axum::{
+ async_trait,
+ extract::{path::ErrorKind, rejection::PathRejection, FromRequestParts, Path},
+ RequestPartsExt,
+};
+use serde::de::De... | OptionalPath extractor
- [x] I have looked for existing issues (including closed) about this
## Feature Request
### Motivation
We've been getting many people asking about an easy way of extracting a path segment value only if a placeholder exists at the route the handler was called from.
### Proposal
Add... | ```
.route("/", get(handler)
.route("/:path", get(handler))
```
```rs
pub(crate) async fn handler(
path: Option<Path<String>>,
) -> impl IntoResponse
{
..
}
```
Yes, that works most of the time, but it doesn't reject the request for `/:path` requests with invalid UTF-8. Or m... | 2023-03-27T17:03:41Z | 0.6 | 2023-04-09T12:23:15Z | c100650464e96cc9b48a37290760f288d6311ed8 | [
"extract::cached::tests::works",
"extract::cookie::tests::signed_cannot_access_invalid_cookies",
"extract::cookie::tests::plaintext_cookies",
"extract::with_rejection::tests::extractor_rejection_is_transformed",
"extract::cookie::tests::private_cookies",
"extract::cookie::tests::signed_cookies_with_custom... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 1,826 | tokio-rs__axum-1826 | [
"1738"
] | 1327a598ce07c4642a2cca2c20f1093d7ff123f7 | diff --git a/axum-macros/CHANGELOG.md b/axum-macros/CHANGELOG.md
--- a/axum-macros/CHANGELOG.md
+++ b/axum-macros/CHANGELOG.md
@@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
-- None.
+- **fixed:** Improve `#[debug_handler]` message for known generic
+... | diff --git /dev/null b/axum-macros/tests/debug_handler/fail/json_not_deserialize.rs
new file mode 100644
--- /dev/null
+++ b/axum-macros/tests/debug_handler/fail/json_not_deserialize.rs
@@ -0,0 +1,9 @@
+use axum::Json;
+use axum_macros::debug_handler;
+
+struct Struct {}
+
+#[debug_handler]
+async fn handler(foo: Json<... | `#[debug_handler]` could suggest `Deserialize` for `Json`
- [x] I have looked for existing issues (including closed) about this
## Feature Request
### Motivation
While trying to teach someone axum I suggested the use of the `#[debug_handler]` macro in order to find out why their handler wasn't working. The err... | Thats a regression I'm surprised we missed actually. Thought we had a test for that but oh well.
On 0.5 the error is
```
error[E0277]: the trait bound `for<'de> NotDeserialize: serde::de::Deserialize<'de>` is not satisfied
--> src/main.rs:19:21
|
19 | async fn handler(_: Json<NotDeserialize>) {}
| ... | 2023-03-07T13:14:46Z | 0.6 | 2023-03-10T08:51:05Z | c100650464e96cc9b48a37290760f288d6311ed8 | [
"debug_handler::ui"
] | [
"tests/typed_path/fail/missing_capture.rs [should fail to compile]",
"tests/typed_path/fail/missing_field.rs [should fail to compile]",
"tests/typed_path/fail/not_deserialize.rs [should fail to compile]",
"tests/typed_path/fail/route_not_starting_with_slash.rs [should fail to compile]",
"tests/typed_path/fa... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 1,810 | tokio-rs__axum-1810 | [
"1781"
] | 5606ea3f9ecb738c1cd4321fa0bedc4fc2adc29f | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -9,11 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **fixed:** Add `#[must_use]` attributes to types that do nothing unless used ([#1809])
- **fixed:** Add `#[must_use]... | diff --git a/axum/src/typed_header.rs b/axum/src/typed_header.rs
--- a/axum/src/typed_header.rs
+++ b/axum/src/typed_header.rs
@@ -175,19 +177,35 @@ mod tests {
async fn typed_header() {
async fn handle(
TypedHeader(user_agent): TypedHeader<headers::UserAgent>,
+ TypedHeader(cookie... | TypedHeader shouldn't reject missing headers by default
- [x] I have looked for existing issues (including closed) about this
## Feature Request
TypedHeader should allow specific Header type to handle missing headers instead of immediately rejecting the request.
### Motivation
`Header` trait already allows ... | Seems reasonable!
axum just calls [`typed_try_get`](https://docs.rs/headers/0.3.8/src/headers/map_ext.rs.html#41). Could the issue be there?
Seems like it, that optimization (?) of returning `Ok(None)` when the size hint is 0 seems wrong according to the original issue description.
Traced it down through git blame to h... | 2023-03-03T12:24:36Z | 0.6 | 2023-03-03T15:13:25Z | c100650464e96cc9b48a37290760f288d6311ed8 | [
"typed_header::tests::typed_header"
] | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::connect_info::traits",
"extract::host::tests::forwarded_parsing",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_err... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 1,469 | tokio-rs__axum-1469 | [
"1467"
] | 70833b9f4f8c528a88e7d97fe5193a37f4bf51e3 | diff --git a/axum/src/middleware/from_extractor.rs b/axum/src/middleware/from_extractor.rs
--- a/axum/src/middleware/from_extractor.rs
+++ b/axum/src/middleware/from_extractor.rs
@@ -201,7 +201,7 @@ where
impl<T, E, B, S> Service<Request<B>> for FromExtractor<T, E, S>
where
E: FromRequestParts<S> + 'static,
- ... | diff --git a/axum/src/middleware/from_extractor.rs b/axum/src/middleware/from_extractor.rs
--- a/axum/src/middleware/from_extractor.rs
+++ b/axum/src/middleware/from_extractor.rs
@@ -305,9 +304,10 @@ where
#[cfg(test)]
mod tests {
use super::*;
- use crate::{handler::Handler, routing::get, test_helpers::*, Ro... | `from_extractor` not compatible with `RequestBodyLimitLayer`
I tried adding the `RequestBodyLimitLayer` to my application. This works for everything, except the routes that contain a layer built with `from_extractor`.
My `axum` version is `0.5.16`, `tower-http` is `0.3.4` and `rustc` is `1.63.0`.
## A minimized e... | 2022-10-10T16:24:03Z | 0.14 | 2022-10-11T11:11:51Z | beb5ebbe8abb5f7e9afec08ed86e878d6272375e | [
"body::stream_body::stream_body_traits",
"error_handling::traits",
"extract::connect_info::traits",
"extract::host::tests::forwarded_parsing",
"extract::path::de::tests::test_parse_error_error",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_error_at_k... | [] | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 1,305 | tokio-rs__axum-1305 | [
"1290"
] | fa51cf52664d2e33fe37ca4252879bb1c73e87e9 | diff --git a/axum-macros/CHANGELOG.md b/axum-macros/CHANGELOG.md
--- a/axum-macros/CHANGELOG.md
+++ b/axum-macros/CHANGELOG.md
@@ -14,10 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
enum but instead generate `type Rejection = axum::response::Response`. Use the
new `#[... | diff --git a/axum-macros/src/from_request.rs b/axum-macros/src/from_request.rs
--- a/axum-macros/src/from_request.rs
+++ b/axum-macros/src/from_request.rs
@@ -537,29 +734,57 @@ fn impl_enum_by_extracting_all_at_once(
let path_span = path.span();
- Ok(quote_spanned! {path_span=>
- #[::axum::async_trai... | Add `#[derive(FromRequestParts)]` macro
## Feature Request
### Motivation
I'm pretty sure many current users of the `FromRequest` macro are using the resulting type as a non-terminal extractor. After #1272, this will no longer be supported.
### Proposal
Add `FromRequestParts` macro after #1272, but before t... | 2022-08-23T12:12:37Z | 0.5 | 2022-08-23T19:14:03Z | fa51cf52664d2e33fe37ca4252879bb1c73e87e9 | [
"tests/typed_path/fail/missing_capture.rs [should fail to compile]",
"tests/typed_path/fail/missing_field.rs [should fail to compile]",
"tests/typed_path/fail/not_deserialize.rs [should fail to compile]",
"tests/typed_path/fail/route_not_starting_with_slash.rs [should fail to compile]",
"tests/typed_path/fa... | [] | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 3,059 | tokio-rs__axum-3059 | [
"3056"
] | 6d30c579e04cce85a161dd72f8129ad96aed482d | diff --git a/axum/src/extract/connect_info.rs b/axum/src/extract/connect_info.rs
--- a/axum/src/extract/connect_info.rs
+++ b/axum/src/extract/connect_info.rs
@@ -92,6 +92,17 @@ const _: () = {
*stream.remote_addr()
}
}
+
+ impl<'a, L, F> Connected<serve::IncomingStream<'a, serve::TapIo<L,... | diff --git a/axum/src/serve.rs b/axum/src/serve.rs
--- a/axum/src/serve.rs
+++ b/axum/src/serve.rs
@@ -434,6 +434,7 @@ mod tests {
extract::connect_info::Connected,
handler::{Handler, HandlerWithoutStateExt},
routing::get,
+ serve::ListenerExt,
Router,
};
diff --git a/a... | into_make_service_with_connect_info not compile anymore
<!--
Thank you for reporting an issue.
Please fill in as much of the template below as you're able.
-->
after this PR https://github.com/tokio-rs/axum/pull/2941
with `tap_io` called on `listener`,
`axum::serve(listener, app.into_make_service_with_co... | Thanks for the report! I will look into it soon. | 2024-12-01T11:50:12Z | 1.0 | 2024-12-02T07:36:52Z | 6d30c579e04cce85a161dd72f8129ad96aed482d | [
"extract::connect_info::traits",
"extract::connect_info::tests::custom",
"error_handling::traits",
"extract::matched_path::tests::can_extract_nested_matched_path_in_middleware_on_nested_router_with_nest_service",
"extract::connect_info::tests::socket_addr",
"extract::matched_path::tests::can_extract_neste... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 3,051 | tokio-rs__axum-3051 | [
"2651"
] | 9ddb25f0897f7334e4e85ca26a81db272df1f02f | diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs
--- a/axum/src/routing/mod.rs
+++ b/axum/src/routing/mod.rs
@@ -200,6 +200,10 @@ where
#[doc(alias = "scope")] // Some web frameworks like actix-web use this term
#[track_caller]
pub fn nest(self, path: &str, router: Router<S>) -> Self {
+ ... | diff --git a/axum/src/extract/matched_path.rs b/axum/src/extract/matched_path.rs
--- a/axum/src/extract/matched_path.rs
+++ b/axum/src/extract/matched_path.rs
@@ -324,14 +324,14 @@ mod tests {
"/{*path}",
any(|req: Request| {
Router::new()
- .nest("/", Route... | Consider disallowing root nesting
Before the 0.8.0 release, I would like to come back to `nest("/", router)` and `nest_service("/", svc)`. I believe I suggested disallowing them (in favor of `merge` and `fallback_service`) before, but if so there must have been some pushback by David since we still allow both.
Any poi... | The only thing I found is this: https://github.com/tokio-rs/axum/discussions/2012
… which suggests I'm wrong about previous push-back and we should just disallow root nesting :)
@jplatte are you planning to deprecate the `nest` function or just improve it? This is very handy and makes the code much readable.
@dancixx ... | 2024-11-26T18:29:20Z | 1.0 | 2024-11-26T19:59:42Z | 6d30c579e04cce85a161dd72f8129ad96aed482d | [
"routing::tests::nest::nest_router_at_empty_path - should panic",
"routing::tests::nest::nest_service_at_empty_path - should panic",
"routing::tests::nest::nest_service_at_root - should panic",
"routing::tests::nest::nest_router_at_root - should panic"
] | [
"error_handling::traits",
"extract::connect_info::traits",
"extract::path::de::tests::test_deserialize_key_value",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_error_at_key_error_multiple",
"... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 3,039 | tokio-rs__axum-3039 | [
"3038"
] | 7e59625778698410ff40ab968120cfea825a6d9a | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
- **fixed:** Skip SSE incompatible chars of `serde_json::RawValue` in `Event::json_data` ([#2992])
+- **fix... | diff --git a/axum/src/extract/path/mod.rs b/axum/src/extract/path/mod.rs
--- a/axum/src/extract/path/mod.rs
+++ b/axum/src/extract/path/mod.rs
@@ -973,4 +973,25 @@ mod tests {
r#"Invalid URL: Cannot parse `res` with value `456456-123-456456`: UUID parsing failed: invalid group count: expected 5, found 3"#
... | Hit unreachable code when deserializing a [char; 2] inside Path
### Description
Hi, I used this struct inside a `Path`
```
#[derive(Debug, Deserialize)]
struct MoreChars {
first_two: [char; 2],
second_two: [char; 2],
crate_name: String,
}
```
with the route `.route("/:first_two/:second_two/:cr... | Can reproduce on `main`. | 2024-11-19T20:28:12Z | 1.0 | 2024-11-19T20:57:31Z | 6d30c579e04cce85a161dd72f8129ad96aed482d | [
"extract::path::tests::regression_3038"
] | [
"error_handling::traits",
"extract::connect_info::tests::custom",
"extract::connect_info::tests::both_mock_and_real_connect_info",
"extract::connect_info::traits",
"extract::connect_info::tests::socket_addr",
"extract::matched_path::tests::can_extract_nested_matched_path_in_middleware_on_nested_router",
... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 2,992 | tokio-rs__axum-2992 | [
"2981"
] | 65ad603701c64db42bb759d35722cf7ee6864842 | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
+- **fixed:** Skip SSE incompatible chars of `serde_json::RawValue` in `Event::json_data` ([#2992])
- **b... | diff --git a/axum/Cargo.toml b/axum/Cargo.toml
--- a/axum/Cargo.toml
+++ b/axum/Cargo.toml
@@ -117,7 +117,7 @@ quickcheck = "1.0"
quickcheck_macros = "1.0"
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "multipart"] }
serde = { version = "1.0", features = ["derive"] }
-serde_js... | `Event::json_data` can construct an invalid SSE event by passing a `serde_json::value::RawValue`
<!--
Thank you for reporting an issue.
Please fill in as much of the template below as you're able.
-->
- [x] I have looked for existing issues (including closed) about this
## Bug Report
When using `Event::js... | I don't really understand the second solution.
The third one sounds reasonable to me.
@SabrinaJewson do you have an opinion on this?
Yeah, third solution sounds reasonable. | 2024-10-16T17:35:52Z | 1.0 | 2024-10-17T14:49:39Z | 6d30c579e04cce85a161dd72f8129ad96aed482d | [
"response::sse::tests::valid_json_raw_value_chars_stripped"
] | [
"error_handling::traits",
"extract::connect_info::traits",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_error_at_key_error_multiple",
"extract::path::de::tests::test_parse_error_error",
"extr... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 2,903 | tokio-rs__axum-2903 | [
"2251"
] | 0712a46cd9f2bece74160e83085411aa0c174be1 | diff --git /dev/null b/axum/src/docs/routing/method_not_allowed_fallback.md
new file mode 100644
--- /dev/null
+++ b/axum/src/docs/routing/method_not_allowed_fallback.md
@@ -0,0 +1,38 @@
+Add a fallback [`Handler`] for the case where a route exists, but the method of the request is not supported.
+
+Sets a fallback on ... | diff --git a/axum/src/routing/tests/fallback.rs b/axum/src/routing/tests/fallback.rs
--- a/axum/src/routing/tests/fallback.rs
+++ b/axum/src/routing/tests/fallback.rs
@@ -329,6 +329,51 @@ async fn merge_router_with_fallback_into_empty() {
assert_eq!(res.text().await, "outer");
}
+#[crate::test]
+async fn mna_fa... | Add a method-not-allowed fallback on the Router level
- [x] I have looked for existing issues (including closed) about this
## Feature Request
### Motivation
It's a common mistake to expect `Router::fallback` to be triggered on method-not-allowed.
Furthermore, as shown by [#1005](https://github.com/tokio-rs/a... | I wonder if we should just apply the normal `Router::fallback` to both 404 and 405 (keeping the `Allow` header of course). Do you think that would work for most cases? Is it often that you want different fallbacks for 404 and 405?
Wdym by keeping the allow header? You mean setting it if the user-provided fallback handl... | 2024-09-08T18:55:33Z | 1.0 | 2024-10-12T09:36:57Z | 6d30c579e04cce85a161dd72f8129ad96aed482d | [
"error_handling::traits",
"extract::connect_info::traits",
"extract::host::tests::forwarded_parsing",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_error_error",
"extract::path::de::tests::tes... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 868 | tokio-rs__axum-868 | [
"865"
] | 422a883cb2a81fa6fbd2f2a1affa089304b7e47b | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -71,6 +71,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
be accepted but most likely result in bugs ([#823])
- **breaking:** `Headers` has been removed. Arrays of tuples dire... | diff --git a/axum/src/json.rs b/axum/src/json.rs
--- a/axum/src/json.rs
+++ b/axum/src/json.rs
@@ -244,4 +264,19 @@ mod tests {
assert!(valid_json_content_type("application/cloudevents+json").await);
assert!(!valid_json_content_type("text/json").await);
}
+
+ #[tokio::test]
+ async fn inval... | HTTP Status on Invalid JSON Request
When I send a request where the `content-type` is not `application/json` I get the answer `415 Unsupported Media Type` and if the JSON parsing fails I get `422 Unprocessable Entity`
Two issues:
1. This is not documented correctly: https://docs.rs/axum/latest/axum/struct.Json.ht... | 👍🏼 for distinguishing syntactic errors and content errors. `serde_json::Error` has a `classify()` method that allows to check what failed exactly.
> This is not documented correctly: https://docs.rs/axum/latest/axum/struct.Json.html In this documentation both of them would result in 400 Bad Request
Good catch. Tha... | 2022-03-17T17:15:56Z | 0.4 | 2022-03-18T15:53:41Z | 2e5d56a9b125142817378883b098470d05ab0597 | [
"json::tests::invalid_json_syntax"
] | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::path::de::tests::test_unsupported_type_error_tuple",
"extract::path::de::tests::test_parse_tuple_ignoring_additional_fields",
"extract::multipart::tests::content_type_with_encoding",
"extract::path::de::tests::test_wrong_number_o... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 755 | tokio-rs__axum-755 | [
"747"
] | 409a6651f59c4443e7cd6aa05c6f9485348ceed9 | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -54,6 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **fixed:** Set `Allow` header when responding with `405 Method Not Allowed` ([#733])
- **fixed:** Correctly set the `C... | diff --git a/axum/src/routing/tests/mod.rs b/axum/src/routing/tests/mod.rs
--- a/axum/src/routing/tests/mod.rs
+++ b/axum/src/routing/tests/mod.rs
@@ -645,3 +645,36 @@ async fn head_content_length_through_hyper_server_that_hits_fallback() {
let res = client.head("/").send().await;
assert_eq!(res.headers()["co... | Incorrect `content-length` header in reply to HEAD request when chunked transfer enconding is used
## Bug Report
This is a followup to #730. Unfortunately, I found a case in which it still does not work correctly.
### Version
axum main branch, commit 16ee83a
### Platform
Debian Linux 12 (“bookworm”)
Lin... | 2022-02-12T16:28:48Z | 0.4 | 2022-02-14T09:56:09Z | 2e5d56a9b125142817378883b098470d05ab0597 | [
"routing::tests::head_with_middleware_applied"
] | [
"body::stream_body::stream_body_traits",
"error_handling::traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::form::tests::test_form_query",
... | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 682 | tokio-rs__axum-682 | [
"681"
] | 5512ebcd23d261a2be5ee07676721b7637ffc054 | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -9,8 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **fixed:** Fix using incorrect path prefix when nesting `Router`s at `/` ([#691])
- **fixed:** Make `nest("", service... | diff --git a/axum/src/routing/tests/mod.rs b/axum/src/routing/tests/mod.rs
--- a/axum/src/routing/tests/mod.rs
+++ b/axum/src/routing/tests/mod.rs
@@ -354,6 +354,30 @@ async fn with_and_without_trailing_slash() {
assert_eq!(res.text().await, "without tsr");
}
+// for https://github.com/tokio-rs/axum/issues/681
... | Use HTTP 308 instead of 301 for trailing slash redirects
## Feature Request
### Motivation
Performing a POST to `/some/url/` (with the trailing slash) does an HTTP 301 (introduced in #410) to `/some/url`. However, HTTP 301 transforms a POST to a GET, which is undesired.
### Proposal
Use [HTTP 308](https://d... | 2022-01-01T02:57:12Z | 0.4 | 2022-01-12T14:58:13Z | 2e5d56a9b125142817378883b098470d05ab0597 | [
"routing::tests::with_trailing_slash_post",
"routing::tests::without_trailing_slash_post",
"routing::tests::wildcard_with_trailing_slash"
] | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_unsupported_type_error_nested_data_structure",
"extract::path::de::tests... | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 644 | tokio-rs__axum-644 | [
"637"
] | 4df4e07e10b13d05413c1da1a56d8f56ddbfb6ab | diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md
--- a/axum-core/CHANGELOG.md
+++ b/axum-core/CHANGELOG.md
@@ -7,7 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
-- None.
+- **breaking:** Using `HeaderMap` as an extractor will no longer remove the... | diff --git a/axum-core/src/extract/request_parts.rs b/axum-core/src/extract/request_parts.rs
--- a/axum-core/src/extract/request_parts.rs
+++ b/axum-core/src/extract/request_parts.rs
@@ -76,27 +65,20 @@ where
}
}
+/// Clone the headers from the request.
+///
+/// Prefer using [`TypedHeader`] to extract only the... | Change return type of `Field::content_type`
It should return some kind of string, or a type axum owns, to avoid the public dependency on mime.
`Mime` implements `AsRef<str>` meaning we can probably return `&str` but should verify that it returns the whole mime type and not just a part.
| Why do you prefer a string over `mime`'s enum types? Personally I like being able to `match` on valid mime types.
It looks like [`mime` has been unmaintained for a while](https://github.com/hyperium/mime/issues/135) (and will likely continue to be). I'm not sure what a good alternative is though. [`http-types` has m... | 2021-12-21T09:47:37Z | 0.4 | 2022-06-11T11:06:23Z | 2e5d56a9b125142817378883b098470d05ab0597 | [
"response::headers::tests::with_body",
"body::test_try_downcast",
"response::headers::tests::with_status_and_body",
"response::headers::tests::vec_of_strings",
"response::headers::tests::vec_of_header_name_and_value",
"response::headers::tests::invalid_header_name",
"response::headers::tests::invalid_he... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 588 | tokio-rs__axum-588 | [
"587"
] | 628921bcad878ab4396705e0798494fbc9ebd3c5 | diff --git a/axum-debug/CHANGELOG.md b/axum-debug/CHANGELOG.md
--- a/axum-debug/CHANGELOG.md
+++ b/axum-debug/CHANGELOG.md
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
-- None.
+- Fix `Result<impl IntoResponse, Error>` generating invalid code ([#588]... | diff --git /dev/null b/axum-debug/tests/pass/result_impl_into_response.rs
new file mode 100644
--- /dev/null
+++ b/axum-debug/tests/pass/result_impl_into_response.rs
@@ -0,0 +1,132 @@
+use axum::{
+ async_trait,
+ extract::{FromRequest, RequestParts},
+ response::IntoResponse,
+};
+use axum_debug::debug_handle... | `#[debug_handler]` doesn't work with `Result<impl IntoResponse, SomeError>`
This produces code that doesn't compile
```rust
#[debug_handler]
async fn handler() -> Result<impl IntoResponse, Infallible> {
Ok(())
}
```
Error is:
```
error[E0720]: cannot resolve opaque type
--> examples/hello-world/sr... | 2021-12-04T14:46:46Z | 0.4 | 2021-12-04T17:54:11Z | 2e5d56a9b125142817378883b098470d05ab0597 | [
"tests/pass/result_impl_into_response.rs [should pass]",
"tests/pass/self_receiver.rs [should pass]",
"ui"
] | [
"tests/fail/argument_not_extractor.rs [should fail to compile]",
"tests/fail/attrs.rs [should fail to compile]",
"tests/fail/extract_self_mut.rs [should fail to compile]",
"tests/fail/extract_self_ref.rs [should fail to compile]",
"tests/fail/generics.rs [should fail to compile]",
"tests/fail/not_a_functi... | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 533 | tokio-rs__axum-533 | [
"528"
] | 939995e80edaf4e882a6e2decb07db5a7c0a2c06 | diff --git a/axum-handle-error-extract/src/lib.rs b/axum-handle-error-extract/src/lib.rs
--- a/axum-handle-error-extract/src/lib.rs
+++ b/axum-handle-error-extract/src/lib.rs
@@ -281,8 +281,8 @@ where
let future = Box::pin(async move {
match inner.oneshot(req).await {
- Ok(res) =>... | diff --git a/axum-handle-error-extract/src/lib.rs b/axum-handle-error-extract/src/lib.rs
--- a/axum-handle-error-extract/src/lib.rs
+++ b/axum-handle-error-extract/src/lib.rs
@@ -138,7 +138,7 @@
#![cfg_attr(test, allow(clippy::float_cmp))]
use axum::{
- body::{box_body, BoxBody, Bytes, Full, HttpBody},
+ body... | Rename `box_body` to `boxed`
As its consistent with `http_body::Body::boxed`.
Will be deprecated in 0.3.4 and removed in 0.4
| 2021-11-17T12:44:21Z | 0.3 | 2021-11-17T12:59:30Z | 939995e80edaf4e882a6e2decb07db5a7c0a2c06 | [
"src/lib.rs - (line 7)",
"src/lib.rs - (line 54)",
"body::stream_body::stream_body_traits",
"error_handling::traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::path::de::tests::test_parse_struct",
"extract::form::tests::test_form_query",
"extract::path::de::... | [] | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 530 | tokio-rs__axum-530 | [
"528"
] | b9dfea636071c2c194c8251612beba9d0515e9fe | diff --git a/axum-handle-error-extract/src/lib.rs b/axum-handle-error-extract/src/lib.rs
--- a/axum-handle-error-extract/src/lib.rs
+++ b/axum-handle-error-extract/src/lib.rs
@@ -281,8 +281,8 @@ where
let future = Box::pin(async move {
match inner.oneshot(req).await {
- Ok(res) =>... | diff --git a/axum-handle-error-extract/src/lib.rs b/axum-handle-error-extract/src/lib.rs
--- a/axum-handle-error-extract/src/lib.rs
+++ b/axum-handle-error-extract/src/lib.rs
@@ -138,7 +138,7 @@
#![cfg_attr(test, allow(clippy::float_cmp))]
use axum::{
- body::{box_body, BoxBody, Bytes, Full, HttpBody},
+ body... | Rename `box_body` to `boxed`
As its consistent with `http_body::Body::boxed`.
Will be deprecated in 0.3.4 and removed in 0.4
| 2021-11-17T08:54:59Z | 0.3 | 2021-11-17T12:31:11Z | 939995e80edaf4e882a6e2decb07db5a7c0a2c06 | [
"src/lib.rs - (line 54)",
"src/lib.rs - (line 7)",
"body::stream_body::stream_body_traits",
"error_handling::traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::path::de::tests::test_parse_map",
"extract::path::de::tests::test_parse_single_value",
"extract::f... | [] | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 529 | tokio-rs__axum-529 | [
"488"
] | f9a437d0813c0e2f784ca90eccccb4fbad9126cb | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -28,10 +28,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **breaking:** The `Handler<B, T>` trait is now defined as `Handler<T, B =
Body>`. That is the type parameters have... | diff --git a/axum/src/routing/tests/fallback.rs b/axum/src/routing/tests/fallback.rs
--- a/axum/src/routing/tests/fallback.rs
+++ b/axum/src/routing/tests/fallback.rs
@@ -49,25 +49,3 @@ async fn or() {
assert_eq!(res.status(), StatusCode::OK);
assert_eq!(res.text().await, "fallback");
}
-
-#[tokio::test]
-as... | Panic if merging two routers that each have a fallback
Currently when you `Router::merge` two routes that each have a fallback it'll pick the fallback of the router on the right hand side, and if only one has a fallback it'll pick that one. This might lead users to think that multiple fallbacks are supported (see https... | 👍 for panicking. Silently discarding a fallback service will almost definitely end up causing issue for someone. | 2021-11-16T22:44:32Z | 0.3 | 2021-11-18T21:19:07Z | 939995e80edaf4e882a6e2decb07db5a7c0a2c06 | [
"routing::tests::merging_routers_with_fallbacks_panics - should panic",
"routing::tests::nesting_router_with_fallbacks_panics - should panic"
] | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::path::de::tests::test_parse_struct",
"extract::form::tests::test_form_query",
"extract::path::de::tests::test_parse_map",
"extract::form::tests::test_i... | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 423 | tokio-rs__axum-423 | [
"419"
] | 8fe4eaf1d5a17fc1919afc64f7c2e8c890069653 | diff --git a/src/routing/mod.rs b/src/routing/mod.rs
--- a/src/routing/mod.rs
+++ b/src/routing/mod.rs
@@ -440,8 +440,7 @@ where
LayeredResBody::Error: Into<BoxError>,
{
let layer = ServiceBuilder::new()
- .layer_fn(Route)
- .layer_fn(CloneBoxService::new)
+ .laye... | diff --git a/src/tests/mod.rs b/src/tests/mod.rs
--- a/src/tests/mod.rs
+++ b/src/tests/mod.rs
@@ -684,8 +684,6 @@ async fn middleware_still_run_for_unmatched_requests() {
assert_eq!(COUNT.load(Ordering::SeqCst), 2);
}
-// TODO(david): middleware still run for empty routers
-
pub(crate) fn assert_send<T: Send>... | First parameterized path component stripped from logs
## Bug Report
<!--
Thank you for reporting an issue.
Please fill in as much of the template below as you're able.
-->
### Version
<!--
List the versions of all `axum` crates you are using. The easiest way to get
this information is using `cargo tre... | 2021-10-26T17:06:24Z | 0.3 | 2021-10-26T17:30:00Z | 939995e80edaf4e882a6e2decb07db5a7c0a2c06 | [
"tests::nest::outer_middleware_still_see_whole_url"
] | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::extractor_middleware::traits",
"extract::connect_info::traits",
"extract::path::de::tests::test_parse_struct",
"extract::path::de::tests::test_parse_map",
"extract::path::de::tests::test_parse_single_value",
"extract::form::t... | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 412 | tokio-rs__axum-412 | [
"386"
] | e43bdf0ecf3ad8a8de7694658f73143e1ca066fc | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -136,6 +136,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
without trailing a slash.
- **breaking:** `EmptyRouter` has been renamed to `MethodNotAllowed` as its only
used in method routers... | diff --git a/src/tests/mod.rs b/src/tests/mod.rs
--- a/src/tests/mod.rs
+++ b/src/tests/mod.rs
@@ -1,6 +1,7 @@
#![allow(clippy::blacklisted_name)]
use crate::error_handling::HandleErrorLayer;
+use crate::extract::MatchedPath;
use crate::BoxError;
use crate::{
extract::{self, Path},
diff --git a/src/tests/mod... | Allow access to matched route pattern(s) from middlewares
## Feature Request
As far as I can tell it's not possible to access information about if a route matched and if so, which route pattern (or patterns in case of nested routes) was matched. This is something a lot of services in environments I've worked needs.
... | Actually I'm not sure its possible to fix. Any middleware you apply run before the router sees the request. So if the router added the matched pattern to a request extension middleware wouldn't see the extension because they run _before_ the router. You'd only be able to see the extension in handlers but that seems les... | 2021-10-25T21:34:02Z | 0.3 | 2021-10-25T21:38:30Z | 939995e80edaf4e882a6e2decb07db5a7c0a2c06 | [
"body::stream_body::stream_body_traits",
"error_handling::traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::path::de::tests::test_parse_struct",
"extract::form::tests::test_form_query",
"extract::path::de::tests::test_parse_map",
"extract::form::tests::test_i... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 1,189 | tokio-rs__axum-1189 | [
"1175"
] | 7e7a2f2058690e8286187c1bd7ac999dcfa506b6 | diff --git /dev/null b/examples/handle-head-request/Cargo.toml
new file mode 100644
--- /dev/null
+++ b/examples/handle-head-request/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+name = "example-handle-head-request"
+version = "0.1.0"
+edition = "2021"
+publish = false
+
+[dependencies]
+axum = { path = "../../axum" }
+tokio... | diff --git /dev/null b/examples/handle-head-request/src/main.rs
new file mode 100644
--- /dev/null
+++ b/examples/handle-head-request/src/main.rs
@@ -0,0 +1,82 @@
+//! Run with
+//!
+//! ```not_rust
+//! cd examples && cargo run -p example-handle-head-request
+//! ```
+
+use axum::response::{IntoResponse, Response};
+u... | Add an example for a GET-or-HEAD handler that special-cases HEAD
Registering a `GET` route also registers a `HEAD` route that calls the same handler. axum will strip the response body if this handler is called with `HEAD`, but that is potentially much slower than never generating a response body in the first place. We ... | I'd be happy to tackle this one as well, though I understand if you want to reserve an issue for the upcoming TWiR and new contributors.
Maybe we wait a few days and if nobody else shows interest you do it?
Hi, @jplatte
I found this from TWIR.
I am interested in contributing, let me grab this.
Thanks. | 2022-07-23T11:10:28Z | 0.5 | 2022-07-27T15:41:40Z | fa51cf52664d2e33fe37ca4252879bb1c73e87e9 | [
"tests::test_something",
"tests::not_found",
"tests::hello_world",
"tests::json",
"tests::multiple_request",
"tests::the_real_deal"
] | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 957 | tokio-rs__axum-957 | [
"954"
] | 8084b242d5b78e53267e63c693dadf71e313320c | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **added:** Add `response::ErrorResponse` and `response::Result` for
`IntoResponse`-based error handling ([#921])
+-... | diff --git a/axum/src/extract/extractor_middleware.rs b/axum/src/extract/extractor_middleware.rs
--- a/axum/src/extract/extractor_middleware.rs
+++ b/axum/src/extract/extractor_middleware.rs
@@ -2,324 +2,15 @@
//!
//! See [`extractor_middleware`] for more details.
-use super::{FromRequest, RequestParts};
-use crate... | Move `axum::extract::extractor_middleware` to `axum::middleware::from_extractor`
## Feature Request
### Motivation
<!--
Please describe the use case(s) or other motivation for the new feature.
-->
### Proposal
<!--
How should the new feature be implemented, and why? Add any considered
drawbacks.
-->
... | Sounds good to me! We didn't use to have the middleware module but that is probably a better home for it.
You up for making a PR? We just have to make its not a breaking change by re-exporting it from the old location.
Also, next time please fill in the issue template. Thats what its there for.
If we want to depr... | 2022-04-22T14:54:04Z | 0.5 | 2022-04-24T15:31:17Z | fa51cf52664d2e33fe37ca4252879bb1c73e87e9 | [
"body::stream_body::stream_body_traits",
"error_handling::traits",
"extract::connect_info::traits",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::form::tests::test_form_query",
"extract::form::tests::test_incorrect_content_type",
"extract::path::de::tests::test_parse_error_at_ke... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 892 | tokio-rs__axum-892 | [
"859"
] | 2e5d56a9b125142817378883b098470d05ab0597 | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -88,6 +88,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **changed:** Update to tokio-tungstenite 0.17 ([#791])
- **breaking:** `Redirect::{to, temporary, permanent}` now acce... | diff --git a/axum/src/extract/connect_info.rs b/axum/src/extract/connect_info.rs
--- a/axum/src/extract/connect_info.rs
+++ b/axum/src/extract/connect_info.rs
@@ -161,7 +161,7 @@ mod tests {
let app = Router::new().route("/", get(handler));
let server = Server::from_tcp(listener)
... | `Router::into_make_service_with_connect_info()` has unnecessary `Target` parameter that can fail to be inferred
## Bug Report
### Version
axum 0.4.8
### Crates
axum
### Description
[`Router::into_make_service_with_connect_info()`](https://docs.rs/axum/0.4.8/axum/struct.Router.html#method.into_make_ser... | > As soon as you have one C that implements Connected for multiple targets, that parameter needs to be specified explicitly. This is very annoying.
What is your use case for this?
> It probably does produce a better error message when the wrong type is used, but having to write out the connection type is frustrat... | 2022-03-31T16:37:01Z | 0.4 | 2022-03-31T16:49:50Z | 2e5d56a9b125142817378883b098470d05ab0597 | [
"error_handling::traits",
"body::stream_body::stream_body_traits",
"extract::connect_info::traits",
"extract::extractor_middleware::traits",
"extract::form::tests::test_form_query",
"extract::form::tests::test_form_body",
"extract::form::tests::test_incorrect_content_type",
"extract::path::de::tests::... | [] | [] | [] | auto_2025-06-06 |
tokio-rs/axum | 2,881 | tokio-rs__axum-2881 | [
"2879"
] | bd3eaa78866127bb9106972f55190cf9fcf3305c | diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -11,10 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **added:** `axum::serve::Serve::tcp_nodelay` and `axum::serve::WithGracefulShutdown::tcp_nodelay` ([#2653])
- **adde... | diff --git a/axum/src/serve.rs b/axum/src/serve.rs
--- a/axum/src/serve.rs
+++ b/axum/src/serve.rs
@@ -544,6 +554,10 @@ mod tests {
routing::get,
Router,
};
+ use std::{
+ future::pending,
+ net::{IpAddr, Ipv4Addr},
+ };
#[allow(dead_code, unused_must_use)]
async f... | add means to find the socket address for Serve and WithGracefulShutdown
- [*] I have looked for existing issues (including closed) about this
## Feature Request
I would like to get the socket address of `Serve` and `WithGracefulShutdown`.
### Motivation
I am the maintainer of Axum Test, and the initial moti... | 2024-08-18T13:32:04Z | 0.7 | 2024-08-25T09:16:13Z | 4179d11797bd8880c74a306b7e05e9d0f081ca1d | [
"error_handling::traits",
"extract::connect_info::traits",
"extract::host::tests::forwarded_parsing",
"extract::path::de::tests::test_parse_error_at_index_error",
"extract::path::de::tests::test_parse_error_at_key_error",
"extract::path::de::tests::test_parse_error_error",
"extract::path::de::tests::tes... | [] | [] | [] | auto_2025-06-06 | |
tokio-rs/axum | 2,645 | tokio-rs__axum-2645 | [
"2641"
] | 5db62e8452f3c34bab83f3fdfacffa1946b91af1 | diff --git a/axum-extra/src/extract/optional_path.rs b/axum-extra/src/extract/optional_path.rs
--- a/axum-extra/src/extract/optional_path.rs
+++ b/axum-extra/src/extract/optional_path.rs
@@ -28,7 +28,7 @@ use serde::de::DeserializeOwned;
///
/// let app = Router::new()
/// .route("/blog", get(render_blog))
-/// ... | diff --git a/axum-extra/src/extract/optional_path.rs b/axum-extra/src/extract/optional_path.rs
--- a/axum-extra/src/extract/optional_path.rs
+++ b/axum-extra/src/extract/optional_path.rs
@@ -75,7 +75,7 @@ mod tests {
let app = Router::new()
.route("/", get(handle))
- .route("/:num", g... | Update `matchit` to 0.8
- [x] I have looked for existing issues (including closed) about this
### Proposal
`matchit` version 0.8 was just [released](https://github.com/ibraheemdev/matchit/releases/tag/v0.8.0).
It includes changes to the syntax so now instead of `/path/:arg/*wildcard` it uses `/path/{arg}/{*wil... | 2024-03-12T23:28:55Z | 0.7 | 2024-10-10T20:46:34Z | 4179d11797bd8880c74a306b7e05e9d0f081ca1d | [
"tests/typed_path/pass/customize_rejection.rs [should pass]",
"tests/typed_path/pass/into_uri.rs [should pass]",
"tests/typed_path/pass/named_fields_struct.rs [should pass]",
"tests/typed_path/pass/option_result.rs [should pass]",
"tests/typed_path/pass/tuple_struct.rs [should pass]",
"tests/typed_path/pa... | [
"tests/debug_middleware/fail/doesnt_take_next.rs [should fail to compile]",
"tests/debug_middleware/fail/next_not_last.rs [should fail to compile]",
"tests/debug_middleware/fail/takes_next_twice.rs [should fail to compile]",
"tests/debug_middleware/pass/basic.rs [should pass]",
"debug_handler::ui_debug_midd... | [] | [] | auto_2025-06-06 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.