-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto merge of #20058 : Kimundi/rust/str_pattern_pre, r=alexcrichton
This stabilizes most methods on `&str` working with patterns in a way that is forwards-compatible with a generic string pattern matching API: - Methods that are using the primary name for their operation are marked as `#[stable]`, as they can be upgraded to a full `Pattern` API later without existing code breaking. Example: `contains(&str)` - Methods that are using a more specific name in order to not clash with the primary one are marked as `#[unstable]`, as they will likely be removed once their functionality is merged into the primary one. Example: `contains_char<C: CharEq>(C)` - The method docs got changed to consistently refer to the pattern types as a pattern. - Methods whose names do not match in the context of the more generic API got renamed. Example: `trim_chars -> trim_matches` Additionally, all methods returning iterators got changed to return unique new types with changed names in accordance with the new naming guidelines. See also rust-lang/rfcs#528 Due to some deprecations and type changes, this is a [breaking-change]
- Loading branch information
Showing
5 changed files
with
274 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.