diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-06-20 23:25:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-20 23:25:55 -0400 |
| commit | c93fac7d64394c6b926d863c1903d2e91fd2e41d (patch) | |
| tree | ede03935161542a7cded6910189cba25c3f88e26 /library/core/src | |
| parent | 8751016e20ff13f36327ec1527448522e8dc7247 (diff) | |
| parent | 52167e04e62a84fe5073c4074733c72f96961ace (diff) | |
| download | rust-c93fac7d64394c6b926d863c1903d2e91fd2e41d.tar.gz rust-c93fac7d64394c6b926d863c1903d2e91fd2e41d.zip | |
Rollup merge of #142485 - mu001999-contrib:dead-code/adt-pattern, r=petrochenkov
Marks ADT live if it appears in pattern Marks ADT live if it appears in pattern, it implies the construction of the ADT. 1. Then we can detect unused private ADTs impl `Default`, without special logics for `Default` and other std traits. 2. We can also remove `rustc_trivial_field_reads` on `Default`, and the logic in `should_ignore_item` (introduced by rust-lang/rust#126302). Fixes rust-lang/rust#120770 Extracted from rust-lang/rust#128637. r? `@petrochenkov`
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/default.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/library/core/src/default.rs b/library/core/src/default.rs index 044997a81a9..0a15cedfb55 100644 --- a/library/core/src/default.rs +++ b/library/core/src/default.rs @@ -103,7 +103,6 @@ use crate::ascii::Char as AsciiChar; /// ``` #[rustc_diagnostic_item = "Default"] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_trivial_field_reads] pub trait Default: Sized { /// Returns the "default value" for a type. /// |
