rust/library/std/src
Matthias Krüger 52016a1005
Rollup merge of #94890 - marmeladema:ip-addr-try-from-bytes, r=joshtriplett
Support parsing IP addresses from a byte string

Fixes #94821

The goal is to be able to parse addresses from a byte string without requiring to do any utf8 validation. Since internally the parser already works on byte strings, this should be possible and I personally already needed this in the past too.

~~I used the proposed approach from the issue by implementing `TryFrom<&'a [u8]>` for all 6 address types (3 ip address types and 3 socket address types). I believe implementing stable traits for stable types is insta-stable so this will probably need an FCP?~~

Switched to an unstable inherent method approach called `parse_ascii` as requested.

cc ``````@jyn514``````
2022-08-29 06:34:41 +02:00
..
backtrace Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
collections Move error trait into core 2022-08-22 13:28:25 -07:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error remove fn backtrace 2022-08-01 20:10:40 +00:00
f32 Semicolon after macro_rules definition. 2022-08-15 12:33:00 +02:00
f64 Semicolon after macro_rules definition. 2022-08-15 12:33:00 +02:00
ffi Guarantee try_reserve preserves the contents on error 2022-08-10 01:51:38 +09:00
fs Ignore hiberfil_sys test in CI 2022-07-18 15:06:07 +01:00
io Rollup merge of #100520 - jakubdabek:patch-1, r=thomcc 2022-08-28 09:35:15 +02:00
net Rollup merge of #94890 - marmeladema:ip-addr-try-from-bytes, r=joshtriplett 2022-08-29 06:34:41 +02:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Auto merge of #96324 - berendjan:set_tcp_quickack, r=dtolnay 2022-08-28 12:26:37 +00:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path make many std tests work in Miri 2022-08-18 18:07:39 -04:00
personality Move personality functions to std 2022-08-23 16:12:58 +08:00
prelude Finish bumping stage0 2022-05-27 07:36:17 -04:00
process Add test for issue #95178 2022-03-23 05:33:44 +00:00
sync make many std tests work in Miri 2022-08-18 18:07:39 -04:00
sys Auto merge of #96324 - berendjan:set_tcp_quickack, r=dtolnay 2022-08-28 12:26:37 +00:00
sys_common Auto merge of #100201 - RalfJung:thread-local-key, r=thomcc 2022-08-28 15:12:31 +00:00
thread update and extend some comments, and cfg-out some unused code 2022-08-22 09:14:33 -04:00
time make many std tests work in Miri 2022-08-18 18:07:39 -04:00
alloc.rs Update std::alloc::System docs 2022-06-26 16:31:29 +02:00
ascii.rs Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
backtrace.rs Adjust backtrace stabilization version to CURRENT_RUSTC_VERSION 2022-08-27 17:08:53 +02:00
env.rs add aliases for current_dir 2022-05-24 19:41:40 -07:00
error.rs error::Error: remove some comments 2022-08-25 07:42:07 +01:00
f32.rs Improve primitive/std docs separation and headers 2022-08-20 16:50:29 -05:00
f64.rs Improve primitive/std docs separation and headers 2022-08-20 16:50:29 -05:00
fs.rs Address reviewer comments 2022-08-18 10:34:40 +01:00
keyword_docs.rs Rollup merge of #98169 - pierwill:dyn-disp, r=JohnTitor 2022-06-17 07:16:58 +09:00
lazy.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
lib.rs Auto merge of #100578 - Urgau:float-next-up-down, r=scottmcm 2022-08-28 22:31:19 +00:00
macros.rs Rollup merge of #99742 - sigaloid:master, r=thomcc 2022-08-26 14:08:44 +02:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Support unstable moves via stable in unstable items 2022-07-08 21:18:13 +00:00
panicking.rs Auto merge of #92461 - rust-lang:const_tls_local_panic_count, r=Mark-Simulacrum 2022-05-23 13:04:59 +00:00
path.rs Rollup merge of #97912 - Kixunil:stabilize_path_try_exists, r=dtolnay 2022-06-20 07:37:41 +09:00
personality.rs Move personality functions to std 2022-08-23 16:12:58 +08:00
primitive_docs.rs Improve primitive/std docs separation and headers 2022-08-20 16:50:29 -05:00
process.rs Make doc for stdin field of process consistent 2022-08-21 01:56:26 -07:00
rt.rs Change Termination::report return type to ExitCode 2022-01-28 12:53:36 -08:00
time.rs Support setting file accessed/modified timestamps 2022-07-15 02:54:06 -07:00