rust icon indicating copy to clipboard operation
rust copied to clipboard

(#102929) Implement `String:leak`

Open finnbear opened this issue 1 year ago • 3 comments

Implementation of String::leak (#102929)

ACP: https://github.com/rust-lang/libs-team/issues/109

finnbear avatar Oct 12 '22 01:10 finnbear

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.

Please see the contribution instructions for more information.

rust-highfive avatar Oct 12 '22 01:10 rust-highfive

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

rustbot avatar Oct 12 '22 01:10 rustbot

@rustbot label +T-libs-api -T-libs

finnbear avatar Oct 12 '22 01:10 finnbear

@rustbot label +S-waiting-on-review -S-waiting-on-author

finnbear avatar Oct 18 '22 17:10 finnbear

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Finished release [optimized] target(s) in 10.26s
Check compiletest suite=run-make-fulldeps mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 233 tests
............i.....ii..F................................................................. 88/233
Some tests failed in compiletest suite=run-make-fulldeps mode=run-make host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
...................................i...ii................
failures:


---- [run-make] src/test/run-make-fulldeps/alloc-no-oom-handling stdout ----

error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/alloc-no-oom-handling/alloc-no-oom-handling:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/alloc-no-oom-handling/alloc-no-oom-handling -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/alloc-no-oom-handling/alloc-no-oom-handling  --edition=2021 -Dwarnings --crate-type=rlib ../../../../library/alloc/src/lib.rs --cfg no_global_oom_handling
--- stderr -------------------------------
error[E0425]: cannot find function `from_utf8_unchecked_mut` in this scope
    --> ../../../../library/alloc/src/string.rs:1879:18
     |
     |
1879 |         unsafe { from_utf8_unchecked_mut(slice) }
     |
help: consider importing one of these items
     |
47   | use core::str::from_utf8_unchecked_mut;

rust-log-analyzer avatar Oct 19 '22 16:10 rust-log-analyzer

https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy you can squash commits.

klensy avatar Oct 19 '22 18:10 klensy

In an attempt to undo the merge commit, I messed up git beyond my ability to repair it, so this PR is superseded by #103280

finnbear avatar Oct 20 '22 02:10 finnbear

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/alloc-no-oom-handling/alloc-no-oom-handling:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/alloc-no-oom-handling/alloc-no-oom-handling -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/alloc-no-oom-handling/alloc-no-oom-handling  --edition=2021 -Dwarnings --crate-type=rlib ../../../../library/alloc/src/lib.rs --cfg no_global_oom_handling
--- stderr -------------------------------
error[E0425]: cannot find function `from_utf8_unchecked_mut` in this scope
    --> ../../../../library/alloc/src/string.rs:1879:18
     |
     |
1879 |         unsafe { from_utf8_unchecked_mut(slice) }
     |
help: consider importing one of these items
     |
47   | use core::str::from_utf8_unchecked_mut;

rust-log-analyzer avatar Oct 20 '22 03:10 rust-log-analyzer