Skip to content
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

Version two hard_tabs adds indent on long generic types #5917

Open
Ten0 opened this issue Sep 19, 2023 · 5 comments
Open

Version two hard_tabs adds indent on long generic types #5917

Ten0 opened this issue Sep 19, 2023 · 5 comments
Labels
duplicate only-with-option requires a non-default option value to reproduce

Comments

@Ten0
Copy link

Ten0 commented Sep 19, 2023

With version=Two

fn foo(
	bar: Box<
		dyn Trait<
			'static,
			aaaaaaaaaaaaaaaaaaa::table,
			bbbbbbbbbbbbbbbbbbb::table,
			diesel::pg::Pg,
			SqlType = sql_types::Nullable<sql_types::Integer>,
		>,
	>,
) {
}

gets reformatted as:

fn foo(
	bar: Box<
		dyn Trait<
				'static,
				aaaaaaaaaaaaaaaaaaa::table,
				bbbbbbbbbbbbbbbbbbb::table,
				diesel::pg::Pg,
				SqlType = sql_types::Nullable<sql_types::Integer>,
			>,
	>,
) {
}
@ytmimi ytmimi changed the title Version two adds nonsensical indent on long generic types Version two hard_tabs adds indent on long generic types Sep 19, 2023
@ytmimi
Copy link
Contributor

ytmimi commented Sep 19, 2023

I'm pretty sure this is a duplicate of #5772. The indentation error seems to be exacerbated by the use of hard_tabs=true

@ytmimi ytmimi added duplicate only-with-option requires a non-default option value to reproduce labels Sep 19, 2023
@Ten0
Copy link
Author

Ten0 commented Sep 19, 2023

From what I tested before opening the issue the mis-formatting also happens without hard tabs.

@ytmimi
Copy link
Contributor

ytmimi commented Sep 19, 2023

From what I tested before opening the issue the mis-formatting also happens without hard tabs.

Thanks for taking the time to look into that. Without hard_tabs this seems to be the same indentation as described in #5772. Resolving that issue may fix this one, though I'm not 100% sure if setting hard_tabs makes a difference for the fix.

@Ten0
Copy link
Author

Ten0 commented Sep 19, 2023

It looks does look similar indeed, however #5772 seems to not mention version two, and I only get this issue on version two, otherwise it formats properly.

@ytmimi
Copy link
Contributor

ytmimi commented Sep 20, 2023

Thanks for the additional info. I think we'll keep both issues open for now. Hopefully fixing one of these fixes the other 🤞🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate only-with-option requires a non-default option value to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants