File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,9 @@ declare_clippy_lint! {
85
85
/// }
86
86
/// ```
87
87
///
88
- /// Alternatively, if the `new()` method requires a non-default initialization, implement a custom `Default`.
89
- /// This also allows you to mark the `new()` implementation as `const`:
88
+ /// Alternatively, if the `new()` method requires a non-default initialization, consider renaming
89
+ /// it to another less standard name. Lastly, if the `new()` method needs to be `const`,
90
+ /// implement a custom `Default`:
90
91
///
91
92
/// ```no_run
92
93
/// struct MyStruct(i32);
@@ -170,7 +171,7 @@ impl<'tcx> LateLintPass<'tcx> for NewWithoutDefault {
170
171
{
171
172
impls. insert (
172
173
cx. tcx . local_def_id_to_hir_id ( local_def_id) ,
173
- if cx. tcx . is_builtin_derived ( d) {
174
+ if cx. tcx . is_builtin_derived ( d. into ( ) ) {
174
175
DefaultType :: AutoDerived
175
176
} else {
176
177
DefaultType :: Manual
You can’t perform that action at this time.
0 commit comments