We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
&'static str
1 parent 38e20bb commit 9364f15Copy full SHA for 9364f15
tests/tracked_fn_return_static.rs
@@ -6,16 +6,22 @@ use salsa::Database;
6
#[salsa::input]
7
struct Input {}
8
9
+#[derive(Clone, PartialEq)]
10
+struct NotUpdate<'a> {
11
+ _marker: std::marker::PhantomData<&'a ()>,
12
+}
13
+
14
#[salsa::tracked]
-fn test(_db: &dyn salsa::Database, _: Input) -> &'static str {
- "test"
15
+fn test(_db: &dyn salsa::Database, _: Input) -> NotUpdate<'static> {
16
+ NotUpdate {
17
+ _marker: std::marker::PhantomData,
18
+ }
19
}
20
21
#[test]
22
fn invoke() {
23
salsa::DatabaseImpl::new().attach(|db| {
24
let input = Input::new(db);
- let x: &str = test(db, input);
- assert_eq!(x, "test");
25
+ test(db, input);
26
})
27
0 commit comments