Rollup merge of #108049 - clubby789:dont-suggest-unstable, r=compiler-errors
Don't suggest `#[doc(hidden)]` trait methods with matching return type Fixes #107983, addressing the bad suggestion. The test can probably be made more specific to this case, but I'm unsure how. `@rustbot` label +A-diagnostics
This commit is contained in:
commit
897f56ed28
3 changed files with 38 additions and 1 deletions
|
@ -504,7 +504,9 @@ fn foo(&self) -> Self::T { String::new() }
|
|||
let methods: Vec<(Span, String)> = items
|
||||
.in_definition_order()
|
||||
.filter(|item| {
|
||||
ty::AssocKind::Fn == item.kind && Some(item.name) != current_method_ident
|
||||
ty::AssocKind::Fn == item.kind
|
||||
&& Some(item.name) != current_method_ident
|
||||
&& !tcx.is_doc_hidden(item.def_id)
|
||||
})
|
||||
.filter_map(|item| {
|
||||
let method = tcx.fn_sig(item.def_id).subst_identity();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue