rust/library
bors 8cb207ae69 Auto merge of #86386 - inquisitivecrystal:better-errors-for-display-traits-v3, r=estebank
Better errors for Debug and Display traits

Currently, if someone tries to pass value that does not implement `Debug` or `Display` to a formatting macro, they get a very verbose and confusing error message. This PR changes the error messages for missing `Debug` and `Display` impls to be less overwhelming in this case, as suggested by #85844. I was a little less aggressive in changing the error message than that issue proposed. Still, this implementation would be enough to reduce the number of messages to be much more manageable.

After this PR, information on the cause of an error involving a `Debug` or `Display` implementation would suppressed if the requirement originated within a standard library macro. My reasoning was that errors originating from within a macro are confusing when they mention details that the programmer can't see, and this is particularly problematic for `Debug` and `Display`, which are most often used via macros. It is possible that either a broader or a narrower criterion would be better. I'm quite open to any feedback.

Fixes #85844.
2021-06-23 03:16:04 +00:00
..
alloc Add comments around code where ordering is important due for panic-safety 2021-06-22 19:06:55 +02:00
backtrace@221483ebaf
core Auto merge of #86386 - inquisitivecrystal:better-errors-for-display-traits-v3, r=estebank 2021-06-23 03:16:04 +00:00
panic_abort rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
panic_unwind rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
proc_macro Improve documentation 2021-06-20 22:19:47 +02:00
profiler_builtins Update cc 2021-05-24 23:34:12 +01:00
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #84910 - eopb:stabilize_int_error_matching, r=yaahc 2021-06-22 09:30:15 +00:00
stdarch@3001c75a1d Update stdarch submodule to stabilize simd_x86_bittest feature 2021-06-13 02:29:17 +09:00
term rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
test Use as_secs_f64 in JunitFormatter 2021-06-17 03:23:17 +08:00
unwind Support Android ndk versions r23-beta3 and up 2021-06-01 21:37:50 +02:00