rust/src/librustc_errors
bors ca2639e82e Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasper
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations

The contents of `unwrap_or` are evaluated eagerly, so it's not a good pick in case of function calls and allocations. This PR also changes a few `unwrap_or`s with `unwrap_or_default`.

An added bonus is that in some cases this change also reveals if the object it's called on is an `Option` or a `Result` (based on whether the closure takes an argument).
2018-10-20 11:22:48 +00:00
..
Cargo.toml Log when buffering a diagnostic. 2018-09-18 13:45:24 +02:00
diagnostic.rs A handful of random string-related improvements 2018-10-10 10:39:18 +02:00
diagnostic_builder.rs Prefer unwrap_or_else to unwrap_or in case of function calls/allocations 2018-10-19 09:45:45 +02:00
emitter.rs Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. 2018-08-28 17:04:04 +03:00
lib.rs Free some memory instead of just dropping elements 2018-10-19 14:34:44 +02:00
lock.rs Fix compiling some rustc crates to wasm 2018-09-07 08:17:02 -07:00
registry.rs Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. 2018-08-28 17:04:04 +03:00
snippet.rs Remove highlighting from secondary messages 2018-06-11 15:52:10 -07:00
styled_buffer.rs Highlight code on diagnostics when underlined 2018-01-28 17:15:15 -08:00