mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 11:37:39 +00:00
Store associated item defaultness in impl_defaultness.
This commit is contained in:
parent
80a56878cf
commit
d17a30a05d
@ -105,7 +105,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
|
|||||||
match tit_.kind {
|
match tit_.kind {
|
||||||
hir::TraitItemKind::Const(..) | hir::TraitItemKind::Type(..) => {},
|
hir::TraitItemKind::Const(..) | hir::TraitItemKind::Type(..) => {},
|
||||||
hir::TraitItemKind::Fn(..) => {
|
hir::TraitItemKind::Fn(..) => {
|
||||||
if tit.defaultness.has_value() {
|
if cx.tcx.impl_defaultness(tit.id.def_id).has_value() {
|
||||||
// trait method with default body needs inline in case
|
// trait method with default body needs inline in case
|
||||||
// an impl is not provided
|
// an impl is not provided
|
||||||
let desc = "a default trait method";
|
let desc = "a default trait method";
|
||||||
|
Loading…
Reference in New Issue
Block a user