rust/src/librustc/middle
bors 3af60f831f Auto merge of #31954 - japaric:rfc243, r=nikomatsakis
implement the `?` operator

The `?` postfix operator is sugar equivalent to the try! macro, but is more amenable to chaining:
`File::open("foo")?.metadata()?.is_dir()`.

`?` is accepted on any *expression* that can return a `Result`, e.g. `x()?`, `y!()?`, `{z}?`,
`(w)?`, etc. And binds more tightly than unary operators, e.g. `!x?` is parsed as `!(x?)`.

cc #31436

---

cc @aturon @eddyb
2016-03-08 01:31:04 -08:00
..
cfg Auto merge of #30884 - durka:inclusive-ranges, r=aturon 2016-03-06 07:16:41 +00:00
infer Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
traits Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
ty Auto merge of #31606 - Ms2ger:ClosureKind, r=eddyb 2016-03-07 22:57:38 -08:00
astconv_util.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
check_match.rs Auto merge of #31954 - japaric:rfc243, r=nikomatsakis 2016-03-08 01:31:04 -08:00
const_eval.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
const_qualif.rs
cstore.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
dataflow.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
dead.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
def_id.rs
def.rs Remove LastPrivate 2016-02-26 00:37:27 +00:00
dependency_format.rs
effect.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
entry.rs
expr_use_visitor.rs Auto merge of #30884 - durka:inclusive-ranges, r=aturon 2016-03-06 07:16:41 +00:00
free_region.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
intrinsicck.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
lang_items.rs Auto merge of #31606 - Ms2ger:ClosureKind, r=eddyb 2016-03-07 22:57:38 -08:00
liveness.rs Auto merge of #32048 - bluss:overloaded-assign-op, r=eddyb 2016-03-06 15:10:44 +00:00
mem_categorization.rs Auto merge of #31606 - Ms2ger:ClosureKind, r=eddyb 2016-03-07 22:57:38 -08:00
pat_util.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
privacy.rs Remove LastPrivate 2016-02-26 00:37:27 +00:00
reachable.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
recursion_limit.rs
region.rs Split PatKind::Enum into PatKind::TupleStruct and PatKind::Path 2016-02-16 00:40:38 +03:00
resolve_lifetime.rs Autoderef in librustc 2016-02-12 19:28:42 +01:00
stability.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
subst.rs Rename middle::ty::ctxt to TyCtxt 2016-03-03 07:37:56 +00:00
weak_lang_items.rs