File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ impl<'gctx> Workspace<'gctx> {
306
306
/// This is useful if the workspace has been updated, such as with `cargo
307
307
/// fix` modifying the `Cargo.toml` file.
308
308
pub fn reload ( & self , gctx : & ' gctx GlobalContext ) -> CargoResult < Workspace < ' gctx > > {
309
- let mut ws = Workspace :: new ( self . root_manifest ( ) , gctx) ?;
309
+ let mut ws = Workspace :: new ( & self . current_manifest , gctx) ?;
310
310
ws. set_resolve_honors_rust_version ( Some ( self . resolve_honors_rust_version ) ) ;
311
311
ws. set_resolve_feature_unification ( self . resolve_feature_unification ) ;
312
312
ws. set_requested_lockfile_path ( self . requested_lockfile_path . clone ( ) ) ;
Original file line number Diff line number Diff line change @@ -2719,7 +2719,7 @@ fn nonexistence_package_together_with_workspace() {
2719
2719
2720
2720
// A failing case from <https://github.com/rust-lang/cargo/issues/15625>
2721
2721
#[ cargo_test]
2722
- fn clippy_fix_all_members_in_a_workspace ( ) {
2722
+ fn fix_only_check_manifest_path_member ( ) {
2723
2723
let p = project ( )
2724
2724
. file (
2725
2725
"Cargo.toml" ,
@@ -2751,8 +2751,11 @@ fn clippy_fix_all_members_in_a_workspace() {
2751
2751
. file ( "bar/src/main.rs" , "fn main() {}" )
2752
2752
. build ( ) ;
2753
2753
2754
- p. cargo ( "clippy --manifest-path foo/Cargo.toml --fix --allow-no-vcs" )
2755
- . with_stderr_contains ( "[CHECKING] foo v0.1.0 ([ROOT]/foo/foo)" )
2756
- . with_stderr_contains ( "[CHECKING] bar v0.1.0 ([ROOT]/foo/bar)" )
2754
+ p. cargo ( "fix --manifest-path foo/Cargo.toml --allow-no-vcs" )
2755
+ . with_stderr_data ( str![ [ r#"
2756
+ [CHECKING] foo v0.1.0 ([ROOT]/foo/foo)
2757
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
2758
+
2759
+ "# ] ] )
2757
2760
. run ( ) ;
2758
2761
}
You can’t perform that action at this time.
0 commit comments