diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-06-21 11:24:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-21 11:24:08 -0700 |
commit | a41dad4330c8291893b5c5b013457499855ec9b5 (patch) | |
tree | 21b5ec00fedc07883eee26ca823d516477e4fc10 /t/t4018 | |
parent | The second batch (diff) | |
parent | userdiff: two simplifications of patterns for rust (diff) | |
download | tgif-a41dad4330c8291893b5c5b013457499855ec9b5.tar.xz |
Merge branch 'ml/userdiff-rust'
The pattern "git diff/grep" use to extract funcname and words
boundary for Rust has been added.
* ml/userdiff-rust:
userdiff: two simplifications of patterns for rust
userdiff: add built-in pattern for rust
Diffstat (limited to 't/t4018')
-rw-r--r-- | t/t4018/rust-fn | 5 | ||||
-rw-r--r-- | t/t4018/rust-impl | 5 | ||||
-rw-r--r-- | t/t4018/rust-struct | 5 | ||||
-rw-r--r-- | t/t4018/rust-trait | 5 |
4 files changed, 20 insertions, 0 deletions
diff --git a/t/t4018/rust-fn b/t/t4018/rust-fn new file mode 100644 index 0000000000..cbe02155f1 --- /dev/null +++ b/t/t4018/rust-fn @@ -0,0 +1,5 @@ +pub(self) fn RIGHT<T>(x: &[T]) where T: Debug { + let _ = x; + // a comment + let a = ChangeMe; +} diff --git a/t/t4018/rust-impl b/t/t4018/rust-impl new file mode 100644 index 0000000000..09df3cd93b --- /dev/null +++ b/t/t4018/rust-impl @@ -0,0 +1,5 @@ +impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> { + + pub fn ChangeMe(&self) -> () { + } +} diff --git a/t/t4018/rust-struct b/t/t4018/rust-struct new file mode 100644 index 0000000000..76aff1c0d8 --- /dev/null +++ b/t/t4018/rust-struct @@ -0,0 +1,5 @@ +#[derive(Debug)] +pub(super) struct RIGHT<'a> { + name: &'a str, + age: ChangeMe, +} diff --git a/t/t4018/rust-trait b/t/t4018/rust-trait new file mode 100644 index 0000000000..ea397f09ed --- /dev/null +++ b/t/t4018/rust-trait @@ -0,0 +1,5 @@ +unsafe trait RIGHT<T> { + fn len(&self) -> u32; + fn ChangeMe(&self, n: u32) -> T; + fn iter<F>(&self, f: F) where F: Fn(T); +} |