@@ -779,7 +779,9 @@ impl<'gctx> Source for RegistrySource<'gctx> {
779
779
ready ! ( self
780
780
. index
781
781
. query_inner( dep. package_name( ) , & req, & mut * self . ops, & mut |s| {
782
- if dep. matches( s. as_summary( ) ) {
782
+ if matches!( s, IndexSummary :: Candidate ( _) | IndexSummary :: Yanked ( _) )
783
+ && dep. matches( s. as_summary( ) )
784
+ {
783
785
// We are looking for a package from a lock file so we do not care about yank
784
786
callback( s)
785
787
}
@@ -813,13 +815,27 @@ impl<'gctx> Source for RegistrySource<'gctx> {
813
815
// Next filter out all yanked packages. Some yanked packages may
814
816
// leak through if they're in a whitelist (aka if they were
815
817
// previously in `Cargo.lock`
816
- if !s. is_yanked( ) {
817
- callback( s) ;
818
- } else if self . yanked_whitelist. contains( & s. package_id( ) ) {
819
- callback( s) ;
820
- } else if req. is_precise( ) {
821
- precise_yanked_in_use = true ;
822
- callback( s) ;
818
+ match s {
819
+ s @ IndexSummary :: Candidate ( _) => callback( s) ,
820
+ s @ IndexSummary :: Yanked ( _) => {
821
+ if self . yanked_whitelist. contains( & s. package_id( ) ) {
822
+ callback( s) ;
823
+ } else if req. is_precise( ) {
824
+ precise_yanked_in_use = true ;
825
+ callback( s) ;
826
+ }
827
+ }
828
+ IndexSummary :: Unsupported ( summary, v) => {
829
+ tracing:: debug!(
830
+ "unsupported schema version {} ({} {})" ,
831
+ v,
832
+ summary. name( ) ,
833
+ summary. version( )
834
+ ) ;
835
+ }
836
+ IndexSummary :: Offline ( summary) => {
837
+ tracing:: debug!( "offline ({} {})" , summary. name( ) , summary. version( ) ) ;
838
+ }
823
839
}
824
840
} ) ) ?;
825
841
if precise_yanked_in_use {
0 commit comments