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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Compile-time compat check: `#[run_app]` macro vs `Run` trait.
//!
//! This file does **not** run any runtime logic. Its sole purpose is to be
//! **compiled**: if `#[run_app]` generates a `run` signature that no longer
//! matches `Run::run`, this file will produce a compile error and CI will
//! surface the divergence immediately.
//!
//! History: mae 0.3.0 added `graph_pool: neo4rs::Graph` to `Run::run`.
//! `mae_macros::run_app` was not updated at the same time; the mismatch was
//! caught late. This test prevents that from happening again.
//!
//! Run with:
//! cargo test --features integration-testing --test run_app_compat
use app;
use *;
// ── Minimal App implementation ────────────────────────────────────────────────
/// `#[run_app]` expands `get_context::<AppContext>()` — must exist in scope.
;
// ── Run implementation via #[run_app] ─────────────────────────────────────────
//
// The macro rewrites this entire function, generating a hardcoded signature.
// If that generated signature does not satisfy the `Run` trait (e.g. a new
// parameter was added to the trait but the macro was not updated), this impl
// block will fail to compile.
//
// NOTE: The macro ignores the written parameter list and return type below —
// only the first *statement* in the body is used (it becomes the final
// method-chain segment on the Actix-Web `App` builder).
// ── Placeholder test so `cargo test` has something to report ─────────────────
/// This test has no assertions. The real regression check is whether this
/// file *compiles* at all.