You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Actually I'm wondering if both names aren't wrong. One problem I'm finding in practice is that if all impls have the same name, it's hard to sort out what you want to use and what you want to export.
Here is the scenario I'm talking about:
import result::{result, methods}; // something I use
export foo, methods;
type foo = ...;
impl methods for foo { ... }
I am wondering if it wouldn't be better to name the impl after the type in question. Then you could (easily) export just the methods for your type and not others, and you can use a type and its methods by doing:
import some_type::some_type;
All that said, I suppose that #1893 addresses this too:
import result::{result, methods}; // something I use
pub type foo = ...;
pub impl methods for foo { ... }
That's another benefit of #1893 I hadn't considered.
So I don't know, maybe methods is best after all---anyhow, just tossing this out there.
…71, r=blyxyas
Add regression ui test for rust-lang#2371Fixesrust-lang#2371.
rust-lang#2371 seems to already be handled correctly in the lint. This PR adds a ui regression test so we can close it.
r? `@blyxyas`
changelog: Add regression ui test for rust-lang#2371
celinval
pushed a commit
to celinval/rust-dev
that referenced
this issue
Jun 4, 2024
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
methods
is shorter, maybe more descriptiveThe text was updated successfully, but these errors were encountered: