diff options
author | 2017-07-27 21:30:24 -0500 | |
---|---|---|
committer | 2017-07-27 21:30:24 -0500 | |
commit | 271df39bdba0690ea7ba77a6ff5d8d7edb9b8036 (patch) | |
tree | 26db49fa1a822a7a778dd903a2ce75ef1478f2ca /macros/src | |
parent | b9f50e432eb2fe0f1276bb69c053bb9a7368675a (diff) | |
download | rtic-271df39bdba0690ea7ba77a6ff5d8d7edb9b8036.tar.gz rtic-271df39bdba0690ea7ba77a6ff5d8d7edb9b8036.tar.zst rtic-271df39bdba0690ea7ba77a6ff5d8d7edb9b8036.zip |
`Send`-ness check is now in rtfm-core
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/trans.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/macros/src/trans.rs b/macros/src/trans.rs index a6dcf8ab..c65aaa52 100644 --- a/macros/src/trans.rs +++ b/macros/src/trans.rs @@ -12,7 +12,6 @@ pub fn app(app: &App, ownerships: &Ownerships) -> Tokens { let mut root = vec![]; let mut main = vec![]; - ::trans::check(app, &mut main); ::trans::init(app, &mut main, &mut root); ::trans::idle(app, ownerships, &mut main, &mut root); ::trans::resources(app, ownerships, &mut root); @@ -28,25 +27,6 @@ pub fn app(app: &App, ownerships: &Ownerships) -> Tokens { quote!(#(#root)*) } -// Checks that the resource types are valid -// Sadly we can't do this test at expansion time. Instead we'll generate some -// code that won't compile if the types don't meet the requirements -fn check(app: &App, main: &mut Vec<Tokens>) { - if !app.resources.is_empty() { - main.push(quote! { - fn is_send<T>() where T: Send {} - }); - } - - for resource in app.resources.values() { - let ty = &resource.ty; - - main.push(quote! { - is_send::<#ty>(); - }); - } -} - fn idle( app: &App, ownerships: &Ownerships, |