]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/wrong_self_conventions_mut.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / wrong_self_conventions_mut.rs
index 5bb2116bd339af9ef01ddc281abb2d70416a5610..9169fc6d71f6acd0194b9c483952397c835b4a91 100644 (file)
@@ -12,6 +12,7 @@ mod issue6758 {
     impl<T> Test<T> {
         // If a method starts with `to_` and not ends with `_mut` it should expect `&self`
         pub fn to_many(&mut self) -> Option<&mut [T]> {
+            //~^ ERROR: methods with the following characteristics: (`to_*` and `self` type is
             match self {
                 Self::Many(data) => Some(data),
                 _ => None,
@@ -20,6 +21,7 @@ mod issue6758 {
 
         // If a method starts with `to_` and ends with `_mut` it should expect `&mut self`
         pub fn to_many_mut(&self) -> Option<&[T]> {
+            //~^ ERROR: methods with the following characteristics: (`to_*` and `*_mut`) usual
             match self {
                 Self::Many(data) => Some(data),
                 _ => None,