tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New issue in const generics

GrayJack opened this issue · comments

In this code using const generics on enum: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=9ad3aebd75f7e0c3621ffad00165c069

It's possible to have this kind of syntax:

impl Machine<{State::Init}> {}

pub fn accumulate(self) -> Machine<{State::Accumulate}> {}

that gives a error where type_argument would happen

In this other example using &'static str as const generic: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e957af6f8ba26b8f496366182178a9d2

struct State<const S: &'static str> {}

A error also happen in type_parameter