Migrate all crates to the 2018 edition

Most of the CLI crates were already in the 2018 edition, and it turns
out that one of the macro crates was already in the 2018 edition so we
may as well move everything to the 2018 edition!

Always nice to remove those `extern crate` statements nowadays!

This commit also does a `cargo fmt --all` to make sure we're conforming
with style again.
This commit is contained in:
Alex Crichton
2019-03-26 08:00:16 -07:00
parent c5d2b2d1fb
commit a6fe0cefa8
53 changed files with 245 additions and 279 deletions

View File

@ -1,15 +1,13 @@
#![doc(html_root_url = "https://docs.rs/wasm-bindgen-macro/0.2")]
extern crate proc_macro;
#[macro_use]
extern crate quote;
extern crate wasm_bindgen_macro_support as macro_support;
use proc_macro::TokenStream;
use quote::quote;
#[proc_macro_attribute]
pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
match macro_support::expand(attr.into(), input.into()) {
match wasm_bindgen_macro_support::expand(attr.into(), input.into()) {
Ok(tokens) => {
if cfg!(feature = "xxx_debug_only_print_generated_code") {
println!("{}", tokens);
@ -22,7 +20,7 @@ pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
#[proc_macro_attribute]
pub fn __wasm_bindgen_class_marker(attr: TokenStream, input: TokenStream) -> TokenStream {
match macro_support::expand_class_marker(attr.into(), input.into()) {
match wasm_bindgen_macro_support::expand_class_marker(attr.into(), input.into()) {
Ok(tokens) => {
if cfg!(feature = "xxx_debug_only_print_generated_code") {
println!("{}", tokens);