summary refs log tree commit diff
path: root/src/test/ui/methods
diff options
context:
space:
mode:
authorAndy Russell <arussell123@gmail.com>2018-12-16 22:21:47 -0500
committerAndy Russell <arussell123@gmail.com>2018-12-24 12:58:52 -0500
commit6474de904c1aca3a6eb131edc0e4e869ecabeb90 (patch)
treebbbad65469f1a6d0dee875bc024409ecc8584cc8 /src/test/ui/methods
parentddab10a692aab2e2984b5c826ed9d78a57e94851 (diff)
downloadrust-6474de904c1aca3a6eb131edc0e4e869ecabeb90.tar.gz
rust-6474de904c1aca3a6eb131edc0e4e869ecabeb90.zip
make non_camel_case_types an early lint
Diffstat (limited to 'src/test/ui/methods')
-rw-r--r--src/test/ui/methods/auxiliary/ambig_impl_2_lib.rs4
-rw-r--r--src/test/ui/methods/method-ambig-one-trait-unknown-int-type.rs8
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-cross-crate.rs6
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/test/ui/methods/auxiliary/ambig_impl_2_lib.rs b/src/test/ui/methods/auxiliary/ambig_impl_2_lib.rs
index 4ba0ccdba9b..f505994a52e 100644
--- a/src/test/ui/methods/auxiliary/ambig_impl_2_lib.rs
+++ b/src/test/ui/methods/auxiliary/ambig_impl_2_lib.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub trait me {
+pub trait Me {
     fn me(&self) -> usize;
 }
-impl me for usize { fn me(&self) -> usize { *self } }
+impl Me for usize { fn me(&self) -> usize { *self } }
diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.rs b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.rs
index 9acf5a52166..c77b589d32f 100644
--- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.rs
+++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.rs
@@ -8,19 +8,19 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test that we invoking `foo()` successfully resolves to the trait `foo`
+// Test that we invoking `foo()` successfully resolves to the trait `Foo`
 // (prompting the mismatched types error) but does not influence the choice
 // of what kind of `Vec` we have, eventually leading to a type error.
 
-trait foo {
+trait Foo {
     fn foo(&self) -> isize;
 }
 
-impl foo for Vec<usize> {
+impl Foo for Vec<usize> {
     fn foo(&self) -> isize {1}
 }
 
-impl foo for Vec<isize> {
+impl Foo for Vec<isize> {
     fn foo(&self) -> isize {2}
 }
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.rs b/src/test/ui/methods/method-ambig-two-traits-cross-crate.rs
index c1d4551fd9e..24b42333c4f 100644
--- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.rs
+++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.rs
@@ -13,9 +13,9 @@
 
 // aux-build:ambig_impl_2_lib.rs
 extern crate ambig_impl_2_lib;
-use ambig_impl_2_lib::me;
-trait me2 {
+use ambig_impl_2_lib::Me;
+trait Me2 {
     fn me(&self) -> usize;
 }
-impl me2 for usize { fn me(&self) -> usize { *self } }
+impl Me2 for usize { fn me(&self) -> usize { *self } }
 fn main() { 1_usize.me(); } //~ ERROR E0034
diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
index 7a75f20f65a..35e918f258d 100644
--- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
@@ -4,12 +4,12 @@ error[E0034]: multiple applicable items in scope
 LL | fn main() { 1_usize.me(); } //~ ERROR E0034
    |                     ^^ multiple `me` found
    |
-note: candidate #1 is defined in an impl of the trait `me2` for the type `usize`
+note: candidate #1 is defined in an impl of the trait `Me2` for the type `usize`
   --> $DIR/method-ambig-two-traits-cross-crate.rs:20:22
    |
-LL | impl me2 for usize { fn me(&self) -> usize { *self } }
+LL | impl Me2 for usize { fn me(&self) -> usize { *self } }
    |                      ^^^^^^^^^^^^^^^^^^^^^
-   = note: candidate #2 is defined in an impl of the trait `ambig_impl_2_lib::me` for the type `usize`
+   = note: candidate #2 is defined in an impl of the trait `ambig_impl_2_lib::Me` for the type `usize`
 
 error: aborting due to previous error