about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-09-20 15:45:47 +0200
committerGitHub <noreply@github.com>2024-09-20 15:45:47 +0200
commitb2bcdbc79796655f8158460ff65deb919ef3a854 (patch)
tree49474ad1c87299db6595798001beddf6dd623361 /library/std/src
parentf784c5281ee21e321cf82ba33e45fcfb877d70c0 (diff)
parent98e68e504005a06edaffcee7d9303e50aa2ac7ac (diff)
downloadrust-b2bcdbc79796655f8158460ff65deb919ef3a854.tar.gz
rust-b2bcdbc79796655f8158460ff65deb919ef3a854.zip
Rollup merge of #130607 - GnomedDev:remove-seekfrom-paths, r=compiler-errors
[Clippy] Remove final std paths for diagnostic item

Removes the paths to SeekFrom::Start/Current that were left in #130553.

This was split off as it involves introducing a utility to check for enum ctors, as both:
- enum variants cannot be diagnostic items
- even if they could, that wouldn't help because we need to get the enum variant ctor

While adding the `is_enum_variant_ctor`, I removed both `is_diagnostic_ctor` and `is_res_diagnostic_ctor` as they are unused and never worked due to the above bullet points.
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 644b294db8d..2a4262b2367 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -2058,6 +2058,7 @@ pub trait Seek {
 /// It is used by the [`Seek`] trait.
 #[derive(Copy, PartialEq, Eq, Clone, Debug)]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "SeekFrom")]
 pub enum SeekFrom {
     /// Sets the offset to the provided number of bytes.
     #[stable(feature = "rust1", since = "1.0.0")]