mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
fix: parsing of ?
opt-out trait bounds
thanks to Veykril
This commit is contained in:
parent
2f0814ea35
commit
df67bbdcb3
3 changed files with 54 additions and 0 deletions
|
@ -133,6 +133,12 @@ fn type_bound(p: &mut Parser) -> bool {
|
|||
match p.current() {
|
||||
LIFETIME_IDENT => lifetime(p),
|
||||
T![for] => types::for_type(p, false),
|
||||
T![?] if p.nth_at(1, T![for]) => {
|
||||
// test question_for_type_trait_bound
|
||||
// fn f<T>() where T: ?for<> Sized {}
|
||||
p.bump_any();
|
||||
types::for_type(p, false)
|
||||
}
|
||||
current => {
|
||||
match current {
|
||||
T![?] => p.bump_any(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue