about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-01-10 02:47:32 +0100
committerGitHub <noreply@github.com>2020-01-10 02:47:32 +0100
commitf3963873aac5fbc3ace85ae290710b58506f3645 (patch)
treeb874b91c46dc830da454d15dc6dead5b4644120a /src/libstd/sys
parente180d36d49ef7a14196bddd9b8741eb36d689277 (diff)
parentfd1c00348b7b3521f7340a2d034b32406229fe1b (diff)
downloadrust-f3963873aac5fbc3ace85ae290710b58506f3645.tar.gz
rust-f3963873aac5fbc3ace85ae290710b58506f3645.zip
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
Diffstat (limited to 'src/libstd/sys')
0 files changed, 0 insertions, 0 deletions