-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add note for mismatched types because of circular dependencies #105793
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
9888a9d
to
88c4259
Compare
src/tools/compiletest/src/runtest.rs
Outdated
@@ -379,7 +381,7 @@ impl<'test> TestCx<'test> { | |||
} | |||
} | |||
|
|||
fn run_rpass_test(&self) { | |||
fn run_pass_test(&self, run: bool) { | |||
let emit_metadata = self.should_emit_metadata(self.pass_mode()); | |||
let should_run = self.run_if_enabled(); | |||
let proc_res = self.compile_test(should_run, emit_metadata); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is passing misleading input into compile_test via should_run, I'm not sure if we should try to reuse run_pass_test across run and not-run modes like this. At minimum coupling run
into should_run
probably is necessary.
88c4259
to
22b87e5
Compare
Apologies for the delay in reviewing @lukas-code, unless labels are updated I at least don't see PRs. @rustbot author |
f43817d
to
18335ad
Compare
18335ad
to
97915ab
Compare
I rebased and addressed the review comments. @rustbot ready |
@bors r+ rollup |
Rollup of 10 pull requests Successful merges: - rust-lang#104100 (Allow using `Range` as an `Iterator` in const contexts. ) - rust-lang#105793 (Add note for mismatched types because of circular dependencies) - rust-lang#108798 (move default backtrace setting to sys) - rust-lang#108829 (Use Edition 2021 :pat in matches macro) - rust-lang#108973 (Beautify pin! docs) - rust-lang#109003 (Add `useless_anonymous_reexport` lint) - rust-lang#109022 (read_buf_exact: on error, all read bytes are appended to the buffer) - rust-lang#109212 (fix: don't suggest similar method when unstable) - rust-lang#109243 (The name of NativeLib will be presented) - rust-lang#109324 (Implement FixedSizeEncoding for UnusedGenericParams.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
If you have crate A with a dependency on crate B, and crate B with a dev-dependency on A, then you might see "mismatched types" errors on types that seem to be equal. This PR adds a note that explains that the types are different, because crate B is compiled twice, one time with
cfg(test)
and one time without.I haven't found a good way to create circular dependencies in UI tests, so I abused the incremental tests instead. As a bonus, incremental tests support "cpass" now.
related to #22750