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

Universal impl trait shows camel case name warning #46959

Closed
vi opened this issue Dec 23, 2017 · 2 comments
Closed

Universal impl trait shows camel case name warning #46959

vi opened this issue Dec 23, 2017 · 2 comments

Comments

@vi
Copy link
Contributor

@vi vi commented Dec 23, 2017

#![feature(universal_impl_trait)]
#![feature(conservative_impl_trait)]
 
fn qqq(lol: impl Iterator<Item=u32>) -> impl Iterator<Item=u64> {
    lol.map(|x|x as u64)
}
warning: type parameter `impl Iterator<Item = u32>` should have a camel case name such as `Impl iterator<item = u32>`
@cramertj
Copy link
Member

@cramertj cramertj commented Dec 23, 2017

impl Trait in argument position now desugars to explicit type parameters at the HIR level. There are two possible fixes for this: specifically ignore impl xxx params, or move the NonCamelCaseTypes lint to run on the AST (an EarlyLintPass instead of a LateLintPass).

I'm working on this.

cc @nikomatsakis

@nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Dec 23, 2017

bors added a commit that referenced this issue Jan 4, 2018
Limit style lint to non-synthetic generic params

Fix #46959

r? @nikomatsakis
@bors bors closed this in #47132 Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants