Skip to content

Conversation

@traviscross
Copy link
Contributor

@traviscross traviscross commented Jan 14, 2026

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.

Related

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.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 14, 2026
@traviscross traviscross self-assigned this Jan 14, 2026
@traviscross traviscross added T-lang Relevant to the language team needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. labels Jan 14, 2026
@traviscross
Copy link
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 14, 2026
… r=<try>

Make `ambiguous_glob_reexports` an FCW at deny
@traviscross traviscross added the L-ambiguous_glob_reexports Lint: ambiguous_glob_reexports label Jan 14, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 15, 2026

💥 Test timed out after 21600s

@traviscross
Copy link
Contributor Author

@bors try

rust-bors bot pushed a commit that referenced this pull request Jan 15, 2026
… r=<try>

Make `ambiguous_glob_reexports` an FCW at deny
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 15, 2026

☀️ Try build successful (CI)
Build commit: d336647 (d336647335db03a0fc5b24fc5325cd3905c5b8e8, parent: c9af9c1dc85a55e309345030ff9cb7ea247953fa)

@petrochenkov
Copy link
Contributor

petrochenkov commented Jan 15, 2026

This is a lint and not a language rule because it uses the "effective visibility" tables (whether something is reachable from outside of the crate) for reporting, and those tables are not necessarily precise (can conservatively mark things as reachable).
All hard language rules currently use "local" nominal visibilities (what is written in pub), and not "global" effective visibilities (what is reachable where considering reexports, return types, etc).

So I'm skeptical about making this an FCW, but deny-by-default is probably fine.

@traviscross
Copy link
Contributor Author

Makes sense.

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-151146 created and queued.
🤖 Automatically detected try build d336647
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L-ambiguous_glob_reexports Lint: ambiguous_glob_reexports needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-crater Status: Waiting on a crater run to be completed. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants