mirror of
https://github.com/rust-lang/rust.git
synced 2026-02-15 01:14:05 +00:00
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
77 lines
2.2 KiB
Plaintext
77 lines
2.2 KiB
Plaintext
error: argument to `Path::join` starts with a path separator
|
|
--> tests/ui/join_absolute_paths.rs:10:15
|
|
|
|
|
LL | path.join("/sh");
|
|
| ^^^^^
|
|
|
|
|
= note: joining a path starting with separator will replace the path instead
|
|
= note: `-D clippy::join-absolute-paths` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::join_absolute_paths)]`
|
|
help: if this is unintentional, try removing the starting separator
|
|
|
|
|
LL - path.join("/sh");
|
|
LL + path.join("sh");
|
|
|
|
|
help: if this is intentional, consider using `Path::new`
|
|
|
|
|
LL - path.join("/sh");
|
|
LL + PathBuf::from("/sh");
|
|
|
|
|
|
|
error: argument to `Path::join` starts with a path separator
|
|
--> tests/ui/join_absolute_paths.rs:14:15
|
|
|
|
|
LL | path.join("\\user");
|
|
| ^^^^^^^^
|
|
|
|
|
= note: joining a path starting with separator will replace the path instead
|
|
help: if this is unintentional, try removing the starting separator
|
|
|
|
|
LL - path.join("\\user");
|
|
LL + path.join("\user");
|
|
|
|
|
help: if this is intentional, consider using `Path::new`
|
|
|
|
|
LL - path.join("\\user");
|
|
LL + PathBuf::from("\\user");
|
|
|
|
|
|
|
error: argument to `Path::join` starts with a path separator
|
|
--> tests/ui/join_absolute_paths.rs:18:15
|
|
|
|
|
LL | path.join("/sh");
|
|
| ^^^^^
|
|
|
|
|
= note: joining a path starting with separator will replace the path instead
|
|
help: if this is unintentional, try removing the starting separator
|
|
|
|
|
LL - path.join("/sh");
|
|
LL + path.join("sh");
|
|
|
|
|
help: if this is intentional, consider using `Path::new`
|
|
|
|
|
LL - path.join("/sh");
|
|
LL + PathBuf::from("/sh");
|
|
|
|
|
|
|
error: argument to `Path::join` starts with a path separator
|
|
--> tests/ui/join_absolute_paths.rs:22:15
|
|
|
|
|
LL | path.join(r#"/sh"#);
|
|
| ^^^^^^^^
|
|
|
|
|
= note: joining a path starting with separator will replace the path instead
|
|
help: if this is unintentional, try removing the starting separator
|
|
|
|
|
LL - path.join(r#"/sh"#);
|
|
LL + path.join(r#"sh"#);
|
|
|
|
|
help: if this is intentional, consider using `Path::new`
|
|
|
|
|
LL - path.join(r#"/sh"#);
|
|
LL + PathBuf::from(r#"/sh"#);
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|