Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/path.rs')
-rw-r--r--crates/hir_def/src/path.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/hir_def/src/path.rs b/crates/hir_def/src/path.rs
index d17e6b1834..a54352439c 100644
--- a/crates/hir_def/src/path.rs
+++ b/crates/hir_def/src/path.rs
@@ -135,6 +135,9 @@ pub struct GenericArgs {
pub has_self_type: bool,
/// Associated type bindings like in `Iterator<Item = T>`.
pub bindings: Vec<AssociatedTypeBinding>,
+ /// Whether these generic args were desugared from `Trait(Arg) -> Output`
+ /// parenthesis notation typically used for the `Fn` traits.
+ pub desugared_from_fn: bool,
}
/// An associated type binding like in `Iterator<Item = T>`.
@@ -269,7 +272,12 @@ impl GenericArgs {
}
pub(crate) fn empty() -> GenericArgs {
- GenericArgs { args: Vec::new(), has_self_type: false, bindings: Vec::new() }
+ GenericArgs {
+ args: Vec::new(),
+ has_self_type: false,
+ bindings: Vec::new(),
+ desugared_from_fn: false,
+ }
}
}