-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual IndentStyle is broken on impl with where clause #3071
Comments
Confirming I can still reproduce this on Input struct A<T>
where T: Send
{
x: u32,
}
impl<T> A<T> where T: Send
{
fn foo() {}
} output with struct A<T>
where T: Send
{
x: u32,
}
impl<T> A<T> where T: Send
{
fn foo() {}
} output with struct A<T>
where
T: Send,
{
x: u32,
}
impl<T> A<T>
where
T: Send,
{
fn foo() {}
} For anyone interested on working on this I'd check out what the style guide has to say about
Lines 2893 to 2904 in a7bf009
At least in the case of Lines 694 to 705 in a7bf009
|
linking the |
Hey! @ytmimi I would like to give a shot. Based on what was exposed on the style guide, the |
Awesome! as mentioned in the |
@rustbot claim |
@ytmimi Thanks! ^^ I'll try to add a draft PR as soon as I can!👍 |
@jmj0502 no rush! I appreciate your interest in taking this on 😁. You might also be able to leverage the Lines 2745 to 2762 in f2c31ba
|
@ytmimi Cool! This might take a while 😅 but its ok tho'. Should I use the PR if I want to reach out for questions? |
Either on the PR or here is fine! I'll get the notifications regardless of which channel you choose to use. |
@ytmimi Hey! I got a question. How can I use the |
Great question! The details are outlined in the create test cases section of the Contribution docs. To set configs for any test in the (example taken from tests/target/issue-3270/one.rs) // rustfmt-version: One
pub fn main() {
/* let s = String::from(
"
hello
world
",
); */
assert_eq!(s, "\nhello\nworld\n");
} You're not limited to just one. You can use these comments to set multiple configuration values for the test. |
@ytmimi I think I'm done! The solution was along the lines of the information you provided on the issue description. The |
Test code:
The
impl
block is expected to be formatted as:Everything is ok for
indent_style: "Block"
.rustfmt version:
The text was updated successfully, but these errors were encountered: