mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
tests for ty
This commit is contained in:
parent
5ca83a5fb3
commit
58fa7ce782
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,13 @@ fn pat() {
|
|||
check_prefix(PrefixEntryPoint::Pat, ".. ..", ".. ..");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ty() {
|
||||
check_prefix(PrefixEntryPoint::Ty, "fn() foo", "fn()");
|
||||
check_prefix(PrefixEntryPoint::Ty, "Clone + Copy + fn", "Clone + Copy +");
|
||||
check_prefix(PrefixEntryPoint::Ty, "struct f", "struct");
|
||||
}
|
||||
|
||||
fn check_prefix(entry: PrefixEntryPoint, input: &str, prefix: &str) {
|
||||
let lexed = LexedStr::new(input);
|
||||
let input = lexed.to_input();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue