Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit a5fa6e8

Browse files
committed
Compile with stable toolchain
1 parent fecbf4b commit a5fa6e8

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

accel-derive/src/lib.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! proc_macro for accel's #[kernel]
2-
#![feature(proc_macro)]
32
#![recursion_limit = "128"]
43

54
extern crate nvptx;
@@ -55,9 +54,9 @@ const QUOTE: &[char] = &[' ', '"'];
5554
/// equals to `accel-core = { path = "/some/path" }`
5655
fn parse_crate(attr: &syn::Attribute) -> Crate {
5756
let path = &attr.path;
58-
let path = quote!{#path}.to_string();
57+
let path = quote! {#path}.to_string();
5958
let tts = &attr.tts;
60-
let tts = quote!{#tts}.to_string();
59+
let tts = quote! {#tts}.to_string();
6160
let tokens: Vec<_> = tts
6261
.trim_matches(PENE)
6362
.split('=')
@@ -102,7 +101,7 @@ fn header(crates: &[Crate]) -> String {
102101
.iter()
103102
.map(|c| syn::Ident::from(c.name.replace("-", "_")))
104103
.collect();
105-
let tt = quote!{
104+
let tt = quote! {
106105
#![feature(abi_ptx)]
107106
#![no_std]
108107
#(extern crate #crates;), *
@@ -122,7 +121,7 @@ fn ptx_kernel(func: &syn::ItemFn) -> String {
122121
let inputs = &decl.inputs;
123122
let output = &decl.output;
124123

125-
let kernel = quote!{
124+
let kernel = quote! {
126125
#[no_mangle]
127126
#vis #unsafety extern "ptx-kernel" #fn_token #ident(#inputs) #output #block
128127
};
@@ -153,9 +152,9 @@ fn func2caller(ptx_str: &str, func: &syn::ItemFn) -> TokenStream {
153152
_ => unreachable!(""),
154153
})
155154
.collect();
156-
let kernel_name = quote!{ #ident }.to_string();
155+
let kernel_name = quote! { #ident }.to_string();
157156

158-
let caller = quote!{
157+
let caller = quote! {
159158
#vis #fn_token #ident(grid: ::accel::Grid, block: ::accel::Block, #inputs) #output {
160159
use ::accel::kernel::void_cast;
161160
use ::accel::module::Module;

examples/add.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(proc_macro, proc_macro_gen, use_extern_macros)]
2-
31
extern crate accel;
42
extern crate accel_derive;
53

examples/add_managed.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(proc_macro, proc_macro_gen, use_extern_macros)]
2-
31
extern crate accel;
42
extern crate accel_derive;
53

0 commit comments

Comments
 (0)