File: extension_not_clone.stderr

package info (click to toggle)
rust-axum 0.7.9-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,992 kB
  • sloc: javascript: 26; makefile: 24; sql: 6; sh: 1
file content (28 lines) | stat: -rw-r--r-- 1,480 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
error[E0277]: the trait bound `NonCloneType: Clone` is not satisfied
 --> tests/debug_handler/fail/extension_not_clone.rs:7:38
  |
7 | async fn test_extension_non_clone(_: Extension<NonCloneType>) {}
  |                                      ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NonCloneType`, which is required by `Extension<NonCloneType>: FromRequest<(), _>`
  |
  = help: the following other types implement trait `FromRequest<S, M>`:
            (T1, T2)
            (T1, T2, T3)
            (T1, T2, T3, T4)
            (T1, T2, T3, T4, T5)
            (T1, T2, T3, T4, T5, T6)
            (T1, T2, T3, T4, T5, T6, T7)
            (T1, T2, T3, T4, T5, T6, T7, T8)
            (T1, T2, T3, T4, T5, T6, T7, T8, T9)
          and $N others
  = note: required for `Extension<NonCloneType>` to implement `FromRequestParts<()>`
  = note: required for `Extension<NonCloneType>` to implement `FromRequest<(), axum_core::extract::private::ViaParts>`
note: required by a bound in `__axum_macros_check_test_extension_non_clone_0_from_request_check`
 --> tests/debug_handler/fail/extension_not_clone.rs:7:38
  |
7 | async fn test_extension_non_clone(_: Extension<NonCloneType>) {}
  |                                      ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__axum_macros_check_test_extension_non_clone_0_from_request_check`
help: consider annotating `NonCloneType` with `#[derive(Clone)]`
  |
4 + #[derive(Clone)]
5 | struct NonCloneType;
  |