rust/src/test/ui-fulldeps/internal-lints/rustc_pass_by_value.stderr
Mahdi Dibaiee 4c3e330a8c
feat: pass_by_value lint attribute
Useful for thin wrapper attributes that are best passed as value instead
of reference.
2022-01-09 13:05:51 +00:00

81 lines
2.9 KiB
Plaintext

error: passing `Ty<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:13:13
|
LL | ty_ref: &Ty<'_>,
| ^^^^^^^ help: try passing by value: `Ty<'_>`
|
note: the lint level is defined here
--> $DIR/rustc_pass_by_value.rs:4:9
|
LL | #![deny(rustc::pass_by_value)]
| ^^^^^^^^^^^^^^^^^^^^
error: passing `TyCtxt<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:15:18
|
LL | ty_ctxt_ref: &TyCtxt<'_>,
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
error: passing `Ty<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:19:28
|
LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
| ^^^^^^^ help: try passing by value: `Ty<'_>`
error: passing `TyCtxt<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:19:55
|
LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
error: passing `Ty<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:26:17
|
LL | ty_ref: &Ty<'_>,
| ^^^^^^^ help: try passing by value: `Ty<'_>`
error: passing `TyCtxt<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:28:22
|
LL | ty_ctxt_ref: &TyCtxt<'_>,
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
error: passing `Ty<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:31:41
|
LL | fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
| ^^^^^^^ help: try passing by value: `Ty<'_>`
error: passing `TyCtxt<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:31:68
|
LL | fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
error: passing `Ty<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:53:17
|
LL | ty_ref: &Ty<'_>,
| ^^^^^^^ help: try passing by value: `Ty<'_>`
error: passing `TyCtxt<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:55:22
|
LL | ty_ctxt_ref: &TyCtxt<'_>,
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
error: passing `Ty<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:59:38
|
LL | fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
| ^^^^^^^ help: try passing by value: `Ty<'_>`
error: passing `TyCtxt<'_>` by reference
--> $DIR/rustc_pass_by_value.rs:59:65
|
LL | fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
| ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
error: aborting due to 12 previous errors