Repository: rinja-rs/askama (language: rust)

Issue:
askama_axum v0.2 error with Template
after update askama_axum to 0.2 (ref #756) i get following error and with the propose use statement

```
error[E0412]: cannot find type `BoxBody` in crate `askama_axum`
  --> mycrate\src\main.rs:11:10
   |
11 | #[derive(Template)]
   |          ^^^^^^^^ not found in `askama_axum`
   |
   = note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this type alias
   |
1  | use axum::body::BoxBody;
   |
help: if you import `BoxBody`, refer to it directly
   |
11 | #[derive(Template)]
```

code similar to example at https://github.com/djc/askama/blob/main/askama_axum/tests/basic.rs

error on `#[derive(Template)]`

```
use askama::Template;
use axum::{
    extract,
    http::StatusCode,
    response::{Html, IntoResponse, Response},
    routing::{get, MethodRouter},
    Router,
};

#[derive(Template)]
#[template(path = "hello.html")]
struct HelloTemplate {
    name: String,
}
```

is why `cargo upgrade` mark update incompatible?

```
name        old req compatible latest new req note        
====        ======= ========== ====== ======= ====
anyhow      1.0.68  1.0.68     1.0.68 1.0.68
askama      0.11.1  0.11.1     0.11.1 0.11.1
askama_axum 0.1.0   0.1.0      0.2.0  0.1.0   incompatible
axum        0.6.1   0.6.1      0.6.1  0.6.1
tokio       1.23.0  1.23.0     1.23.0 1.23.0
```


Discussion / hints:
It sounds like you have some kind of version mismatch between your dependencies going on.
how do find mismatch? cargo update and cargo upgrade show no changes. seems if remove `with-axum` feature is ok but its needed?

```
[dependencies]
anyhow = "1.0.68"
askama = { version = "0.11.1", features = ["serde-json", "with-axum"] }
askama_axum = "0.2.0"
axum = "0.6.1"
tokio = { version = "1.23.0", features = ["full"] }
```
Same problem here. Deps versions like @bouncydingbat .
I'm having the same issue.

I tried downloading the version of `askama_axum` uploaded to crates.io (using [cargo-download](https://crates.io/crates/cargo-download)), then running `cargo test` and experienced the same error. Here's the full log:

```text
$ cargo download askama_axum > askama_axum.tar.gz
INFO: cargo-download v0.1.2
INFO: Latest version of crate askama_axum=* is 0.2.0
INFO: Crate `askama_axum==0.2.0` downloaded successfully

$ tar -xzvf askama_axum.tar.gz
askama_axum-0.2.0/.cargo_vcs_info.json
askama_axum-0.2.0/Cargo.toml
askama_axum-0.2.0/Cargo.toml.orig
askama_axum-0.2.0/LICENSE-APACHE
askama_axum-0.2.0/LICENSE-MIT
askama_axum-0.2.0/README.md
askama_axum-0.2.0/src/lib.rs
askama_axum-0.2.0/templates/hello.html
askama_axum-0.2.0/tests/basic.rs

$ cd askama_axum-0.2.0

$ cargo test
    Updating crates.io index
   Compiling proc-macro2 v1.0.49
[...] lines removed for brevity
   Compiling askama v0.11.1
   Compiling askama_axum v0.2.0 (/tmp/askama_axum-0.2.0)
   Compiling tokio-util v0.7.4
   Compiling h2 v0.3.15
   Compiling hyper v0.14.23
error[E0412]: cannot find type `BoxBody` in crate `askama_axum`
  --> tests/basic.rs:10:10
   |
10 | #[derive(Template)]
   |          ^^^^^^^^ not found in `askama_axum`
   |
   = note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
   |
1  | use axum::body::BoxBody;
   |
1  | use axum_core::body::BoxBody;
   |
help: if you import `BoxBody`, refer to it directly
   |
10 | #[derive(Template)]
   |

For more information about this error, try `rustc --explain E0412`.
error: could not compile `askama_axum` due to previous error
warning: build failed, waiting for other jobs to finish...
```
I took a look at the version of `askama_shared` uploaded to crates.io, and I think this is the source of the issue: On line 224 of `src/generator.rs` of the published version of the crate, the code to be generated includes `::askama_axum::BoxBody`, which is no longer re-exported by `askama_axum` (it was in 0.1.0, it's not in 0.2.0).

It looks like the version of `askama_shared` in the `0.11.x` branch [shouldn't have this issue](https://github.com/djc/askama/blob/0.11.x/askama_shared/src/generator.rs#L222), so I believe this issue could be resolved by publishing the new version of `askama_shared` to crates.io.

Fix patch:
diff --git a/askama_axum/src/lib.rs b/askama_axum/src/lib.rs
index da3d69902..469b2b438 100644
--- a/askama_axum/src/lib.rs
+++ b/askama_axum/src/lib.rs
@@ -3,6 +3,7 @@
 #![deny(unreachable_pub)]
 
 pub use askama::*;
+pub use axum_core::body::BoxBody;
 pub use axum_core::response::{IntoResponse, Response};
 use http::StatusCode;
 


Test patch: