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

Merge the std_unicode crate into the core crate #49698

Merged
merged 15 commits into from
Apr 12, 2018

Conversation

SimonSapin
Copy link
Contributor

The standard library facade has historically contained a number of crates with different roles, but that number has decreased over time. rand and libc have moved to crates.io, and collections was merged into alloc. Today we have core that applies everywhere, std that expects a full operating system, and alloc in-between that only requires a memory allocator (which can be provided by users)… and std_unicode, which doesn’t really have a reason to be separate anymore. It contains functionality based on Unicode data tables that can be large, but as long as relevant functions are not called the tables should be removed from binaries by linkers.

This deprecates the unstable std_unicode crate and moves all of its contents into core, replacing them with pub use reexports. The crate can be removed later. This also removes the CharExt trait (replaced with inherent methods in libcore) and UnicodeStr trait (merged into StrExt). There traits were both unstable and not intended to be used or named directly.

A number of new items are newly-available in libcore and instantly stable there, but only if they were already stable in libstd.

Fixes #49319.

@SimonSapin SimonSapin added A-Unicode Area: Unicode T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Apr 5, 2018
@SimonSapin
Copy link
Contributor Author

r? @alexcrichton

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Apr 5, 2018

Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Apr 5, 2018
@TimNN
Copy link
Contributor

TimNN commented Apr 5, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Receiving objects: 100% (163/163), 79.07 KiB | 15.81 MiB/s, done.
---
Resolving deltas: 100% (125/125), completed with 52 local objects.
---
[00:00:47] configure: rust.quiet-tests     := True
---
[00:04:32] tidy error: /checkout/src/libcore/unicode/mod.rs:11: mismatches to previous in: ["tracking issue"]
[00:04:32] tidy error: /checkout/src/libstd_unicode/lib.rs:23: mismatches to previous in: ["tracking issue"]
[00:04:33] some tidy checks failed
[00:04:33]
[00:04:33]
[00:04:33] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:33] expected success, got: exit code: 1
[00:04:33]
[00:04:33]
[00:04:33] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:33] Build completed unsuccessfully in 0:01:55
[00:04:33] Makefile:79: recipe for target 'tidy' failed
[00:04:33] make: *** [tidy] Error 1
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:131c7c48:start=1522950037728131176,finish=1522950037735954343,duration=7823167
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:1e0369a8
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@alexcrichton
Copy link
Member

Looks great to me, thanks @SimonSapin!

@SimonSapin SimonSapin force-pushed the unicode-for-everyone branch 2 times, most recently from 03146b4 to 82c1812 Compare April 5, 2018 18:28
@TimNN
Copy link
Contributor

TimNN commented Apr 5, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Receiving objects: 100% (163/163), 76.18 KiB | 25.39 MiB/s, done.
---
Resolving deltas: 100% (125/125), completed with 51 local objects.
---
[00:00:47] configure: rust.quiet-tests     := True
---
[00:38:51] ..........................................................................i.........................
[00:38:56] .................i..................................................................................
---
[00:39:30] .............................................................................................i......
[00:39:36] ...................................................................i................................
---
[00:40:27] .............................................i......................................................
---
[00:44:00] .............................i......................................................................
[00:44:14] ..............................................................i.....................................
[00:44:27] ...............................................i....................................................
[00:44:46] ....................................................................................................
[00:45:05] ....................................................................................................
[00:45:24] ....................................................................................................
[00:45:47] .i...............................................................................................i..
[00:46:17] ..............................................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds
[00:46:20] ......
[00:46:47] ....................................................................................................
[00:47:20] .............................................................ii.....................................
[00:48:05] ........................i....................................................i.ii...................
[00:48:06] test [run-pass] run-pass/saturating-float-casts.rs has been running for over 60 seconds
[00:48:42] .....................................................................................iiiiiii........
---
[00:50:50] ..................i............................................................ii.iii...............
[00:50:57] ....................................................................................................
[00:51:04] ........i..............................i............................................................
[00:51:11] ....................................................................................................
[00:51:18] ....................i...............................................................................
[00:51:25] ....................................................................................................
[00:51:34] ....................................................................................................
[00:51:44] ....................................................................................................
[00:51:54] ....................................................................................................
[00:52:06] ....................................................................................................
[00:52:14] .............i......................................................................................
[00:52:22] ................i..ii...............................................................................
[00:52:32] ....................................................................................................
[00:52:40] ....................................................................................................
[00:52:49] ...................................................................................i................
[00:52:58] .............................i....F.................................................................
---
[00:53:30] error: /checkout/src/test/compile-fail/single-primitive-inherent-impl.rs:19: unexpected error: '19:1: 19:13: duplicate lang item found: `char`. [E0152]'
[00:53:30]
[00:53:30] error: 1 unexpected errors found, 0 expected errors not found
[00:53:30] status: exit code: 101
[00:53:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/single-primitive-inherent-impl.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/single-primitive-inherent-impl.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/single-primitive-inherent-impl.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[00:53:30] unexpected errors (from JSON output): [
[00:53:30]     Error {
[00:53:30]         line_num: 19,
[00:53:30]         kind: Some(
[00:53:30]             Error
[00:53:30]         ),
[00:53:30]         msg: "19:1: 19:13: duplicate lang item found: `char`. [E0152]"
[00:53:30]     }
[00:53:30] ]
[00:53:30]
[00:53:30] thread '[compile-fail] compile-fail/single-primitive-inherent-impl.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1253:13
---
[00:53:30] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zmiri -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zmiri -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:53:30] expected success, got: exit code: 101
[00:53:30]
[00:53:30]
[00:53:30] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:53:30] Build completed unsuccessfully in 0:15:49
[00:53:30] Makefile:58: recipe for target 'check' failed
[00:53:30] make: *** [check] Error 1
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:04d74321:start=1522954729762720800,finish=1522954729771831215,duration=9110415
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:079a341e
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:079a341e:start=1522954729780192541,finish=1522954729789643715,duration=9451174
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:004234a1
$ dmesg | grep -i kill
[   10.801514] init: failsafe main process (1092) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@Ericson2314
Copy link
Contributor

Why are we doing this? Moving creates beneath the facade into creates.io and then using from std is a point towards the facade in my view.

@Ericson2314
Copy link
Contributor

More broadly, I've argued with I believe some sucesss in the portability working group that the facade is actually useful, but I'm worried that with PRs like this that viewpoint isn't making it back out. This PR is fine if the working presumption is the facade is bad, but only that is true.

@SimonSapin
Copy link
Contributor Author

The questions of whether the core v.s. alloc v.s. std distinction is useful, or whether some parts of the standard library should be re-exports of crates whose "upstream" maintenance is on crates.io, are both unrelated to this PR.

All this is saying is that the std_unicode crate specifically being separate from core is a historical remnant that doesn’t have a reason to be anymore (if it ever did), just like collections being separate from alloc.

@Ericson2314
Copy link
Contributor

Ericson2314 commented Apr 5, 2018

@SimonSapin I don't really believe core should be the dumping ground of every pure item used in std. I like separate crates to illustrate and enforce a separation of concerns. Granted that's a separate and fuzzier point from the real-world portability problems.

Other than extension traits being mildly ugly, what benefits does this PR bring? Alternatively could this create go on creates.io with those others instead? It's not clear to me why it would need unstable features. And having it up there does not force up to keep on using it in std if we don't like.

@clarfonthey
Copy link
Contributor

clarfonthey commented Apr 6, 2018

@Ericson2314 do you have a valid reason why libstd_unicode is separate? Keep in mind that the only extra cost is linking; because these are part of the standard library, they're already compiled, so, this doesn't really affect compile time. libcore quite frankly has no reason to not have Unicode support, considering how it already indirectly does through things like char::escape_debug. Plus, I mentioned in #49283 that the neglect of libstd_unicode has lead to some additional bugs, whereas it's quite simply easier to maintain in libcore and liballoc.

This isn't a manner of assuming that a system has less; it's a manner of simply assuming that the programmer wants Unicode support, which I feel isn't a very great assumption considering how LTO is enabled by default on release and that it takes very little effort to avoid including these unicode tables in an executable or library.

Also, I'd like to counter the "dumping ground" argument; the standard library is intended to hold things which are either a) hard to maintain without compiler support or b) so fundamental that it'll show up in most programs. split_whitespace alone covers the latter, but also there's really no good reason why we can't include Unicode stuff in libcore because Rust as a language has type-level Unicode support through str.

@TimNN
Copy link
Contributor

TimNN commented Apr 6, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (612879/612879), completed with 4872 local objects.
---
[00:00:47] configure: rust.quiet-tests     := True
---
[00:46:02] ..........................................................................i.........................
[00:46:08] .................i..................................................................................
---
[00:46:45] ..............................................................................................i.....
[00:46:52] ....................................................................i...............................
---
[00:47:51] .............................................i......................................................
---
[00:52:00] .............................i......................................................................
[00:52:15] ..............................................................i.....................................
[00:52:31] ...............................................i....................................................
[00:52:52] ....................................................................................................
[00:53:15] ....................................................................................................
[00:53:37] ....................................................................................................
[00:54:02] ..i...............................................................................................i.
[00:54:29] ............................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds
[00:54:41] ........................
[00:55:12] ....................................................................................................
[00:55:50] ..............................................................ii....................................
[00:56:34] .........................i....................................................itest [run-pass] run-pass/saturating-float-casts.rs has been running for over 60 seconds
[00:56:43] .ii..................
[00:57:27] ......................................................................................iiiiiii.......
---
[00:59:48] ..................i............................................................ii.iii...............
[00:59:56] ....................................................................................................
[01:00:04] ........i..............................i............................................................
[01:00:11] ....................................................................................................
[01:00:18] ....................i...............................................................................
[01:00:27] ....................................................................................................
[01:00:37] ....................................................................................................
[01:00:47] ....................................................................................................
[01:00:58] ....................................................................................................
[01:01:12] ....................................................................................................
[01:01:21] .............i......................................................................................
[01:01:31] .................i..ii..............................................................................
[01:01:41] ....................................................................................................
[01:01:51] ....................................................................................................
[01:02:00] ....................................................................................i...............
[01:02:10] ..............................i.....................................................................
---
[01:02:47] ...........................i........................................................................
[01:02:48] ....................................................................i...............................
[01:02:49] ................i.......................................................
---
[01:03:05] ...........i........................
---
[01:03:36] i...i..ii....i.............ii........iii......i..i...i...ii..i..i..ii.....
---
[01:03:40] i.......i......................i......
---
[01:04:20] iiii.......i..i........i..i.i.............i..........iiii...........i...i..........ii.i.i.......ii..
[01:04:21] ....ii...
---
[01:14:51] .....i..............................................................................................
---
[01:15:29] error[E0432]: unresolved import `core::unicode::Utf16Encoder`
[01:15:29]     --> liballoc/../liballoc/tests/str.rs:1207:9
[01:15:29]      |
[01:15:29] 1207 |     use core::unicode::Utf16Encoder;
[01:15:29]      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Utf16Encoder` in `unicode`
[01:15:29]
[01:15:37] error: aborting due to previous error
[01:15:37]
[01:15:37] For more information about this error, try `rustc --explain E0432`.
[01:15:37] error: Could not compile `alloc`.
[01:15:37] warning: build failed, waiting for other jobs to finish...
[01:15:41] error: build failed
[01:15:41]
[01:15:41]
[01:15:41] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "alloc" "--" "--quiet"
[01:15:41] expected success, got: exit code: 101
[01:15:41]
[01:15:41]
[01:15:41] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:15:41] Build completed unsuccessfully in 0:30:59
[01:15:41] Makefile:58: recipe for target 'check' failed
[01:15:41] make: *** [check] Error 1
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:24affb42:start=1523007978622260781,finish=1523007978633961231,duration=11700450
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:2bb17ab8
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:2bb17ab8:start=1523007978640678959,finish=1523007978648226056,duration=7547097
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0df599fc
$ dmesg | grep -i kill
[   11.138699] init: failsafe main process (1093) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@Ericson2314
Copy link
Contributor

Ericson2314 commented Apr 6, 2018

@clarcharr I think big creates are harder to maintain, especially for people that have never worked on them before. I also think out of tree creates are easier to maintain because people can build them like any other crate.

Keep in mind that the only extra cost is linking...

I agree that a bigger core is not a problem compile time wise or whatever, just as you both.

it's a manner of simply assuming that the programmer wants Unicode support

I also agree the not-wanting unicode case is not worth considering. But I don't think it's good code organization to put everything that's "free and always wanted" in core.

Plus, I mentioned in #49283 that the neglect of libstd_unicode has lead to some additional bugs, whereas it's quite simply easier to maintain in libcore and liballoc.

I absolutely agree that's sort of probablem we should care about with this, unlike the others which we agree are non-pronkems. But I think moving to rust-lang-nursery and creates.io is the best solution.

The standard library is intended to hold things which are...b) so fundamental that it'll show up in most programs.

I'm fine with that and agree that this fits, as does libc. The difference is I view "being in the standard library" and "being in rust-lang/rust" as two different things. I want to limit library code in rust-lang/rust to your a), code that is tightly integrated with rustc. Anything that's stable Rust however can evolve better separately out of tree.

I'd love somebody, maybe me, to do an analysis on rand/libc development before and after moving out of tree. We can judge my argument empirically.

@clarfonthey
Copy link
Contributor

@Ericson2314 Most of these are inherent methods on char and str so I don't really see how they can be moved to other crates without being a lot uglier and requiring importing extension traits.

Like I get the sentiment but I think what you're addressing is much larger than this PR.

@Ericson2314
Copy link
Contributor

I did a very bad job at explaining the connection with the portability stuff on IRC to @SimonSapin. Yes, this PR doesn't matter directly because this library is already quite portable. But it does generally bare on the weirdness of std relying on crates.io crates. I love that we already do that with libc, but I wouldn't be surprised if others find that weird / a one-off exception. But with the portability group's goals, that will become more common: all obscure platforms and even Windows (use @retep998's crates vs one-off bindings).

No one here actually said std deps on crates.io was weird, but at least @clarcharr's comment sort of presumed a hard "standard library" vs "rest of ecosystem" distinction, which std deps on crates.io blurs. I want to advocate for that blurring being a good thing, and point out that for portability's sake it may happen anyways (with other crates).

@SimonSapin
Copy link
Contributor Author

out of tree creates are easier to maintain because people can build them like any other crate.

That ship has sailed. The relevant functionality is stable and reexported in libstd, some of it since Rust 1.0.

@Ericson2314
Copy link
Contributor

Huh? Std already depends on out of tree crates as I've said repeatedly. I don't understand your point.

@SimonSapin
Copy link
Contributor Author

My point is that we can’t just remove the std_unicode functionality.

And this PR is all about how we expose functionality in the public API (e.g. do #![no_std] users need extern crate std_unicode; do get it), I don’t care as much about how source code is organized internally. That said I don’t understand how having std depending on out of tree crate is useful to users: if they also have a dependency on the crates.io version they end up with two different crates as far as rustc and Cargo are concerned.

@withoutboats
Copy link
Contributor

@Ericson2314 it seems to me like you want to have a larger conversation about how we handle the organization of libstd (moving things out of tree etc). That's fine, but it seems off topic from this PR, which is about the smaller and largely unrelated question of making the unicode APIs easily available from libcore.

@SimonSapin
Copy link
Contributor Author

Still the same Cargo.lock merge conflict.

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 11, 2018

📌 Commit ef41788 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 12, 2018

⌛ Testing commit ef41788 with merge d26f9e4...

bors added a commit that referenced this pull request Apr 12, 2018
Merge the std_unicode crate into the core crate

[The standard library facade](#27783) has historically contained a number of crates with different roles, but that number has decreased over time. `rand` and `libc` have moved to crates.io, and [`collections` was merged into `alloc`](#42648). Today we have `core` that applies everywhere, `std` that expects a full operating system, and `alloc` in-between that only requires a memory allocator (which can be provided by users)… and `std_unicode`, which doesn’t really have a reason to be separate anymore. It contains functionality based on Unicode data tables that can be large, but as long as relevant functions are not called the tables should be removed from binaries by linkers.

This deprecates the unstable `std_unicode` crate and moves all of its contents into `core`, replacing them with `pub use` reexports. The crate can be removed later. This also removes the `CharExt` trait (replaced with inherent methods in libcore) and `UnicodeStr` trait (merged into `StrExt`). There traits were both unstable and not intended to be used or named directly.

A number of new items are newly-available in libcore and instantly stable there, but only if they were already stable in libstd.

Fixes #49319.
@bors
Copy link
Contributor

bors commented Apr 12, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing d26f9e4 to master...

@bors bors merged commit ef41788 into rust-lang:master Apr 12, 2018
@kennytm-githubbot
Copy link

📣 Toolstate changed by #49698!

Tested on commit d26f9e4.
Direct link to PR: #49698

💔 rls on windows: test-pass → build-fail (cc @nrc).
💔 rls on linux: test-pass → build-fail (cc @nrc).
💔 rustfmt on windows: test-pass → build-fail (cc @nrc).
💔 rustfmt on linux: test-pass → build-fail (cc @nrc).

kennytm-githubbot added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Apr 12, 2018
Tested on commit rust-lang/rust@d26f9e4.
Direct link to PR: <rust-lang/rust#49698>

💔 rls on windows: test-pass → build-fail (cc @nrc).
💔 rls on linux: test-pass → build-fail (cc @nrc).
💔 rustfmt on windows: test-pass → build-fail (cc @nrc).
💔 rustfmt on linux: test-pass → build-fail (cc @nrc).
@SimonSapin SimonSapin deleted the unicode-for-everyone branch April 12, 2018 05:42
@killercup killercup mentioned this pull request May 2, 2018
11 tasks
jridgewell added a commit to jridgewell/rust that referenced this pull request May 23, 2019
Char.len_utf8 is stable since rust-lang#49698, making this a little easier to follow.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 2, 2024
library: fix some stability annotations

This PR updates some stability attributes to correctly reflect when some items actually got stabilized. Found while testing rust-lang#132481.

### `core::char` / `std::char`

In rust-lang#26192, the `core::char` module got "stabilized" for 1.2.0, but the `core` crate itself was still unstable until 1.6.0.

In rust-lang#49698, the `std::char` module was changed to a re-export of `core::char`, making `std::char` appear as "stable since 1.2.0", even though it was already stable in 1.0.0.

By marking `core::char` as stable since 1.0.0, the docs will show correct versions for both `core::char` (since 1.6.0) and `std::char` (since 1.0.0). This is also consistent with the stabilities of similar re-exported modules like `core::mem`/`std::mem` for example.

### `{core,std}::array` and `{core,std}::array::TryFromSliceError`

In rust-lang#58302, the `core::array::TryFromSliceError` type got stabilized for 1.34.0, together with `TryFrom`. At that point the `core::array` module was still unstable and a `std::array` re-export didn't exist, but `core::array::TryFromSliceError` could still be named due to rust-lang#95956 to existing yet.

Then, `core::array` got stabilized and `std::array` got added, first targeting 1.36.0 in rust-lang#60657, but then getting backported for 1.35.0 in rust-lang#60838.

This means that `core::array` and `std::array` actually got stabilized in 1.35.0 and `core::array::TryFromSliceError` was accessible through the unstable module in 1.34.0 -- mark them as such so that the docs display the correct versions.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 2, 2024
Rollup merge of rust-lang#132482 - lukas-code:stab-attrs, r=Noratrieb

library: fix some stability annotations

This PR updates some stability attributes to correctly reflect when some items actually got stabilized. Found while testing rust-lang#132481.

### `core::char` / `std::char`

In rust-lang#26192, the `core::char` module got "stabilized" for 1.2.0, but the `core` crate itself was still unstable until 1.6.0.

In rust-lang#49698, the `std::char` module was changed to a re-export of `core::char`, making `std::char` appear as "stable since 1.2.0", even though it was already stable in 1.0.0.

By marking `core::char` as stable since 1.0.0, the docs will show correct versions for both `core::char` (since 1.6.0) and `std::char` (since 1.0.0). This is also consistent with the stabilities of similar re-exported modules like `core::mem`/`std::mem` for example.

### `{core,std}::array` and `{core,std}::array::TryFromSliceError`

In rust-lang#58302, the `core::array::TryFromSliceError` type got stabilized for 1.34.0, together with `TryFrom`. At that point the `core::array` module was still unstable and a `std::array` re-export didn't exist, but `core::array::TryFromSliceError` could still be named due to rust-lang#95956 to existing yet.

Then, `core::array` got stabilized and `std::array` got added, first targeting 1.36.0 in rust-lang#60657, but then getting backported for 1.35.0 in rust-lang#60838.

This means that `core::array` and `std::array` actually got stabilized in 1.35.0 and `core::array::TryFromSliceError` was accessible through the unstable module in 1.34.0 -- mark them as such so that the docs display the correct versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Unicode Area: Unicode final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.