From c4e2cf9601d35646054b48b2503d6ddad7412b8f Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 8 Mar 2021 17:39:51 +0000 Subject: [PATCH] Opt-in to rustc_private for `rust-analyzer` rust-analyzer/rust-analyzer#7891 --- Cargo.toml | 4 ++++ clippy_lints/Cargo.toml | 10 +++++++--- clippy_utils/Cargo.toml | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 98a5be2898dc..a6d0c16fd3ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,3 +56,7 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" } deny-warnings = [] integration = ["tempfile"] internal-lints = ["clippy_lints/internal-lints"] + +[package.metadata.rust-analyzer] +# This package uses #[feature(rustc_private)] +rustc_private = true diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml index d5ec8597044c..ff4cf527ec48 100644 --- a/clippy_lints/Cargo.toml +++ b/clippy_lints/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "Manish Goregaokar ", "Andre Bogus ", "Georg Brandl ", - "Martin Carton " + "Martin Carton ", ] description = "A bunch of helpful lints to avoid common pitfalls in Rust" repository = "https://github.com/rust-lang/rust-clippy" @@ -29,10 +29,10 @@ smallvec = { version = "1", features = ["union"] } toml = "0.5.3" unicode-normalization = "0.1" semver = "0.11" -rustc-semver="1.1.0" +rustc-semver = "1.1.0" # NOTE: cargo requires serde feat in its url dep # see -url = { version = "2.1.0", features = ["serde"] } +url = { version = "2.1.0", features = ["serde"] } quote = "1" syn = { version = "1", features = ["full"] } @@ -40,3 +40,7 @@ syn = { version = "1", features = ["full"] } deny-warnings = [] # build clippy with internal lints enabled, off by default internal-lints = ["clippy_utils/internal-lints"] + +[package.metadata.rust-analyzer] +# This crate uses #[feature(rustc_private)] +rustc_private = true diff --git a/clippy_utils/Cargo.toml b/clippy_utils/Cargo.toml index 9c01badb04cc..9e07f140cf1b 100644 --- a/clippy_utils/Cargo.toml +++ b/clippy_utils/Cargo.toml @@ -17,3 +17,7 @@ rustc-semver="1.1.0" [features] internal-lints = [] + +[package.metadata.rust-analyzer] +# This crate uses #[feature(rustc_private)] +rustc_private = true