forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#105768 - fee1-dead-contrib:iat-style, r=eholk
Detect inherent associated types not having CamelCase Fixes rust-lang#105341.
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![feature(inherent_associated_types)] | ||
#![allow(incomplete_features, dead_code)] | ||
#![deny(non_camel_case_types)] | ||
|
||
struct S; | ||
|
||
impl S { | ||
type typ = (); | ||
//~^ ERROR associated type `typ` should have an upper camel case name | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: associated type `typ` should have an upper camel case name | ||
--> $DIR/style.rs:8:10 | ||
| | ||
LL | type typ = (); | ||
| ^^^ help: convert the identifier to upper camel case: `Typ` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/style.rs:3:9 | ||
| | ||
LL | #![deny(non_camel_case_types)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|