rust/compiler/rustc_lexer/Cargo.toml
Nicholas Nethercote beba32cebb Specify rust lints for compiler/ crates via Cargo.
By naming them in `[workspace.lints.rust]` in the top-level
`Cargo.toml`, and then making all `compiler/` crates inherit them with
`[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`,
because they're a bit different.)

The advantages of this over the current approach:
- It uses a standard Cargo feature, rather than special handling in
  bootstrap. So, easier to understand, and less likely to get
  accidentally broken in the future.
- It works for proc macro crates.

It's a shame it doesn't work for rustc-specific lints, as the comments
explain.
2025-03-08 08:41:09 +11:00

29 lines
659 B
TOML

[package]
name = "rustc_lexer"
version = "0.0.0"
license = "MIT OR Apache-2.0"
edition = "2024"
repository = "https://github.com/rust-lang/rust/"
description = """
Rust lexer used by rustc. No stability guarantees are provided.
"""
# Note: do not remove this blank `[lib]` section.
# This will be used when publishing this crate as `rustc-ap-rustc_lexer`.
[lib]
# Note that this crate purposefully does not depend on other rustc crates
[dependencies]
memchr = "2.7.4"
unicode-xid = "0.2.0"
[dependencies.unicode-properties]
version = "0.1.0"
default-features = false
features = ["emoji"]
[dev-dependencies]
expect-test = "1.4.0"
[lints]
workspace = true