Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix · model-checking/verify-rust-std@3eeca5f (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 3eeca5f
Rollup merge of rust-lang#127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix
Improve dead code analysisFixes rust-lang#1207701. check impl items later if self ty is private although the trait method is public, cause we must use the ty firstly if it's private 2. mark the adt live if it appears in pattern, like generic argument, this implies the use of the adt 3. based on the above, we can handle the case that private adts impl Default, so that we don't need adding rustc_trivial_field_reads on Default, and the logic in should_ignore_item r? ``@pnkfelix``
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -103,7 +103,6 @@ use crate::ascii::Char as AsciiChar; | ||
103 | 103 | /// ``` |
104 | 104 | #[cfg_attr(not(test), rustc_diagnostic_item = "Default")] |
105 | 105 | #[stable(feature = "rust1", since = "1.0.0")] |
106 | -#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)] | |
107 | 106 | pub trait Default: Sized { |
108 | 107 | /// Returns the "default value" for a type. |
109 | 108 | /// |