diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-03-15 14:21:03 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-05-15 02:32:59 +0300 |
| commit | c30b41012d474586d407392a6b154e7f19c38b2c (patch) | |
| tree | adf34f62f1c929390851853093799427734a4569 /compiler/rustc_passes/src/lang_items.rs | |
| parent | 8387315ab3c26a57a1f53a90f188f0bc88514bca (diff) | |
| download | rust-c30b41012d474586d407392a6b154e7f19c38b2c.tar.gz rust-c30b41012d474586d407392a6b154e7f19c38b2c.zip | |
delegation: Implement list delegation
```rust
reuse prefix::{a, b, c}
```
Diffstat (limited to 'compiler/rustc_passes/src/lang_items.rs')
| -rw-r--r-- | compiler/rustc_passes/src/lang_items.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/lang_items.rs b/compiler/rustc_passes/src/lang_items.rs index c1da8928f30..a5fa94faead 100644 --- a/compiler/rustc_passes/src/lang_items.rs +++ b/compiler/rustc_passes/src/lang_items.rs @@ -285,7 +285,9 @@ impl<'ast, 'tcx> visit::Visitor<'ast> for LanguageItemCollector<'ast, 'tcx> { ast::ItemKind::TraitAlias(_, _) => Target::TraitAlias, ast::ItemKind::Impl(_) => Target::Impl, ast::ItemKind::MacroDef(_) => Target::MacroDef, - ast::ItemKind::MacCall(_) => unreachable!("macros should have been expanded"), + ast::ItemKind::MacCall(_) | ast::ItemKind::DelegationMac(_) => { + unreachable!("macros should have been expanded") + } }; self.check_for_lang( @@ -340,7 +342,9 @@ impl<'ast, 'tcx> visit::Visitor<'ast> for LanguageItemCollector<'ast, 'tcx> { } ast::AssocItemKind::Const(ct) => (Target::AssocConst, Some(&ct.generics)), ast::AssocItemKind::Type(ty) => (Target::AssocTy, Some(&ty.generics)), - ast::AssocItemKind::MacCall(_) => unreachable!("macros should have been expanded"), + ast::AssocItemKind::MacCall(_) | ast::AssocItemKind::DelegationMac(_) => { + unreachable!("macros should have been expanded") + } }; self.check_for_lang( |
