Skip to content

Conversation

@m4rch3n1ng
Copy link
Contributor

follow-up on parts of #229.

i made my own list of rustc tests that could be parsed by rustc, but couldn't be parsed with tree-sitter. with this change, here is the difference in that list:

diff
--- .tmp/list.txt	2025-02-27 14:52:48.714795961 +0100
+++ .tmp/list.txt.turbofish-patterns	2025-02-27 15:05:53.773283293 +0100
@@ -51,11 +51,6 @@
 tests/ui/async-await/pin-ergonomics/sugar.rs
 tests/ui/async-await/return-type-notation/supertrait-bound.rs
 tests/ui/attributes/issue-115264-pat-field.rs
-tests/ui/binding/match-bot.rs
-tests/ui/binding/match-join.rs
-tests/ui/binding/nested-matchs.rs
-tests/ui/binding/use-uninit-match.rs
-tests/ui/binding/use-uninit-match2.rs
 tests/ui/borrowck/alias-liveness/higher-ranked.rs
 tests/ui/borrowck/alias-liveness/rtn-static.rs
 tests/ui/closures/binder/late-bound-in-body.rs
@@ -197,7 +192,6 @@
 tests/ui/inline-const/pat-unsafe.rs
 tests/ui/issues/issue-22471.rs
 tests/ui/issues/issue-26186.rs
-tests/ui/issues/issue-34751.rs
 tests/ui/issues/issue-36116.rs
 tests/ui/issues/issue-37051.rs
 tests/ui/issues/issue-37733.rs
@@ -226,7 +220,6 @@
 tests/ui/macros/try-macro.rs
 tests/ui/macros/type-macros-hlist.rs
 tests/ui/macros/user-defined-macro-rules.rs
-tests/ui/match/match-bot-panic.rs
 tests/ui/match/postfix-match/no-unused-parens.rs
 tests/ui/match/postfix-match/pf-match-chain.rs
 tests/ui/nll/assign-while-to-immutable.rs
@@ -240,7 +233,6 @@
 tests/ui/parser/trait-plusequal-splitting.rs
 tests/ui/parser/unsafe-foreign-mod.rs
 tests/ui/pattern/issue-22546.rs
-tests/ui/pattern/size-and-align.rs
 tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs
 tests/ui/privacy/decl-macro-infinite-global-import-cycle-ice-64784.rs
 tests/ui/raw-ref-op/amp-raw-without-mut-const-is-a-normal-borrow.rs
@@ -268,7 +260,6 @@
 tests/ui/specialization/transmute-specialization.rs
 tests/ui/static/static-extern-type.rs
 tests/ui/structs-enums/numeric-fields.rs
-tests/ui/structs-enums/simple-match-generic-tag.rs
 tests/ui/structs-enums/struct-aliases.rs
 tests/ui/structs/default-field-values/use-normalized-ty-for-default-struct-value.rs
 tests/ui/traits/alias/basic.rs

i am not entirely sure when it is appropriate to do a field in tree-sitter, but i decided to put the type_arguments in a field like the generic_type_with_turbofish does, but not wrap the identifier in it, like all of the other patterns do.

Copy link
Contributor

@maxbrunsfeld maxbrunsfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this, and for the great investigation of where we don't match rustc. I left a name change suggestion.

@maxbrunsfeld maxbrunsfeld merged commit 509e251 into tree-sitter:master Feb 27, 2025
4 checks passed
@m4rch3n1ng m4rch3n1ng deleted the turbofish-patterns branch February 27, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants