diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-04-15 15:47:27 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-15 15:47:27 +1000 |
| commit | 13cd5256acf1fdae1721047a4beb8aeeae360480 (patch) | |
| tree | 76b85f795a81ab08f508ca783891853b24fb94ca /compiler/rustc_middle/src/ty/instance.rs | |
| parent | efcf4f9d2db589b03d7fa320de19915f3e4f86cd (diff) | |
| parent | 78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18 (diff) | |
| download | rust-13cd5256acf1fdae1721047a4beb8aeeae360480.tar.gz rust-13cd5256acf1fdae1721047a4beb8aeeae360480.zip | |
Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk
Overhaul `AssocItem` `AssocItem` has multiple fields that only make sense some of the time. E.g. the `name` can be empty if it's an RPITIT associated type. It's clearer and less error prone if these fields are moved to the relevant `kind` variants. r? ``@fee1-dead``
Diffstat (limited to 'compiler/rustc_middle/src/ty/instance.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/instance.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs index 07f2a602f2b..faad0a82acb 100644 --- a/compiler/rustc_middle/src/ty/instance.rs +++ b/compiler/rustc_middle/src/ty/instance.rs @@ -746,7 +746,7 @@ impl<'tcx> Instance<'tcx> { let call_once = tcx .associated_items(fn_once) .in_definition_order() - .find(|it| it.kind == ty::AssocKind::Fn) + .find(|it| it.is_fn()) .unwrap() .def_id; let track_caller = |
