rust/src/libsyntax
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
..
attr Stabilize min_const_fn 2018-10-05 10:36:14 +02:00
diagnostics Remove OneVector 2018-09-26 10:43:37 +02:00
ext Add missing lifetime fragment specifier to error message. 2018-10-12 17:51:48 -07:00
parse Prefer unwrap_or_else to unwrap_or in case of function calls/allocations 2018-10-19 09:45:45 +02:00
print Prefer unwrap_or_else to unwrap_or in case of function calls/allocations 2018-10-19 09:45:45 +02:00
util Remove OneVector 2018-09-26 10:43:37 +02:00
ast.rs Auto merge of #52319 - tinco:issue_12590, r=pnkfelix 2018-09-27 09:51:12 +00:00
build.rs
Cargo.toml
config.rs cfg_attr_multi: Feature gate 2018-10-07 02:08:24 -07:00
diagnostic_list.rs Update error id to an unused one 2018-10-03 10:07:05 +02:00
early_buffered_lints.rs
entry.rs
feature_gate.rs Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
fold.rs Auto merge of #52319 - tinco:issue_12590, r=pnkfelix 2018-09-27 09:51:12 +00:00
json.rs
lib.rs Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
ptr.rs
README.md
show_span.rs
source_map.rs Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasper 2018-10-20 11:22:48 +00:00
std_inject.rs
str.rs
test_snippet.rs
test.rs Auto merge of #52319 - tinco:issue_12590, r=pnkfelix 2018-09-27 09:51:12 +00:00
tokenstream.rs Prefer unwrap_or_else to unwrap_or in case of function calls/allocations 2018-10-19 09:45:45 +02:00
visit.rs

The syntax crate contains those things concerned purely with syntax that is, the AST ("abstract syntax tree"), parser, pretty-printer, lexer, macro expander, and utilities for traversing ASTs.

For more information about how these things work in rustc, see the rustc guide: