Commit Graph

17 Commits

Author SHA1 Message Date
Mark Rousskov
40290505fb cfg-step code 2022-11-06 17:21:21 -05:00
Maybe Waffle
7434b9f0d1 fixup lint name 2022-10-09 13:07:21 +00:00
Maybe Waffle
75ae20a42f allow for_loop_over_fallibles in a core test 2022-10-09 13:07:20 +00:00
est31
cdb8e64bc7 Use Box::new() instead of box syntax in core tests 2022-05-29 01:44:11 +02:00
Deadbeef
6b5f63c3fc
Constify (most) Option methods 2021-12-17 20:46:47 +08:00
woppopo
7936ecff48 Make more From impls const 2021-10-18 19:19:28 +09:00
woppopo
00dba3a693 Make Option::as_mut const 2021-10-17 00:02:42 +09:00
Lamb
10ddabc194
const fn for option copied, take & replace + tests
fix: move test that require mut to another

Adding TODOs for Option::take and Option::copied

TODO to FIXME + moving const stability under normal

Moving const stability attr under normal stab attr

move more rustc stability attributes
2021-08-29 13:19:17 +02:00
Chase Wilson
eea3520a8f
Added some basic tests for Option::unzip() and Option::zip() (I noticed that zip had no tests) 2021-08-09 10:24:00 -05:00
Scott McMurray
266a72637a Simple library test updates 2021-05-06 11:37:45 -07:00
Miguel Ojeda
679f6f3473 Add unwrap_unchecked() methods for Option and Result
In particular:
  - `unwrap_unchecked()` for `Option`.
  - `unwrap_unchecked()` and `unwrap_err_unchecked()` for `Result`.

These complement other `*_unchecked()` methods in `core` etc.

Currently there are a couple of places it may be used inside rustc
(`LinkedList`, `BTree`). It is also easy to find other repositories
with similar functionality.

Fixes #48278.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-01-10 15:14:38 +01:00
Christiaan Dirkx
be554c4101 Make ui test that are run-pass and do not test the compiler itself library tests 2020-11-30 02:47:32 +01:00
Alexis Bourget
a61b9638bb review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
Alexis Bourget
f69c5aa428 Move more tests using Cell to unit tests 2020-09-21 21:50:19 +02:00
Christiaan Dirkx
4f859fbcfc Move const tests for Option to library\core
Part of #76268
2020-09-20 22:42:14 +02:00
Lukas Kalbertodt
d7afe2a223
Fix tests using FixedSizeArray methods (which are now shadowed) 2020-08-30 21:08:18 +02:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00