Skip to content

Commit 166370f

Browse files
committed
fixup! Add test case for leaking trait bounds
1 parent 988e5a6 commit 166370f

File tree

2 files changed

+52
-43
lines changed

2 files changed

+52
-43
lines changed

Cargo.toml

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,59 @@
1-
[package]
2-
name = "educe"
3-
version = "0.5.11"
4-
authors = ["Magic Len <[email protected]>"]
5-
edition = "2021"
6-
rust-version = "1.60"
7-
repository = "https://github.com/magiclen/educe"
8-
homepage = "https://magiclen.org/educe"
9-
keywords = ["derive", "macro", "trait", "field", "procedural"]
10-
categories = ["no-std", "rust-patterns"]
11-
description = "This crate offers procedural macros designed to facilitate the swift implementation of Rust's built-in traits."
12-
license = "MIT"
13-
include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE"]
14-
15-
[lib]
16-
proc-macro = true
171

182
[dependencies]
19-
syn = "2"
20-
quote = "1"
21-
proc-macro2 = "1"
3+
proc-macro2="1"
4+
quote="1"
5+
syn="2"
226

23-
enum-ordinalize = { version = "4.2", default-features = false, features = ["derive"] }
7+
[dependencies.enum-ordinalize]
8+
default-features=false
9+
version="4.2"
10+
features=["derive"]
2411

2512
[dev-dependencies]
26-
syn = { version = "2", features = ["full"] }
27-
assert-eq-float = "0.1"
28-
rustversion = "1"
13+
assert-eq-float="0.1"
14+
rustversion="1"
15+
16+
[dev-dependencies.syn]
17+
version="2"
18+
features=["full"]
2919

3020
[features]
31-
default = ["Debug", "Clone", "Copy", "PartialEq", "Eq", "PartialOrd", "Ord", "Hash", "Default", "Deref", "DerefMut", "Into"]
32-
33-
full = ["syn/full"]
34-
35-
Debug = []
36-
Clone = []
37-
Copy = []
38-
PartialEq = []
39-
Eq = []
40-
PartialOrd = []
41-
Ord = []
42-
Hash = []
43-
Default = []
44-
Deref = []
45-
DerefMut = []
46-
Into = []
21+
Clone=[]
22+
Copy=[]
23+
Debug=[]
24+
Default=[]
25+
Deref=[]
26+
DerefMut=[]
27+
Eq=[]
28+
Hash=[]
29+
Into=[]
30+
Ord=[]
31+
PartialEq=[]
32+
PartialOrd=[]
33+
default=["Debug", "Clone", "Copy", "PartialEq", "Eq", "PartialOrd", "Ord", "Hash", "Default", "Deref", "DerefMut", "Into"]
34+
full=["syn/full"]
35+
36+
[lib]
37+
proc-macro=true
38+
39+
[package]
40+
description="This crate offers procedural macros designed to facilitate the swift implementation of Rust's built-in traits."
41+
edition="2021"
42+
homepage="https://magiclen.org/educe"
43+
license="MIT"
44+
name="educe"
45+
repository="https://github.com/magiclen/educe"
46+
rust-version="1.60"
47+
version="0.5.11"
48+
authors=["Magic Len <[email protected]>"]
49+
categories=["no-std", "rust-patterns"]
50+
include=["src/**/*", "Cargo.toml", "README.md", "LICENSE"]
51+
keywords=["derive", "macro", "trait", "field", "procedural"]
52+
53+
[package.metadata]
54+
55+
[package.metadata.docs]
4756

4857
[package.metadata.docs.rs]
49-
all-features = true
50-
rustdoc-args = ["--cfg", "docsrs"]
58+
all-features=true
59+
rustdoc-args=["--cfg", "docsrs"]

tests/clone_struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![cfg(feature = "Clone")]
22
#![no_std]
33

4-
use core::{fmt::Debug, marker::PhantomData};
5-
64
use educe::Educe;
75

86
#[test]
@@ -175,6 +173,8 @@ fn bound_3() {
175173
#[cfg(feature = "Debug")]
176174
#[test]
177175
fn leaking_bounds() {
176+
use core::{fmt::Debug, marker::PhantomData};
177+
178178
#[derive(Educe)]
179179
#[educe(Debug(bound(T: Debug)), Clone(bound(T: Clone)))]
180180
struct Struct<T> {

0 commit comments

Comments
 (0)