Skip to content
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: Second pass stabilization for string #20306

Merged
merged 1 commit into from
Dec 30, 2014

Conversation

alexcrichton
Copy link
Member

This commit performs a second pass over the std::string module, performing the
following actions:

  • The name std::string is now stable.
  • The String::from_utf8 function is now stable after having been altered to
    return a new FromUtf8Error structure. The FromUtf8Error structure is now
    stable as well as its into_bytes and utf8_error methods.
  • The String::from_utf8_lossy function is now stable.
  • The String::from_chars method is now deprecated in favor of .collect()
  • The String::from_raw_parts method is now stable
  • The String::from_str function remains experimental
  • The String::from_raw_buf function remains experimental
  • The String::from_raw_buf_len function remains experimental
  • The String::from_utf8_unchecked function is now stable
  • The String::from_char function is now deprecated in favor of
    repeat(c).take(n).collect()
  • The String::grow function is now deprecated in favor of
    .extend(repeat(c).take(n)
  • The String::capacity method is now stable
  • The String::reserve method is now stable
  • The String::reserve_exact method is now stable
  • The String::shrink_to_fit method is now stable
  • The String::pop method is now stable
  • The String::as_mut_vec method is now stable
  • The String::is_empty method is now stable
  • The IntoString trait is now deprecated (there are no implementors)
  • The String::truncate method is now stable
  • The String::insert method is now stable
  • The String::remove method is now stable
  • The String::push method is now stable
  • The String::push_str method is now stable
  • The String::from_utf16 function is now stable after its error type has now
    become an opaque structure to carry more semantic information in the future.

A number of these changes are breaking changes, but the migrations should be
fairly straightforward on a case-by-case basis (outlined above where possible).

[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @aturon

This commit performs a second pass over the `std::string` module, performing the
following actions:

* The name `std::string` is now stable.
* The `String::from_utf8` function is now stable after having been altered to
  return a new `FromUtf8Error` structure. The `FromUtf8Error` structure is now
  stable as well as its `into_bytes` and `utf8_error` methods.
* The `String::from_utf8_lossy` function is now stable.
* The `String::from_chars` method is now deprecated in favor of `.collect()`
* The `String::from_raw_parts` method is now stable
* The `String::from_str` function remains experimental
* The `String::from_raw_buf` function remains experimental
* The `String::from_raw_buf_len` function remains experimental
* The `String::from_utf8_unchecked` function is now stable
* The `String::from_char` function is now deprecated in favor of
  `repeat(c).take(n).collect()`
* The `String::grow` function is now deprecated in favor of
  `.extend(repeat(c).take(n)`
* The `String::capacity` method is now stable
* The `String::reserve` method is now stable
* The `String::reserve_exact` method is now stable
* The `String::shrink_to_fit` method is now stable
* The `String::pop` method is now stable
* The `String::as_mut_vec` method is now stable
* The `String::is_empty` method is now stable
* The `IntoString` trait is now deprecated (there are no implementors)
* The `String::truncate` method is now stable
* The `String::insert` method is now stable
* The `String::remove` method is now stable
* The `String::push` method is now stable
* The `String::push_str` method is now stable
* The `String::from_utf16` function is now stable after its error type has now
  become an opaque structure to carry more semantic information in the future.

A number of these changes are breaking changes, but the migrations should be
fairly straightforward on a case-by-case basis (outlined above where possible).

[breaking-change]
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 30, 2014
This commit performs a second pass over the `std::string` module, performing the
following actions:

* The name `std::string` is now stable.
* The `String::from_utf8` function is now stable after having been altered to
  return a new `FromUtf8Error` structure. The `FromUtf8Error` structure is now
  stable as well as its `into_bytes` and `utf8_error` methods.
* The `String::from_utf8_lossy` function is now stable.
* The `String::from_chars` method is now deprecated in favor of `.collect()`
* The `String::from_raw_parts` method is now stable
* The `String::from_str` function remains experimental
* The `String::from_raw_buf` function remains experimental
* The `String::from_raw_buf_len` function remains experimental
* The `String::from_utf8_unchecked` function is now stable
* The `String::from_char` function is now deprecated in favor of
  `repeat(c).take(n).collect()`
* The `String::grow` function is now deprecated in favor of
  `.extend(repeat(c).take(n)`
* The `String::capacity` method is now stable
* The `String::reserve` method is now stable
* The `String::reserve_exact` method is now stable
* The `String::shrink_to_fit` method is now stable
* The `String::pop` method is now stable
* The `String::as_mut_vec` method is now stable
* The `String::is_empty` method is now stable
* The `IntoString` trait is now deprecated (there are no implementors)
* The `String::truncate` method is now stable
* The `String::insert` method is now stable
* The `String::remove` method is now stable
* The `String::push` method is now stable
* The `String::push_str` method is now stable
* The `String::from_utf16` function is now stable after its error type has now
  become an opaque structure to carry more semantic information in the future.

A number of these changes are breaking changes, but the migrations should be
fairly straightforward on a case-by-case basis (outlined above where possible).

[breaking-change]
@bors bors merged commit b26daf3 into rust-lang:master Dec 30, 2014
@alexcrichton alexcrichton deleted the second-pass-string branch January 7, 2015 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants