-
Notifications
You must be signed in to change notification settings - Fork 13.4k
prohibit types named dyn` #52077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prohibit types named dyn` #52077
Conversation
Some relevant searches for text across crates.io:
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
339cd2d
to
2468d16
Compare
Please also add a test to ensure Also, ensure |
OK -- though I think we have a test for that already. Let me see if I can find it. Well, we have this, which isn't that great:
Ah, good catch. |
Ugh.
|
If the true goal is to turn |
I think that -- in retrospect -- I wish we had only enabled That said, you're right that there exist other workarounds one could use -- |
We can still do it, but I'm not sure if it matters much now since we already have to support this mechanism. Also what about things like use foo::bar as dyn; |
I don't care what we do here and mostly feel that the amount of attention its receiving is a misallocation of resources to an artificial issue, so I'd hope this could be decided without any protracted further discussion. |
OK, I'm convinced we can just close this PR and the original issue as "here is the way to implement a trait named |
Fixes #50405
cc @rust-lang/lang -- I took the liberty of extending the "no traits named
dyn
" rule to be "no types nameddyn
". It seemed more uniform. People ok with that?Should we do a crater run for this?
r? @petrochenkov