From 2c99034eb007f92ce5f408eefcfb36be0deaac40 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Wed, 14 Jan 2026 21:28:34 +0000 Subject: [PATCH] Make `ambiguous_glob_reexports` an FCW at deny Is there any good reason for someone to intentionally create an ambiguous glob reexport? No such reasons come to mind offhand. We lint strongly against use of these ambiguous glob reexports, so not linting strongly at the def-site pushes cost, relatively, to users rather than upstreams. It'd be better to push this cost upstream. Let's make `ambiguous_glob_reexports` an FCW that lints at deny-by-default and that warns in dependencies. TODO: I'm not fixing the tests at this point as I just want to do a crater run. --- compiler/rustc_lint_defs/src/builtin.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 4230aa7568e25..ba80427c95cee 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -3197,8 +3197,12 @@ declare_lint! { /// `bar::X` would cause compilation errors in downstream crates because `X` is defined /// multiple times in the same namespace of `this_crate`. pub AMBIGUOUS_GLOB_REEXPORTS, - Warn, + Deny, "ambiguous glob re-exports", + @future_incompatible = FutureIncompatibleInfo { + reason: fcw!(FutureReleaseError #107880), // TODO. + report_in_deps: true, + }; } declare_lint! {