Skip to content

Commit 67cb619

Browse files
paulfariellotikue
authored andcommitted
Add test for rpc with cfg attr
1 parent db276ea commit 67cb619

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

plugins/tests/service.rs

+14
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ fn raw_idents() {
5656
}
5757
}
5858

59+
#[test]
60+
fn service_with_cfg_rpc() {
61+
#[tarpc::service]
62+
trait Foo {
63+
async fn foo();
64+
#[cfg(not(test))]
65+
async fn bar(s: String) -> String;
66+
}
67+
68+
impl Foo for () {
69+
async fn foo(self, _: context::Context) {}
70+
}
71+
}
72+
5973
#[test]
6074
fn syntax() {
6175
#[tarpc::service]

0 commit comments

Comments
 (0)