-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[review] add use alias test examples
- Loading branch information
1 parent
8b59198
commit 712814d
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// rustfmt-skip_macro_invocations: ["aaa","ccc"] | ||
|
||
// These tests demonstrate a realistic use case with use aliases. | ||
// The use statements should not impact functionality in any way. | ||
|
||
use crate::{aaa, bbb, ddd}; | ||
|
||
// No use alias, invocation in list | ||
// Should skip this invocation | ||
aaa!( | ||
const _: u8 = 0; | ||
); | ||
|
||
// Use alias, invocation in list | ||
// Should skip this invocation | ||
use crate::bbb as ccc; | ||
ccc!( | ||
const _: u8 = 0; | ||
); | ||
|
||
// Use alias, invocation not in list | ||
// Should not skip this invocation | ||
use crate::ddd as eee; | ||
eee!( | ||
const _: u8 = 0; | ||
); | ||
|
||
// No use alias, invocation not in list | ||
// Should not skip this invocation | ||
fff!( | ||
const _: u8 = 0; | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// rustfmt-skip_macro_invocations: ["aaa","ccc"] | ||
|
||
// These tests demonstrate a realistic use case with use aliases. | ||
// The use statements should not impact functionality in any way. | ||
|
||
use crate::{aaa, bbb, ddd}; | ||
|
||
// No use alias, invocation in list | ||
// Should skip this invocation | ||
aaa!( | ||
const _: u8 = 0; | ||
); | ||
|
||
// Use alias, invocation in list | ||
// Should skip this invocation | ||
use crate::bbb as ccc; | ||
ccc!( | ||
const _: u8 = 0; | ||
); | ||
|
||
// Use alias, invocation not in list | ||
// Should not skip this invocation | ||
use crate::ddd as eee; | ||
eee!( | ||
const _: u8 = 0; | ||
); | ||
|
||
// No use alias, invocation not in list | ||
// Should not skip this invocation | ||
fff!( | ||
const _: u8 = 0; | ||
); |