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

compiletest: $DIR replacement logic misses a case on Windows #134066

Closed
jieyouxu opened this issue Dec 9, 2024 · 4 comments
Closed

compiletest: $DIR replacement logic misses a case on Windows #134066

jieyouxu opened this issue Dec 9, 2024 · 4 comments
Assignees
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Dec 9, 2024

See #134056 (comment) for example failure.

-    |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `{closure@E:\rust\tests\ui\traits\fn-pointer\bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
+    |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
detailed failure
---- [ui] tests\ui\traits\fn-pointer\bare-fn-no-impl-fn-ptr-99875.rs stdout ----
  $DIR\bare-fn-no-impl-fn-ptr-99875.rs
  $DIR\bare-fn-no-impl-fn-ptr-99875.rs
  $DIR\bare-fn-no-impl-fn-ptr-99875.rs
  $DIR\bare-fn-no-impl-fn-ptr-99875.rs
  $DIR\bare-fn-no-impl-fn-ptr-99875.rs
  $DIR\bare-fn-no-impl-fn-ptr-99875.rs
  Saved the actual stderr to "E:\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\traits\\fn-pointer\\bare-fn-no-impl-fn-ptr-99875\\bare-fn-no-impl-fn-ptr-99875.stderr"
  diff of stderr:
  
  20	  --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11
  21	   |
  22	LL |     takes(|_: Argument| -> Return { todo!() });
  -	   |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
  +	   |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
  24	   |     |
  25	   |     required by a bound introduced by this call
  26	   |
  
  -	   = help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
  28	   = help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
  29	note: required by a bound in `takes`
  30	  --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9:18
  
  Note: some mismatched output was normalized before being compared
  -	   |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `{closure@E:\rust\tests\ui\traits\fn-pointer\bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
  +	   |     ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
  
  
  The actual stderr differed from the expected stderr.
  To update references, rerun the tests and pass the `--bless` flag
  To only update this specific test, also pass `--test-args traits\fn-pointer\bare-fn-no-impl-fn-ptr-99875.rs`
@jieyouxu jieyouxu added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 9, 2024
@jieyouxu jieyouxu added O-windows Operating system: Windows and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 9, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Dec 9, 2024

The closure contains a path which is not correctly handled.

Test is tests\ui\traits\fn-pointer\bare-fn-no-impl-fn-ptr-99875.rs.

@jieyouxu jieyouxu self-assigned this Dec 9, 2024
@compiler-errors
Copy link
Member

Reminds me of #132161 (comment)

@jieyouxu
Copy link
Member Author

This is actually a duplicate of #132752, I forgor that existed.

@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 8, 2025

FTR, I can no longer reproduce this, no idea why...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Development

No branches or pull requests

3 participants