Skip to content

The lint non_camel_case_types ignores inherent associated types #105341

Closed
@fmease

Description

@fmease

The following code compiles successfully when it should not due to S::typ not having an upper camel case name.

#![feature(inherent_associated_types)]
#![allow(incomplete_features, dead_code)]
#![deny(non_camel_case_types)]

struct S;

impl S {
    type typ = ();
}

Meta

rustc -Vv:

rustc 1.67.0-nightly (53e4b9dd7 2022-12-04)
binary: rustc
commit-hash: 53e4b9dd74c29cc9308b8d0f10facac70bb101a7
commit-date: 2022-12-04
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4

@rustbot label A-lint requires-nightly F-inherent_associated_types

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.F-inherent_associated_types`#![feature(inherent_associated_types)]`requires-nightlyThis issue requires a nightly compiler in some way.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions