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

Unclear message in type_complexity #13387

Closed
ChrisJefferson opened this issue Sep 12, 2024 · 4 comments
Closed

Unclear message in type_complexity #13387

ChrisJefferson opened this issue Sep 12, 2024 · 4 comments
Assignees
Labels
A-documentation Area: Adding or improving documentation C-bug Category: Clippy is not doing the correct thing

Comments

@ChrisJefferson
Copy link

ChrisJefferson commented Sep 12, 2024

Summary

I'm not clear what type_complexity wants me to do.

The output says " very complex type used. Consider factoring parts into type definitions"

The webpage ( https://rust-lang.github.io/rust-clippy/master/index.html#/type_complexity ) tells me the same thing (use a type definition to simply).

The example shows me some bad code, but there is no example of what it should look like 'fixed'.

Attempts to google for 'type definition rust' just get me to pages that define what a type is in rust, and list the various data types available in Rust.

I suspect this is an easy doc fix for someone who knows what a 'type definition' is, and could maybe give an example on the webpage (might be too long for the terminal?) -- or is there a more searchable term than type definition?

@ChrisJefferson ChrisJefferson added the C-bug Category: Clippy is not doing the correct thing label Sep 12, 2024
@alex-semenyuk
Copy link
Member

@rustbot label A-documentation

@rustbot rustbot added the A-documentation Area: Adding or improving documentation label Sep 12, 2024
@alex-semenyuk
Copy link
Member

@rustbot claim

bors added a commit that referenced this issue Sep 22, 2024
Clarify example for `type_complexity`

As mentioned #13387 it's not clear how to fix issue with complexity so add example for this

changelog: none
@alex-semenyuk
Copy link
Member

alex-semenyuk commented Sep 23, 2024

@ChrisJefferson merged clarified example. Could you please check - is it clear now? if so you could close it

@ChrisJefferson
Copy link
Author

Thanks, much clearer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Adding or improving documentation C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

3 participants