tests: fix rustc-pass-by-value-self

This commit is contained in:
Artur Sinila 2022-07-19 02:54:13 +03:00
parent c39826e3fa
commit c6454a8d65
No known key found for this signature in database
GPG Key ID: 770E69D690735C61
2 changed files with 4 additions and 4 deletions

View File

@ -44,11 +44,11 @@ struct WithParameters<T, const N: usize, M = u32> {
}
impl<T> WithParameters<T, 1> {
fn with_ref(&self) {} //~ ERROR passing `WithParameters<T, 1_usize>` by reference
fn with_ref(&self) {} //~ ERROR passing `WithParameters<T, 1>` by reference
}
impl<T> WithParameters<T, 1, u8> {
fn with_ref(&self) {} //~ ERROR passing `WithParameters<T, 1_usize, u8>` by reference
fn with_ref(&self) {} //~ ERROR passing `WithParameters<T, 1, u8>` by reference
}
fn main() {}

View File

@ -26,13 +26,13 @@ error: passing `WithParameters<T, 1_usize>` by reference
--> $DIR/rustc_pass_by_value_self.rs:47:17
|
LL | fn with_ref(&self) {}
| ^^^^^ help: try passing by value: `WithParameters<T, 1_usize>`
| ^^^^^ help: try passing by value: `WithParameters<T, 1>`
error: passing `WithParameters<T, 1_usize, u8>` by reference
--> $DIR/rustc_pass_by_value_self.rs:51:17
|
LL | fn with_ref(&self) {}
| ^^^^^ help: try passing by value: `WithParameters<T, 1_usize, u8>`
| ^^^^^ help: try passing by value: `WithParameters<T, 1, u8>`
error: aborting due to 5 previous errors