File tree 4 files changed +19
-6
lines changed
4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
- target
1
+ / target /
2
2
Cargo.lock
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " static_assert_macro"
3
- version = " 1.0.3 "
3
+ version = " 1.0.4 "
4
4
authors = [
" NODA, Kai <[email protected] >" ]
5
5
description = " Library implementation of so-called `static_assert`"
6
6
documentation = " https://nodakai.github.io/rust-static_assert_macro/static_assert_macro"
7
7
repository = " https://github.com/nodakai/rust-static_assert_macro"
8
8
keywords = [" static_assert" , " static" , " assert" ]
9
9
readme = " README.md"
10
10
license = " Apache-2.0"
11
+ edition = " 2015"
Original file line number Diff line number Diff line change 7
7
Cargo.toml:
8
8
9
9
[dependencies]
10
- static_assert_macro = "1.0.0 "
10
+ static_assert_macro = "1"
11
11
12
- Your code:
12
+ Your code (Rust 2018):
13
+
14
+ use static_assert_macro::static_assert;
15
+
16
+ static_assert!(1 < 2);
17
+
18
+ fn main() {
19
+ static_assert!(3 < 4, 10 < 10);
20
+ }
21
+
22
+ For Rust 2015 code, replace ` use static_assert_macro::static_assert; ` with
13
23
14
24
#[macro_use]
15
25
extern crate static_assert_macro;
16
-
17
- static_assert!(1 < 2);
18
26
19
27
For more details, visit
20
28
Original file line number Diff line number Diff line change 11
11
//!
12
12
//! ## Example
13
13
//! ```
14
+ //! // Rust 2015 syntax
14
15
//! #[macro_use]
15
16
//! extern crate static_assert_macro;
16
17
//!
18
+ //! #[cfg(feature = "Rust 2018 syntax")]
19
+ //! use static_assert_macro::static_assert;
20
+ //!
17
21
//! static_assert!(0 < 1, 1 < 2, 2 < 3);
18
22
//!
19
23
//! fn main() {
You can’t perform that action at this time.
0 commit comments