tests: fix rustc-pass-by-value-self
This commit is contained in:
parent
c39826e3fa
commit
c6454a8d65
@ -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() {}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user