Skip to content

Commit f3d0bb8

Browse files
committed
fix: Update lint name to match implementation
1 parent 663d078 commit f3d0bb8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

text/3516-public-private-dependencies.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The dependencies `serde` and `serde_json` are both public dependencies, meaning
7979
This has the implication that a semver incompatible upgrade of these dependencies is a breaking change for this package.
8080

8181
With this RFC, in pre-2024 editions,
82-
you can enable add `lints.rust.external_private_dependency = "warn"` to your
82+
you can enable add `lints.rust.exported_private_dependencies = "warn"` to your
8383
manifest and rustc will warn saying that `serde` and `serde_json` are private
8484
dependencies in a public API.
8585
In 2024+ editions, this will be an error.
@@ -145,7 +145,7 @@ Since the proc-macro can only guarantee that the namespace `clap` is accessible,
145145
As a last-ditch way of dealing with this, a user may allow the error:
146146
```rust
147147
#[doc(hidden)]
148-
#[allow(external_private_dependency)]
148+
#[allow(exported_private_dependencies)]
149149
#[cfg(feature = "derive")]
150150
pub mod __derive_refs {
151151
#[doc(hidden)]
@@ -155,7 +155,7 @@ pub mod __derive_refs {
155155
A similar case is pub-in-private:
156156
```rust
157157
mod private {
158-
#[allow(external_private_dependency)]
158+
#[allow(exported_private_dependencies)]
159159
pub struct Foo { pub x: some_dependency::SomeType }
160160
}
161161
```
@@ -173,16 +173,16 @@ features like `impl Trait` in type aliases if we had it.
173173
The main change to the compiler will be to accept a new modifier on the `--extern` flag that Cargo
174174
supplies which marks it as a private dependency.
175175
The modifier will be called `priv` (e.g. `--extern priv:serde`).
176-
The compiler then emits the lint `external_private_dependency` if it encounters private
176+
The compiler then emits the lint `exported-private-dependencies` if it encounters private
177177
dependencies exposed as `public`.
178178

179-
`external_private_dependency` will be `allow` by default for pre-2024 editions.
179+
`exported-private-dependencies` will be `allow` by default for pre-2024 editions.
180180
It will be a member of the `rust-2024-compatibility` lint group so that it gets automatically picked up by `cargo fix --edition`.
181181
In the 2024 edition, this lint will be `deny`.
182182

183183
In some situations, it can be necessary to allow private dependencies to become
184184
part of the public API. In that case one can permit this with
185-
`#[allow(external_private_dependency)]`. This is particularly useful when
185+
`#[allow(exported_private_dependencies)]`. This is particularly useful when
186186
paired with `#[doc(hidden)]` and other already existing hacks.
187187
This most likely will also be necessary for the more complex relationship of
188188
`libcore` and `libstd` in Rust itself.

0 commit comments

Comments
 (0)