2019-04-24 16:24:00 -05:00
|
|
|
error: passing `Ty<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:14:13
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
|
LL | ty_ref: &Ty<'_>,
|
|
|
|
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
|
|
|
|
|
2020-01-22 17:57:38 -06:00
|
|
|
note: the lint level is defined here
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:5:9
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2022-01-07 05:38:16 -06:00
|
|
|
LL | #![deny(rustc::pass_by_value)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
2019-04-24 16:24:00 -05:00
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
error: passing `TyCtxt<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:16:18
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | ty_ctxt_ref: &TyCtxt<'_>,
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
error: passing `Ty<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:20:28
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
|
2019-04-24 16:24:00 -05:00
|
|
|
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
error: passing `TyCtxt<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:20:55
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
error: passing `Ty<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:27:17
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
|
LL | ty_ref: &Ty<'_>,
|
|
|
|
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
error: passing `TyCtxt<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:29:22
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | ty_ctxt_ref: &TyCtxt<'_>,
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
error: passing `Ty<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:32:41
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
|
2019-04-24 16:24:00 -05:00
|
|
|
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
error: passing `TyCtxt<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:32:68
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
error: passing `Ty<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:54:17
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
|
LL | ty_ref: &Ty<'_>,
|
|
|
|
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
error: passing `TyCtxt<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:56:22
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | ty_ctxt_ref: &TyCtxt<'_>,
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
|
|
error: passing `Ty<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:60:38
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
|
2019-04-24 16:24:00 -05:00
|
|
|
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
error: passing `TyCtxt<'_>` by reference
|
2022-01-10 02:54:42 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:60:65
|
2019-04-24 16:24:00 -05:00
|
|
|
|
|
2019-06-13 16:48:52 -05:00
|
|
|
LL | fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
|
2019-04-24 16:24:00 -05:00
|
|
|
|
2022-01-10 02:54:42 -06:00
|
|
|
error: passing `CustomEnum` by reference
|
2022-01-10 12:12:28 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:74:20
|
2022-01-10 02:54:42 -06:00
|
|
|
|
|
|
|
|
LL | reference: &CustomEnum,
|
|
|
|
| ^^^^^^^^^^^ help: try passing by value: `CustomEnum`
|
|
|
|
|
|
|
|
error: passing `CustomStruct` by reference
|
2022-01-10 12:12:28 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:85:24
|
2022-01-10 02:54:42 -06:00
|
|
|
|
|
|
|
|
LL | type CustomAlias<'a> = &'a CustomStruct;
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try passing by value: `CustomStruct`
|
|
|
|
|
|
|
|
error: passing `CustomStruct` by reference
|
2022-01-10 12:12:28 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:90:20
|
2022-01-10 02:54:42 -06:00
|
|
|
|
|
|
|
|
LL | reference: &CustomStruct,
|
|
|
|
| ^^^^^^^^^^^^^ help: try passing by value: `CustomStruct`
|
|
|
|
|
2022-06-04 15:50:19 -05:00
|
|
|
error: passing `CustomAlias<'_>` by reference
|
2022-01-10 12:12:28 -06:00
|
|
|
--> $DIR/rustc_pass_by_value.rs:96:20
|
2022-01-10 02:54:42 -06:00
|
|
|
|
|
|
|
|
LL | reference: &CustomAlias,
|
2022-06-04 15:50:19 -05:00
|
|
|
| ^^^^^^^^^^^^ help: try passing by value: `CustomAlias<'_>`
|
2022-01-10 02:54:42 -06:00
|
|
|
|
2022-01-11 13:59:06 -06:00
|
|
|
error: passing `WithParameters<T, 1>` by reference
|
|
|
|
--> $DIR/rustc_pass_by_value.rs:110:20
|
|
|
|
|
|
2022-01-11 15:28:04 -06:00
|
|
|
LL | reference: &'a WithParameters<T, 1>,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1>`
|
2022-01-11 13:59:06 -06:00
|
|
|
|
|
|
|
error: passing `WithParameters<T, 1, u32>` by reference
|
|
|
|
--> $DIR/rustc_pass_by_value.rs:111:27
|
|
|
|
|
|
|
|
|
LL | reference_with_m: &WithParameters<T, 1, u32>,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1, u32>`
|
|
|
|
|
2022-01-11 15:28:04 -06:00
|
|
|
error: passing `WithParameters<T, 1>` by reference
|
|
|
|
--> $DIR/rustc_pass_by_value.rs:112:10
|
|
|
|
|
|
|
|
|
LL | ) -> &'a WithParameters<T, 1> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1>`
|
|
|
|
|
|
|
|
error: passing `WithParameters<_, 1>` by reference
|
|
|
|
--> $DIR/rustc_pass_by_value.rs:114:22
|
|
|
|
|
|
|
|
|
LL | reference as &WithParameters<_, 1>
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<_, 1>`
|
|
|
|
|
|
|
|
error: aborting due to 20 previous errors
|
2019-04-24 16:24:00 -05:00
|
|
|
|