-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
core::str::Str.as_slice() should be renamed as_str() #14433
Comments
I'm working in this general direction with my string refactoring
|
I can make this change since it looks like it still needs to be complete? |
cc @aturon |
I don't mind working on this if it needs to be done. |
@Manishearth this will likely be done as part of the API stabilization for strings, which should be wrapping up this week. |
I started on this but it's more work than I expected. I'll do something automated if noone beats me to it. |
This closes rust-lang#14433 [breaking-change]
@aturon Should this still be done for consistency? There are still a bunch of |
@japaric Yes and yes. This has been waiting a bit while the ergonomics for (Also, in general we haven't done API stabilization for |
I still have the machinery to do this kicking around somewhere from last time. iirc, my last PR got closed with something like "not yet", say the word and I'll reopen. |
@richo Awesome, and thanks for your patience! |
No stress. (Thanks for dealing with my often stream of consciousness issues and PRs!). Should I take it that this is worth doing now or wait for the next meeting? |
@richo Let me discuss the staging with the team and get back to you. |
Traige: this is still true today |
Offer to do it stands |
Nominating for 1.0-beta P-backcompat-libs. |
1.0 beta, P-backcompat-libs, I-needs-decision. |
Annoyingly, I can't assign this to @richo, but it seems he's got it under control (thanks!). So let this serve as an "assignment" :) |
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes rust-lang#22751 Closes rust-lang#14433 [breaking-change]
\o/ |
…, r=Veykril Add doc-alias based completion Closes rust-lang#14406. I adapted the parsing code from the CfgExpr parsing code, maybe there's a better abstraction for both, or attribute parsing in general. It also includes `doc(hidden)`-parsing, which means it could replace the other function. There are a few tests for parsing. `process_all_names` changed the most, I added some docs there to explain what happens. Many call sites just pass an empy vec to `add_path_resolution`'s `doc_aliases`, since either it doesn't make sense to pass anything (e.g. visibility completion) or I don't know where to get them from. Shouldn't really matter, as it will just not show aliases if the vec is empty and we can extend alias completion in these cases later. I added two tests in `special.rs` for struct name completion (which was the main thing I wanted). I also tried function and field names, but these don't work yet. I want to add those in a follow-up PR.
…2, r=Veykril doc(alias)-based completion round 2 Follow-up on rust-lang#14433 We can now complete fields, functions and some use/mods. Flyimports don't behave, I don't really have the time to understand the structure there either. While reading the flyimport code, I removed one method only used there, the closure-tree was a bit confusing, I can revert that if you want.
The method
as_slice()
in thecore::str::Str
trait should be renamed toas_str()
. This avoids the name collision withcore::slice::Vector.as_slice()
for types that need to implement bothVector
andStr
(as I believeVec<Ascii>
should).I'm filing this issue now to give a chance for anyone to suggest any reasons why this is a bad idea. Otherwise I will go ahead and make the change myself.
The text was updated successfully, but these errors were encountered: