-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
std::str::StrSlice needs documentation #9370
Comments
This is a bug in the language. There are two rules on implementing a trait. Either one of the rules must be met, always. Or both. Never none.
This is so that you can always combine any two crates and not get conflicting implementations (coherency). You can't just say "impl int", or "impl ~str", you need to have a "dummy" trait like StrSlice The thing to fix is to be able to add an attribute that says "pretend that this crate defines this builtin type so I can give it methods directly", a 3rd rule to the coherency rules that only applies ot builtins |
So the issue reported is something completely different and out of scope. Closing this issue then. |
Replace `contains_ty(..)` with `Ty::contains(..)` This removes some code we don't need and the method syntax is also more readable IMO. changelog: none
Reporting the issue here to assign it to myself and soon push a Pull Request against it.
The text was updated successfully, but these errors were encountered: