2023-09-25 04:28:58 -05:00
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:16:37
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Command::new("ls").args(&["-a", "-l"]).status().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^ help: change this to: `["-a", "-l"]`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-borrows-for-generic-args` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::needless_borrows_for_generic_args)]`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:17:33
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Path::new(".").join(&&".");
|
|
|
|
| ^^^^^ help: change this to: `"."`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:21:33
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = std::fs::write("x", &"".to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: change this to: `"".to_string()`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:36:27
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | deref_target_is_x(&X);
|
|
|
|
| ^^ help: change this to: `X`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:49:30
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | multiple_constraints(&[[""]]);
|
|
|
|
| ^^^^^^^ help: change this to: `[[""]]`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:69:49
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | multiple_constraints_normalizes_to_same(&X, X);
|
|
|
|
| ^^ help: change this to: `X`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:127:24
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | takes_iter(&mut x)
|
|
|
|
| ^^^^^^ help: change this to: `x`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:136:41
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Command::new("ls").args(&["-a", "-l"]).status().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^ help: change this to: `["-a", "-l"]`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:144:41
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = std::fs::write("x", &arg);
|
|
|
|
| ^^^^ help: change this to: `arg`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:145:41
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | let _ = std::fs::write("x", &loc);
|
|
|
|
| ^^^^ help: change this to: `loc`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:167:11
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | f(&x);
|
|
|
|
| ^^ help: change this to: `x`
|
|
|
|
|
|
|
|
error: the borrowed expression implements the required traits
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/needless_borrows_for_generic_args.rs:247:13
|
2023-09-25 04:28:58 -05:00
|
|
|
|
|
|
|
|
LL | foo(&a);
|
|
|
|
| ^^ help: change this to: `a`
|
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
|
|
|
|