about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorJimmy Cuadra <jimmy@jimmycuadra.com>2017-03-05 13:00:32 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-03-15 07:51:54 -0700
commit2561dcddf9e61f5c52a65f1a42641e01bfabe3e2 (patch)
tree4ba073a756791be53de805080a0ce23a95257cf4 /src/test/run-pass/thinlto
parent6f10e2f63de720468e2b4bfcb275e4b90b1f9870 (diff)
downloadrust-2561dcddf9e61f5c52a65f1a42641e01bfabe3e2.tar.gz
rust-2561dcddf9e61f5c52a65f1a42641e01bfabe3e2.zip
Rename TryFrom's associated type and implement str::parse using TryFrom.
Per discussion on the tracking issue, naming `TryFrom`'s associated type
`Error` is generally more consistent with similar traits in the Rust
ecosystem, and what people seem to assume it should be called. It
also helps disambiguate from `Result::Err`, the most common "Err".

See
https://github.com/rust-lang/rust/issues/33417#issuecomment-269108968.

TryFrom<&str> and FromStr are equivalent, so have the latter provide the
former to ensure that. Using TryFrom in the implementation of
`str::parse` means types that implement either trait can use it.
When we're ready to stabilize `TryFrom`, we should update `FromStr` to
suggest implementing `TryFrom<&str>` instead for new code.

See
https://github.com/rust-lang/rust/issues/33417#issuecomment-277175994
and
https://github.com/rust-lang/rust/issues/33417#issuecomment-277253827.

Refs #33417.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions