@@ -168,35 +168,6 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
168168 } ) ;
169169 struct_datum
170170 }
171- RustDefId :: Array => {
172- return Arc :: new ( chalk_solve:: rust_ir:: AdtDatum {
173- id : struct_id,
174- binders : chalk_ir:: Binders :: new (
175- chalk_ir:: VariableKinds :: from (
176- & self . interner ,
177- Some ( chalk_ir:: VariableKind :: Ty ( chalk_ir:: TyKind :: General ) ) ,
178- ) ,
179- chalk_solve:: rust_ir:: AdtDatumBound {
180- fields : vec ! [ ] ,
181- where_clauses : vec ! [ ] ,
182- } ,
183- ) ,
184- flags : chalk_solve:: rust_ir:: AdtFlags { upstream : false , fundamental : false } ,
185- } ) ;
186- }
187- RustDefId :: Never | RustDefId :: FnDef ( _) => {
188- return Arc :: new ( chalk_solve:: rust_ir:: AdtDatum {
189- id : struct_id,
190- binders : chalk_ir:: Binders :: new (
191- chalk_ir:: VariableKinds :: new ( & self . interner ) ,
192- chalk_solve:: rust_ir:: AdtDatumBound {
193- fields : vec ! [ ] ,
194- where_clauses : vec ! [ ] ,
195- } ,
196- ) ,
197- flags : chalk_solve:: rust_ir:: AdtFlags { upstream : false , fundamental : false } ,
198- } ) ;
199- }
200171
201172 v => bug ! ( "Used not struct variant ({:?}) when expecting struct variant." , v) ,
202173 }
@@ -287,8 +258,6 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
287258 // FIXME(chalk): this match can be removed when builtin types supported
288259 match struct_id. 0 {
289260 RustDefId :: Adt ( _) => { }
290- RustDefId :: Never => return false ,
291- RustDefId :: Array => return false ,
292261 _ => bug ! ( "Did not use `Adt` variant when expecting adt." ) ,
293262 }
294263 let adt_def_id: DefId = match struct_id. 0 {
@@ -385,8 +354,6 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
385354 chalk_ir:: TypeName :: Adt ( chalk_ir:: AdtId ( rust_def_id) ) => {
386355 use rustc_middle:: traits:: ChalkRustDefId :: * ;
387356 match rust_def_id {
388- Never | Array | FnDef ( _) => Some ( true ) ,
389-
390357 Adt ( adt_def_id) => {
391358 let adt_def = self . tcx . adt_def ( adt_def_id) ;
392359 match adt_def. adt_kind ( ) {
@@ -402,7 +369,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
402369 }
403370 }
404371
405- Trait ( _) | Impl ( _) | AssocTy ( _) | Opaque ( _) => panic ! ( ) ,
372+ FnDef ( _ ) | Trait ( _) | Impl ( _) | AssocTy ( _) | Opaque ( _) => panic ! ( ) ,
406373 }
407374 }
408375 _ => None ,
@@ -420,8 +387,6 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
420387 chalk_ir:: TypeName :: Adt ( chalk_ir:: AdtId ( rust_def_id) ) => {
421388 use rustc_middle:: traits:: ChalkRustDefId :: * ;
422389 match rust_def_id {
423- Never => Some ( false ) ,
424- FnDef ( _) | Array => Some ( true ) ,
425390 Adt ( adt_def_id) => {
426391 let adt_def = self . tcx . adt_def ( adt_def_id) ;
427392 match adt_def. adt_kind ( ) {
@@ -436,7 +401,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
436401 }
437402 }
438403 }
439- Trait ( _) | Impl ( _) | AssocTy ( _) | Opaque ( _) => panic ! ( ) ,
404+ FnDef ( _ ) | Trait ( _) | Impl ( _) | AssocTy ( _) | Opaque ( _) => panic ! ( ) ,
440405 }
441406 }
442407 _ => None ,
0 commit comments