From: Mazdak Farrokhzad Date: Fri, 10 Jan 2020 01:47:32 +0000 (+0100) Subject: Rollup merge of #67820 - ecstatic-morse:const-trait, r=oli-obk X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=f3963873aac5fbc3ace85ae290710b58506f3645;p=rust.git Rollup merge of #67820 - ecstatic-morse:const-trait, r=oli-obk Parse the syntax described in RFC 2632 This adds support for both `impl const Trait for Ty` and `?const Trait` bound syntax from rust-lang/rfcs#2632 to the parser. For now, both modifiers end up in a newly-added `constness` field on `ast::TraitRef`, although this may change once the implementation is fleshed out. I was planning on using `delay_span_bug` when this syntax is encountered during lowering, but I can't write `should-ice` UI tests. I emit a normal error instead, which causes duplicates when the feature gate is not enabled (see the `.stderr` files for the feature gate tests). Not sure what the desired approach is; Maybe just do nothing when the syntax is encountered with the feature gate is enabled? @oli-obk I went with `const_trait_impl` and `const_trait_bound_opt_out` for the names of these features. Are these to your liking? cc #67792 #67794 r? @Centril --- f3963873aac5fbc3ace85ae290710b58506f3645