This website requires JavaScript.
Explore
Help
Register
Sign In
rust-lang
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Actions
1
Packages
Projects
Releases
Wiki
Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust
/
tests
/
ui
/
issues
/
issue-5062.rs
3 lines
84 B
Rust
Raw
Normal View
History
Unescape
Escape
core: split into fmt::Show and fmt::String fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2014-12-20 00:09:35 -08:00
fn
main
(
)
{
format!
(
"
{:?}
"
,
None
)
;
}
Add a new ui test and update existing ones
2017-02-02 21:35:31 +00:00
//~^ ERROR type annotations needed [E0282]
Reference in New Issue
Copy Permalink