Features and dependencies cannot have the same name

I'm trying to give a library of mine optional serde support, but I'm confused about what to call the feature in my Cargo.toml. I've seen crates that have it called serde, and yet when I attempt this:

[features]
default = []
serde = ["serde"]

[dependencies]
serde = { version = "1.0", optional = true }

I get:

error: failed to parse manifest at `/home/colin/code/rust/kanji/Cargo.toml`

Caused by:
  Features and dependencies cannot have the same name: `serde`

Sure I could call it json or something, but serde isn't limited to JSON. Any idea of how to work around this? Thank you.

When you have an optional dependency named serde, this automatically creates a feature named serde. You don't need to add anything to your [features] section.