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

Commit 6790ad4

Browse files
committed
Remove 'extern crate proc_macro' from example code
1 parent 9e08476 commit 6790ad4

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
rust: [nightly, beta, stable, 1.31.0]
15+
rust: [nightly, beta, stable, 1.42.0, 1.31.0]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- uses: dtolnay/rust-toolchain@master
1919
with:
2020
toolchain: ${{matrix.rust}}
21+
- if: matrix.rust == '1.31.0'
22+
run: echo 'extern crate proc_macro;' >> demo-hack-impl/src/lib.rs
2123
- run: cargo run --manifest-path example/Cargo.toml
2224
- run: cargo test --all

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ The function signature is the same as for ordinary function-like procedural
3333
macros.
3434

3535
```rust
36-
extern crate proc_macro;
37-
3836
use proc_macro::TokenStream;
3937
use proc_macro_hack::proc_macro_hack;
4038
use quote::quote;

demo-hack-impl/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate proc_macro;
2-
31
use proc_macro::TokenStream;
42
use proc_macro_hack::proc_macro_hack;
53
use quote::quote;

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
//! macros.
3232
//!
3333
//! ```
34-
//! extern crate proc_macro;
35-
//!
34+
//! # extern crate proc_macro;
35+
//! #
3636
//! use proc_macro::TokenStream;
3737
//! use proc_macro_hack::proc_macro_hack;
3838
//! use quote::quote;

0 commit comments

Comments
 (0)