about summary refs log tree commit diff
path: root/compiler/rustc_lint_defs/src/builtin.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-08 14:15:48 +0000
committerbors <bors@rust-lang.org>2024-04-08 14:15:48 +0000
commitab3dba92db355b8d97db915a2dca161a117e959c (patch)
tree788440fa9a858bba6b4f3743642b7c726e8e7299 /compiler/rustc_lint_defs/src/builtin.rs
parent75fd074338801fba74a8cf7f8c48c5c5be362d08 (diff)
parentf8252712a5339d18405a19037b30be23aefeb476 (diff)
downloadrust-ab3dba92db355b8d97db915a2dca161a117e959c.tar.gz
rust-ab3dba92db355b8d97db915a2dca161a117e959c.zip
Auto merge of #123628 - matthiaskrgr:rollup-6otgb94, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #115984 (extending filesystem support for Hermit)
 - #120144 (privacy: Stabilize lint `unnameable_types`)
 - #122807 (Add consistency with phrases "meantime" and "mean time")
 - #123089 (Add invariant to VecDeque::pop_* that len < cap if pop successful)
 - #123595 (Documentation fix)
 - #123625 (Stop exporting `TypeckRootCtxt` and `FnCtxt`.)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_lint_defs/src/builtin.rs')
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs
index 30522628f46..53b5273803c 100644
--- a/compiler/rustc_lint_defs/src/builtin.rs
+++ b/compiler/rustc_lint_defs/src/builtin.rs
@@ -4311,7 +4311,6 @@ declare_lint! {
     /// ### Example
     ///
     /// ```rust,compile_fail
-    /// # #![feature(type_privacy_lints)]
     /// # #![allow(unused)]
     /// #![deny(unnameable_types)]
     /// mod m {
@@ -4328,10 +4327,14 @@ declare_lint! {
     ///
     /// It is often expected that if you can obtain an object of type `T`, then
     /// you can name the type `T` as well, this lint attempts to enforce this rule.
+    /// The recommended action is to either reexport the type properly to make it nameable,
+    /// or document that users are not supposed to be able to name it for one reason or another.
+    ///
+    /// Besides types, this lint applies to traits because traits can also leak through signatures,
+    /// and you may obtain objects of their `dyn Trait` or `impl Trait` types.
     pub UNNAMEABLE_TYPES,
     Allow,
     "effective visibility of a type is larger than the area in which it can be named",
-    @feature_gate = sym::type_privacy_lints;
 }
 
 declare_lint! {