rust/src/librustc_metadata
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
..
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml Move validate_crate_name to rustc_metadata 2018-08-03 11:09:02 -06:00
creader.rs Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
cstore.rs Prefer Default::default over FxHash*::default in struct constructors 2018-10-19 14:34:44 +02:00
cstore_impl.rs Only promote calls to #[rustc_promotable] const fns 2018-10-03 10:07:05 +02:00
decoder.rs Only promote calls to #[rustc_promotable] const fns 2018-10-03 10:07:05 +02:00
diagnostics.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
dynamic_lib.rs rustc_metadata: test loading atoi instead of cos 2018-07-26 17:20:02 -07:00
encoder.rs Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
foreign_modules.rs ItemKind 2018-07-16 15:09:17 +02:00
index.rs Make opaque::Encoder append-only and make it infallible 2018-06-27 11:43:15 +02:00
index_builder.rs Replace uses of DepGraph.in_ignore with DepGraph.with_ignore 2018-01-09 18:35:50 +01:00
isolated_encoder.rs Remove HIR inlining 2018-04-19 20:33:18 -04:00
lib.rs Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
link_args.rs ItemKind 2018-07-16 15:09:17 +02:00
locator.rs Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasper 2018-10-20 11:22:48 +00:00
native_libs.rs Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
schema.rs Add an is_marker flag to TraitDef 2018-09-19 22:31:30 -07:00