rust/library
Dylan DPC 5df3b98321
Rollup merge of #99579 - CleanCut:expect-warning, r=joshtriplett
Add same warning to Result::expect as Result::unwrap

I was reading a recent blog post by Jimmy Hartzell and [he noted](https://www.thecodedmessage.com/posts/2022-07-14-programming-unwrap/#context):

> I will however note that the documentation of `unwrap` comes with [a warning not to use it](https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap). The warning is framed in terms of the fact that `unwrap` may panic, but the [documentation of `expect`](https://doc.rust-lang.org/std/result/enum.Result.html#method.expect), where this is equally true, does not come with such a warning.

It _is_ equally true. Let's add the same warning to `expect`. This PR is a copy-and-paste of the warning text from the docstring for `unwrap`.
2022-07-22 11:53:43 +05:30
..
alloc Rollup merge of #99413 - steffahn:btree_dropck, r=m-ou-se 2022-07-21 18:42:02 +02:00
backtrace@4e5a3f7292 update libbacktrace 2022-05-20 09:30:26 +02:00
core Rollup merge of #99579 - CleanCut:expect-warning, r=joshtriplett 2022-07-22 11:53:43 +05:30
panic_abort Fully stabilize NLL 2022-06-03 17:16:41 -04:00
panic_unwind Library changes for Apple WatchOS 2022-07-20 08:57:36 +01:00
portable-simd Finish bumping stage0 2022-05-27 07:36:17 -04:00
proc_macro Rollup merge of #99516 - m-ou-se:proc-macro-tracked-tracking-issue, r=Mark-Simulacrum 2022-07-20 18:58:22 +02:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Rollup merge of #99523 - cuviper:asfd_ptrs-1.64, r=jyn514 2022-07-21 18:42:05 +02:00
stdarch@28335054b1 Also allow unused macro rules in stdarch 2022-05-10 19:53:22 +02:00
test Fix binary name in help message for test binaries 2022-07-09 18:52:37 -04:00
unwind Rollup merge of #98101 - vladimir-ea:stdlib_watch_os, r=thomcc 2022-07-20 16:17:17 +05:30