@@ -143,6 +143,12 @@ impl<'a> Packages<'a> {
143143                    . filter ( |p| opt_out. iter ( ) . position ( |x| * x == p. name ( ) ) . is_none ( ) ) 
144144                    . collect ( ) 
145145            } 
146+             Packages :: Packages ( packages)  if  packages. is_empty ( )  => { 
147+                 ws. current_opt ( ) 
148+                     . map ( Package :: package_id) 
149+                     . map ( PackageIdSpec :: from_package_id) 
150+                     . into_iter ( ) . collect ( ) 
151+             } 
146152            Packages :: Packages ( packages)  => { 
147153                packages. iter ( ) . map ( |p| PackageIdSpec :: parse ( & p) ) . collect :: < CargoResult < Vec < _ > > > ( ) ?
148154            } 
@@ -231,17 +237,16 @@ pub fn compile_ws<'a>(ws: &Workspace<'a>,
231237            pkgids. push ( p. query ( resolve_with_overrides. iter ( ) ) ?) ; 
232238        } 
233239    }  else  { 
234-         let  root_package = ws. current ( ) ?; 
235-         root_package. manifest ( ) . print_teapot ( ws. config ( ) ) ; 
236-         let  all_features = resolve_all_features ( & resolve_with_overrides, 
237-                                                 root_package. package_id ( ) ) ; 
238-         generate_targets ( root_package,  profiles,  mode,  filter,  & all_features,  release) ?; 
239-         pkgids. push ( root_package. package_id ( ) ) ; 
240+         return  Err ( format ! ( "manifest path `{}` contains no package: The manifest is virtual, \  
241+                       and the workspace has no members.",  ws. current_manifest( ) . display( ) ) . into ( ) ) ; 
240242    } ; 
241243
242244    let  to_builds = pkgids. iter ( ) . map ( |id| { 
243245        packages. get ( id) 
244246    } ) . collect :: < CargoResult < Vec < _ > > > ( ) ?; 
247+     for  p in  to_builds. iter ( )  { 
248+         p. manifest ( ) . print_teapot ( ws. config ( ) ) ; 
249+     } 
245250
246251    let  mut  general_targets = Vec :: new ( ) ; 
247252    let  mut  package_targets = Vec :: new ( ) ; 
0 commit comments