Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate outputs in compile message. #5128

Closed
zoumi opened this issue Mar 6, 2018 · 7 comments
Closed

Duplicate outputs in compile message. #5128

zoumi opened this issue Mar 6, 2018 · 7 comments
Labels
A-console-output Area: Terminal output, colors, progress bar, etc.

Comments

@zoumi
Copy link

zoumi commented Mar 6, 2018

Here is the compile error message:

cargo test
   Compiling zmrequest v0.1.0 (file:///H:/work/rust_projects/zmrequest)
error[E0499]: cannot borrow `self._cookies` as mutable more than once at a time
   --> src\cookiejar.rs:104:17
    |
98  |         match self._cookies.get_mut(host)
    |               ------------- first mutable borrow occurs here
...
104 |                 self._cookies.insert(host.to_owned(),m);
    |                 ^^^^^^^^^^^^^ second mutable borrow occurs here
105 |             }
106 |         }
    |         - first borrow ends here

error[E0499]: cannot borrow `self._cookies` as mutable more than once at a time
   --> src\cookiejar.rs:104:17
    |
98  |         match self._cookies.get_mut(host)
    |               ------------- first mutable borrow occurs here
...
104 |                 self._cookies.insert(host.to_owned(),m);
    |                 ^^^^^^^^^^^^^ second mutable borrow occurs here
105 |             }
106 |         }
    |         - first borrow ends here

error: aborting due to previous error

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain If you want more information on this error, try using "rustc --explain E0499E0499"
"
error: Could not compile `zmrequest`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `zmrequest`.

To learn more, run the command again with --verbose.

Rust version:

rustup show
Default host: x86_64-pc-windows-gnu

installed toolchains
--------------------

nightly-i686-pc-windows-gnu (default)
nightly-i686-pc-windows-msvc

active toolchain
----------------

nightly-i686-pc-windows-gnu (default)
rustc 1.26.0-nightly (3eeb5a665 2018-03-01)
@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 6, 2018

Might be related: rust-lang/rust#48640

@zoumi when you run "cargo test --verbose", do these errors originate from 2 different rustc invocations?

@zoumi
Copy link
Author

zoumi commented Mar 6, 2018

I think it's the same as : rust-lang/rust#48640

cargo test --verbose
       Fresh winapi-build v0.1.1
       .....
       Fresh reqwest v0.8.5
   Compiling zmrequest v0.1.0 (file:///H:/work/rust_projects/zmrequest)
     Running `rustc --crate-name zmrequest 'src\lib.rs' --emit=dep-info,link -C debuginfo=2 --test -C metadata=66f895199465c7e0 -C extra-filename=-66f895199465c7e0 --out-dir 'E:\rustdir\target\debug\deps' -C 'incremental=E:\rustdir\target\debug\incremental' -L 'dependency=E:\rustdir\target\debug\deps' --extern 'reqwest=E:\rustdir\target\debug\deps\libreqwest-e276a59afc70f516.rlib' --extern 'time=E:\rustdir\target\debug\deps\libtime-886cb4ae66b63b36.rlib' --extern 'serde=E:\rustdir\target\debug\deps\libserde-c5f4b337a26d7bf0.rlib' -L 'E:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\lib' -L 'E:\rustdir\target\debug' -L 'native=E:\rustdir\registry\src\mirrors.ustc.edu.cn-27933024a10d4e91\winapi-i686-pc-windows-gnu-0.4.0\lib'`
     Running `rustc --crate-name zmrequest 'src\lib.rs' --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=a66701ba614f9949 -C extra-filename=-a66701ba614f9949 --out-dir 'E:\rustdir\target\debug\deps' -C 'incremental=E:\rustdir\target\debug\incremental' -L 'dependency=E:\rustdir\target\debug\deps' --extern 'reqwest=E:\rustdir\target\debug\deps\libreqwest-e276a59afc70f516.rlib' --extern 'time=E:\rustdir\target\debug\deps\libtime-886cb4ae66b63b36.rlib' --extern 'serde=E:\rustdir\target\debug\deps\libserde-c5f4b337a26d7bf0.rlib' -L 'E:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\lib' -L 'E:\rustdir\target\debug' -L 'native=E:\rustdir\registry\src\mirrors.ustc.edu.cn-27933024a10d4e91\winapi-i686-pc-windows-gnu-0.4.0\lib'`
error[E0499]: cannot borrow `self._cookies` as mutable more than once at a time
   --> src\cookiejar.rs:104:17
    |
98  |         match self._cookies.get_mut(host)
    |               ------------- first mutable borrow occurs here
...
104 |                 self._cookies.insert(host.to_owned(),m);
    |                 ^^^^^^^^^^^^^ second mutable borrow occurs here
105 |             }
106 |         }
    |         - first borrow ends here

error[E0499]: cannot borrow `self._cookies` as mutable more than once at a time
   --> src\cookiejar.rs:104:17
    |
98  |         match self._cookies.get_mut(host)
    |               ------------- first mutable borrow occurs here
...
104 |                 self._cookies.insert(host.to_owned(),m);
    |                 ^^^^^^^^^^^^^ second mutable borrow occurs here
105 |             }
106 |         }
    |         - first borrow ends here

error: aborting due to previous error

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0499"
If you want more information on this error, try using "rustc --explain E0499"
error: Could not compile `zmrequest`.

Caused by:
  process didn't exit successfully: `rustc --crate-name zmrequest src\lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=a66701ba614f9949 -C extra-filename=-a66701ba614f9949 --out-dir E:\rustdir\target\debug\deps -C incremental=E:\rustdir\target\debug\incremental -L dependency=E:\rustdir\target\debug\deps --extern reqwest=E:\rustdir\target\debug\deps\libreqwest-e276a59afc70f516.rlib --extern time=E:\rustdir\target\debug\deps\libtime-886cb4ae66b63b36.rlib --extern serde=E:\rustdir\target\debug\deps\libserde-c5f4b337a26d7bf0.rlib -L E:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\lib -L E:\rustdir\target\debug -L native=E:\rustdir\registry\src\mirrors.ustc.edu.cn-27933024a10d4e91\winapi-i686-pc-windows-gnu-0.4.0\lib` (exit code: 101)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `zmrequest`.

Caused by:
  process didn't exit successfully: `rustc --crate-name zmrequest src\lib.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=66f895199465c7e0 -C extra-filename=-66f895199465c7e0 --out-dir E:\rustdir\target\debug\deps -C incremental=E:\rustdir\target\debug\incremental -L dependency=E:\rustdir\target\debug\deps --extern reqwest=E:\rustdir\target\debug\deps\libreqwest-e276a59afc70f516.rlib --extern time=E:\rustdir\target\debug\deps\libtime-886cb4ae66b63b36.rlib --extern serde=E:\rustdir\target\debug\deps\libserde-c5f4b337a26d7bf0.rlib -L E:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\lib -L E:\rustdir\target\debug -L native=E:\rustdir\registry\src\mirrors.ustc.edu.cn-27933024a10d4e91\winapi-i686-pc-windows-gnu-0.4.0\lib` (exit code: 101)

@zoumi zoumi closed this as completed Mar 6, 2018
@matthiaskrgr
Copy link
Member

Maybe we should keep open the issue here? I guess this is rather a cargo issue than a rustc issue...

@zoumi zoumi reopened this Mar 6, 2018
@alexcrichton
Copy link
Member

There's a lot more info and linked issues from #1198, but this is unlikely to get fixed.

@timxor
Copy link

timxor commented May 29, 2018

Getting the similar output on new macbook. Thread mentioned above is many years old. Anyone get this fixed?

@ehuss ehuss added the A-console-output Area: Terminal output, colors, progress bar, etc. label Apr 6, 2020
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Oct 3, 2020
This matches Cargo behavior and avoids the (somewhat expensive) double checking,
as well as the unfortunate duplicate error messages (rust-lang#76822,
rust-lang/cargo#5128).
@rsalmei
Copy link

rsalmei commented Dec 13, 2020

Please, why is this unlikely to be fixed? Is it really the intended behavior?
The errors rust gives us are dense, we shouldn't have to interpret them twice.
It pollutes the view too much, and ruins user experience, at least mine.

There's lots of closed issues about this, it took me some time to find one still open, maybe this should get some attention.
Thank you.

December 2020
stable-x86_64-apple-darwin (default)
rustc 1.48.0 (7eac88abb 2020-11-16)

image

@ehuss
Copy link
Contributor

ehuss commented Oct 24, 2021

Closing as this should be fixed by #9675.

@ehuss ehuss closed this as completed Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-console-output Area: Terminal output, colors, progress bar, etc.
Projects
None yet
Development

No branches or pull requests

6 participants