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_mir_build/src/builder | |
| 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_mir_build/src/builder')
| -rw-r--r-- | compiler/rustc_mir_build/src/builder/matches/test.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/builder/matches/test.rs b/compiler/rustc_mir_build/src/builder/matches/test.rs index 57cf8fa719c..73cc3c86e22 100644 --- a/compiler/rustc_mir_build/src/builder/matches/test.rs +++ b/compiler/rustc_mir_build/src/builder/matches/test.rs @@ -740,7 +740,7 @@ fn trait_method<'tcx>( let item = tcx .associated_items(trait_def_id) .filter_by_name_unhygienic(method_name) - .find(|item| item.kind == ty::AssocKind::Fn) + .find(|item| item.is_fn()) .expect("trait method not found"); let method_ty = Ty::new_fn_def(tcx, item.def_id, args); |
