]> git.lizzy.rs Git - rust.git/blob - tests/ui-fulldeps/internal-lints/rustc_pass_by_value_self.stderr
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui-fulldeps / internal-lints / rustc_pass_by_value_self.stderr
1 error: passing `TyCtxt<'tcx>` by reference
2   --> $DIR/rustc_pass_by_value_self.rs:18:15
3    |
4 LL |     fn by_ref(&self) {}
5    |               ^^^^^ help: try passing by value: `TyCtxt<'tcx>`
6    |
7 note: the lint level is defined here
8   --> $DIR/rustc_pass_by_value_self.rs:8:9
9    |
10 LL | #![deny(rustc::pass_by_value)]
11    |         ^^^^^^^^^^^^^^^^^^^^
12
13 error: passing `Ty<'tcx>` by reference
14   --> $DIR/rustc_pass_by_value_self.rs:30:21
15    |
16 LL |     fn by_ref(self: &Ty<'tcx>) {}
17    |                     ^^^^^^^^^ help: try passing by value: `Ty<'tcx>`
18
19 error: passing `Foo` by reference
20   --> $DIR/rustc_pass_by_value_self.rs:37:17
21    |
22 LL |     fn with_ref(&self) {}
23    |                 ^^^^^ help: try passing by value: `Foo`
24
25 error: passing `WithParameters<T, 1>` by reference
26   --> $DIR/rustc_pass_by_value_self.rs:47:17
27    |
28 LL |     fn with_ref(&self) {}
29    |                 ^^^^^ help: try passing by value: `WithParameters<T, 1>`
30
31 error: passing `WithParameters<T, 1, u8>` by reference
32   --> $DIR/rustc_pass_by_value_self.rs:51:17
33    |
34 LL |     fn with_ref(&self) {}
35    |                 ^^^^^ help: try passing by value: `WithParameters<T, 1, u8>`
36
37 error: aborting due to 5 previous errors
38