mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Add support for const and async trait bounds
This commit is contained in:
parent
bb0f93a260
commit
3e4deab3d8
5 changed files with 89 additions and 0 deletions
|
@ -157,6 +157,16 @@ fn type_bound(p: &mut Parser<'_>) -> bool {
|
|||
p.bump_any();
|
||||
p.expect(T![const]);
|
||||
}
|
||||
// test const_trait_bound
|
||||
// const fn foo(_: impl const Trait) {}
|
||||
T![const] => {
|
||||
p.bump_any();
|
||||
}
|
||||
// test async_trait_bound
|
||||
// fn async_foo(_: impl async Fn(&i32)) {}
|
||||
T![async] => {
|
||||
p.bump_any();
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
if paths::is_use_path_start(p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue