mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-08 04:21:03 +01:00
Add test file that creates a compiler error when hygiene is violated/stuff is used from outer scope
This commit is contained in:
14
tarpc/tests/proc_macro_hygene.rs
Normal file
14
tarpc/tests/proc_macro_hygene.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
#![no_implicit_prelude]
|
||||
extern crate tarpc as some_random_other_name;
|
||||
|
||||
#[::tarpc::derive_serde]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum TestData {
|
||||
Black,
|
||||
White,
|
||||
}
|
||||
|
||||
#[::tarpc::service]
|
||||
pub trait ColorProtocol {
|
||||
async fn get_opposite_color(color: u8) -> u8;
|
||||
}
|
||||
Reference in New Issue
Block a user