Skip to content

Commit 5211c21

Browse files
authored
Rollup merge of rust-lang#82773 - mgacek8:feature/add_diagnostic_item_to_Default_trait, r=oli-obk
Add diagnostic item to `Default` trait This PR adds diagnostic item to `Default` trait to be used by rust-lang/rust-clippy#6562 issue. Also fixes the obsolete path to the `symbols.rs` file in the comment.
2 parents 80b109e + ac5a95d commit 5211c21

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/default.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
/// bar: f32,
8181
/// }
8282
/// ```
83+
#[cfg_attr(not(test), rustc_diagnostic_item = "Default")]
8384
#[stable(feature = "rust1", since = "1.0.0")]
8485
pub trait Default: Sized {
8586
/// Returns the "default value" for a type.

0 commit comments

Comments
 (0)