rust icon indicating copy to clipboard operation
rust copied to clipboard

Suggest correct path in include_bytes!

Open kornelski opened this issue 1 year ago • 15 comments

include_bytes! paths are relative, and I'm often not sure how nested is the .rs file that I'm editing, so I have to guess the number of "../..". This change searches .. and ../.. for the given file and offers corrected path as a suggestion.

I wasn't sure how to get the right span, and how to properly escape it.

error: couldn't read src/file.txt: No such file or directory (os error 2)
 --> src/main.rs:2:13
  |
2 |     let x = include_bytes!("file.txt");
  |             ^^^^^^^^^^^^^^^----------^
  |                            |
  |                            help: it's in a parent directory: `"../../file.txt"`

kornelski avatar Mar 01 '24 03:03 kornelski

r? @estebank

rustbot has assigned @estebank. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Mar 01 '24 03:03 rustbot

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=kornelski
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_69c6c932-010d-4d30-8e6f-f454fc33aa51
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=02e65fb471ad80dca07b61b10227d0b068bdb96c
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_69c6c932-010d-4d30-8e6f-f454fc33aa51
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_69c6c932-010d-4d30-8e6f-f454fc33aa51
GITHUB_TRIGGERING_ACTOR=kornelski
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/121833/merge
GITHUB_WORKFLOW_SHA=02e65fb471ad80dca07b61b10227d0b068bdb96c
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_20_X64=/opt/hostedtoolcache/go/1.20.14/x64
---
#12 writing image sha256:e14ebe583639c86388ce830928c6fbdab0ff1af6bfdb8ce7791e94038b47ba3d done
#12 naming to docker.io/library/rust-ci done
#12 DONE 10.1s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Fri Mar  1 03:38:01 UTC 2024
  network time: Fri, 01 Mar 2024 03:38:01 GMT
  network time: Fri, 01 Mar 2024 03:38:01 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
---- [ui] tests/ui/include-macros/parent_dir.rs stdout ----

error: /checkout/tests/ui/include-macros/parent_dir.rs:2: unexpected error: '2:13: 2:52: couldn't read $DIR/include-macros/file.txt: No such file or directory (os error 2)'

error: /checkout/tests/ui/include-macros/parent_dir.rs:2: expected error not found: coudln't read
error: 1 unexpected errors found, 1 expected errors not found
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/include-macros/parent_dir.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/include-macros/parent_dir" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/include-macros/parent_dir/auxiliary"
unexpected errors (from JSON output): [
unexpected errors (from JSON output): [
    Error {
        line_num: 2,
        kind: Some(
            Error,
        ),
        msg: "2:13: 2:52: couldn't read $DIR/include-macros/file.txt: No such file or directory (os error 2)",
]

not found errors (from test file): [
    Error {
    Error {
        line_num: 2,
        kind: Some(
            Error,
        ),
        msg: "coudln't read",
]

thread '[ui] tests/ui/include-macros/parent_dir.rs' panicked at src/tools/compiletest/src/runtest.rs:1845:13:
explicit panic

rust-log-analyzer avatar Mar 01 '24 03:03 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #121998) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 05 '24 00:03 bors

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=kornelski
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_b6016a90-4616-40e8-9a85-4097e2b54dea
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=1df225115d4affbca8bc806ed9c7ab141c17feef
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_b6016a90-4616-40e8-9a85-4097e2b54dea
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_b6016a90-4616-40e8-9a85-4097e2b54dea
GITHUB_TRIGGERING_ACTOR=kornelski
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/121833/merge
GITHUB_WORKFLOW_SHA=1df225115d4affbca8bc806ed9c7ab141c17feef
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_20_X64=/opt/hostedtoolcache/go/1.20.14/x64
---
#12 writing image sha256:eaf9cd2ca4ce2a7e2b604fd9126d0a8ece7088b5c93fd4c1f97ec6dd21185222 done
#12 naming to docker.io/library/rust-ci done
#12 DONE 10.2s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Tue Mar  5 12:41:15 UTC 2024
  network time: Tue, 05 Mar 2024 12:41:15 GMT
  network time: Tue, 05 Mar 2024 12:41:15 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---

---- [ui] tests/ui/include-macros/parent_dir.rs stdout ----
diff of stderr:

- error: couldn't read $DIR/include-macros/file.txt: No such file or directory (os error 2)
+ error: couldn't read `$DIR/include-macros/file.txt`: No such file or directory (os error 2)
3    |
3    |
4 LL |     let _ = include_str!("include-macros/file.txt");
-    |             ^^^^^^^^^^^^^-------------------------^
-    |                          |
-    |                          |
-    |                          help: there is a file in another directory: `"file.txt"`
8    |
9    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: there is a file with the same name in a different directory
+    |
+    |
+ LL |     let _ = include_str!("file.txt");
10 
- error: couldn't read $DIR/hello.rs: No such file or directory (os error 2)
- error: couldn't read $DIR/hello.rs: No such file or directory (os error 2)
+ error: couldn't read `$DIR/hello.rs`: No such file or directory (os error 2)
13    |
13    |
14 LL |     let _ = include_str!("hello.rs");
-    |             ^^^^^^^^^^^^^----------^
-    |                          |
-    |                          |
-    |                          help: there is a file in another directory: `"../hello.rs"`
18    |
19    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: there is a file with the same name in a different directory
+    |
+    |
+ LL |     let _ = include_str!("../hello.rs");
20 
20 
- error: couldn't read $DIR/../../data.bin: No such file or directory (os error 2)
+ error: couldn't read `$DIR/../../data.bin`: No such file or directory (os error 2)
23    |
23    |
24 LL |     let _ = include_bytes!("../../data.bin");
-    |             ^^^^^^^^^^^^^^^----------------^
-    |                            |
-    |                            |
-    |                            help: there is a file in another directory: `"data.bin"`
28    |
29    = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: there is a file with the same name in a different directory
+    |
+    |
+ LL |     let _ = include_bytes!("data.bin");
30 
- error: couldn't read $DIR/tests/ui/include-macros/file.txt: No such file or directory (os error 2)
- error: couldn't read $DIR/tests/ui/include-macros/file.txt: No such file or directory (os error 2)
+ error: couldn't read `$DIR/tests/ui/include-macros/file.txt`: No such file or directory (os error 2)
33    |
33    |
34 LL |     let _ = include_str!("tests/ui/include-macros/file.txt");
-    |             ^^^^^^^^^^^^^----------------------------------^
-    |                          |
-    |                          |
-    |                          help: there is a file in another directory: `"file.txt"`
38    |
39    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: there is a file with the same name in a different directory
+    |
+    |
+ LL |     let _ = include_str!("file.txt");
40 
41 error: aborting due to 4 previous errors
42 

---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/include-macros/parent_dir.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/include-macros/parent_dir" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/include-macros/parent_dir/auxiliary"
stdout: none
--- stderr -------------------------------
error: couldn't read `/checkout/tests/ui/include-macros/include-macros/file.txt`: No such file or directory (os error 2)
   |
   |
LL |     let _ = include_str!("include-macros/file.txt");            //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("file.txt");            //~ ERROR couldn't read


error: couldn't read `/checkout/tests/ui/include-macros/hello.rs`: No such file or directory (os error 2)
   |
   |
LL |     let _ = include_str!("hello.rs");                           //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("../hello.rs");                           //~ ERROR couldn't read


error: couldn't read `/checkout/tests/ui/include-macros/../../data.bin`: No such file or directory (os error 2)
   |
   |
LL |     let _ = include_bytes!("../../data.bin");                   //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_bytes!("data.bin");                   //~ ERROR couldn't read


error: couldn't read `/checkout/tests/ui/include-macros/tests/ui/include-macros/file.txt`: No such file or directory (os error 2)
   |
   |
LL |     let _ = include_str!("tests/ui/include-macros/file.txt");   //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("file.txt");   //~ ERROR couldn't read

error: aborting due to 4 previous errors
------------------------------------------



---- [ui] tests/ui/macros/macros-nonfatal-errors.rs stdout ----
diff of stderr:

200 LL |     include_str!(invalid);
201    |                  ^^^^^^^
202 
- error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
+ error: couldn't read `$DIR/i'd be quite surprised if a file with this name existed`: No such file or directory (os error 2)
205    |
205    |
206 LL |     include_str!("i'd be quite surprised if a file with this name existed");

214 LL |     include_bytes!(invalid);
216 
Build completed unsuccessfully in 0:13:04
Build completed unsuccessfully in 0:13:04
- error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
+ error: couldn't read `$DIR/i'd be quite surprised if a file with this name existed`: No such file or directory (os error 2)
219    |
219    |
220 LL |     include_bytes!("i'd be quite surprised if a file with this name existed");

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macros-nonfatal-errors/macros-nonfatal-errors.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args macros/macros-nonfatal-errors.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/macros-nonfatal-errors.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macros-nonfatal-errors" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macros-nonfatal-errors/auxiliary"
stdout: none
--- stderr -------------------------------
error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     #[default] //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL | struct DefaultInnerAttrTupleStruct(#[default] ());
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL | #[default] //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL | #[default] //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     Foo = #[default] 0, //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     Bar([u8; #[default] 1]), //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`

error: no default declared
error: no default declared
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:42:10
   |
LL | #[derive(Default)] //~ ERROR no default declared
   |
   |
   = help: make a unit variant default by placing `#[default]` above it
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
error: multiple declared defaults
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:48:10
   |
   |
LL | #[derive(Default)] //~ ERROR multiple declared defaults
...
LL |     Foo,
   |     --- first default
LL |     #[default]
---
   |
   = note: only one variant can be default
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `#[default]` attribute does not accept a value
   |
   |
LL |     #[default = 1] //~ ERROR `#[default]` attribute does not accept a value
   |
   = help: try using `#[default]`


error: multiple `#[default]` attributes
   |
LL |     #[default]
LL |     #[default]
   |     ---------- `#[default]` used here
LL |     #[default]
   |     ---------- `#[default]` used again here
LL |     Foo, //~ERROR multiple `#[default]` attributes
   |
   |
   = note: only one `#[default]` attribute is needed
  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:67:5
   |
LL |     #[default]
   |     ^^^^^^^^^^
   |     ^^^^^^^^^^

error: multiple `#[default]` attributes
   |
LL |     #[default]
LL |     #[default]
   |     ---------- `#[default]` used here
LL |     #[default]
   |     ---------- `#[default]` used again here
...
LL |     Foo, //~ERROR multiple `#[default]` attributes
   |
   |
   = note: only one `#[default]` attribute is needed
  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:75:5
   |
LL |     #[default]
   |     ^^^^^^^^^^
   |     ^^^^^^^^^^
LL |     #[default]
   |     ^^^^^^^^^^
LL |     #[default]
   |     ^^^^^^^^^^

error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     Foo {}, //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`

error: default variant must be exhaustive
error: default variant must be exhaustive
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:93:5
   |
LL |     #[non_exhaustive]
   |     ----------------- declared `#[non_exhaustive]` here
LL |     Foo, //~ ERROR default variant must be exhaustive
   |
   = help: consider a manual implementation of `Default`

error: asm template must be a string literal
error: asm template must be a string literal
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:98:10
   |
LL |     asm!(invalid); //~ ERROR


error: `concat_idents!()` requires ident args
   |
   |
LL |     concat_idents!("not", "idents"); //~ ERROR

error: argument must be a string literal
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:103:17
   |
   |
LL |     option_env!(invalid); //~ ERROR

error: expected string literal
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:104:10
   |
   |
LL |     env!(invalid); //~ ERROR


error: `env!()` takes 1 or 2 arguments
   |
   |
LL |     env!(foo, abr, baz); //~ ERROR

error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined at compile time
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:106:5
   |
   |
LL |     env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
   |

rust-log-analyzer avatar Mar 05 '24 12:03 rust-log-analyzer

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=kornelski
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_d035aacf-abc0-4a73-8005-ce992b2fe168
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=b94a34e5f8aa74bbfd71a84dc384f1fe785859b4
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_d035aacf-abc0-4a73-8005-ce992b2fe168
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_d035aacf-abc0-4a73-8005-ce992b2fe168
GITHUB_TRIGGERING_ACTOR=kornelski
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/121833/merge
GITHUB_WORKFLOW_SHA=b94a34e5f8aa74bbfd71a84dc384f1fe785859b4
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_20_X64=/opt/hostedtoolcache/go/1.20.14/x64
---
#12 writing image sha256:41c143d5c27fc973825c12acbd273bf4ab9ca4e8b1a37b00fda77deae7a59c08 done
#12 naming to docker.io/library/rust-ci done
#12 DONE 10.1s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Tue Mar  5 14:02:56 UTC 2024
  network time: Tue, 05 Mar 2024 14:02:56 GMT
  network time: Tue, 05 Mar 2024 14:02:56 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---

200 LL |     include_str!(invalid);
201    |                  ^^^^^^^
202 
- error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
+ error: couldn't read `$DIR/i'd be quite surprised if a file with this name existed`: No such file or directory (os error 2)
205    |
205    |
206 LL |     include_str!("i'd be quite surprised if a file with this name existed");

214 LL |     include_bytes!(invalid);
216 
216 
- error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
+ error: couldn't read `$DIR/i'd be quite surprised if a file with this name existed`: No such file or directory (os error 2)
219    |
219    |
220 LL |     include_bytes!("i'd be quite surprised if a file with this name existed");

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macros-nonfatal-errors/macros-nonfatal-errors.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args macros/macros-nonfatal-errors.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/macros-nonfatal-errors.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macros-nonfatal-errors" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macros-nonfatal-errors/auxiliary"
stdout: none
--- stderr -------------------------------
error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     #[default] //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`
Build completed unsuccessfully in 0:12:53


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL | struct DefaultInnerAttrTupleStruct(#[default] ());
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL | #[default] //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL | #[default] //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     Foo = #[default] 0, //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`


error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     Bar([u8; #[default] 1]), //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`

error: no default declared
error: no default declared
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:42:10
   |
LL | #[derive(Default)] //~ ERROR no default declared
   |
   |
   = help: make a unit variant default by placing `#[default]` above it
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
error: multiple declared defaults
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:48:10
   |
   |
LL | #[derive(Default)] //~ ERROR multiple declared defaults
...
LL |     Foo,
   |     --- first default
LL |     #[default]
---
   |
   = note: only one variant can be default
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `#[default]` attribute does not accept a value
   |
   |
LL |     #[default = 1] //~ ERROR `#[default]` attribute does not accept a value
   |
   = help: try using `#[default]`


error: multiple `#[default]` attributes
   |
LL |     #[default]
LL |     #[default]
   |     ---------- `#[default]` used here
LL |     #[default]
   |     ---------- `#[default]` used again here
LL |     Foo, //~ERROR multiple `#[default]` attributes
   |
   |
   = note: only one `#[default]` attribute is needed
  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:67:5
   |
LL |     #[default]
   |     ^^^^^^^^^^
   |     ^^^^^^^^^^

error: multiple `#[default]` attributes
   |
LL |     #[default]
LL |     #[default]
   |     ---------- `#[default]` used here
LL |     #[default]
   |     ---------- `#[default]` used again here
...
LL |     Foo, //~ERROR multiple `#[default]` attributes
   |
   |
   = note: only one `#[default]` attribute is needed
  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:75:5
   |
LL |     #[default]
   |     ^^^^^^^^^^
   |     ^^^^^^^^^^
LL |     #[default]
   |     ^^^^^^^^^^
LL |     #[default]
   |     ^^^^^^^^^^

error: the `#[default]` attribute may only be used on unit enum variants
   |
   |
LL |     Foo {}, //~ ERROR the `#[default]` attribute may only be used on unit enum variants
   |
   = help: consider a manual implementation of `Default`

error: default variant must be exhaustive
error: default variant must be exhaustive
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:93:5
   |
LL |     #[non_exhaustive]
   |     ----------------- declared `#[non_exhaustive]` here
LL |     Foo, //~ ERROR default variant must be exhaustive
   |
   = help: consider a manual implementation of `Default`

error: asm template must be a string literal
error: asm template must be a string literal
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:98:10
   |
LL |     asm!(invalid); //~ ERROR


error: `concat_idents!()` requires ident args
   |
   |
LL |     concat_idents!("not", "idents"); //~ ERROR

error: argument must be a string literal
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:103:17
   |
   |
LL |     option_env!(invalid); //~ ERROR

error: expected string literal
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:104:10
   |
   |
LL |     env!(invalid); //~ ERROR


error: `env!()` takes 1 or 2 arguments
   |
   |
LL |     env!(foo, abr, baz); //~ ERROR

error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined at compile time
##[error]  --> /checkout/tests/ui/macros/macros-nonfatal-errors.rs:106:5
   |
   |
LL |     env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
   |

rust-log-analyzer avatar Mar 05 '24 14:03 rust-log-analyzer

@bors r+

estebank avatar Mar 06 '24 17:03 estebank

:pushpin: Commit da8cbe40fe1a444051a98e754e9a33549ef676a5 has been approved by estebank

It is now in the queue for this repository.

bors avatar Mar 06 '24 17:03 bors

@bors r-
https://github.com/rust-lang/rust/pull/122097#issuecomment-1981747081

matthiaskrgr avatar Mar 06 '24 21:03 matthiaskrgr

Oh! There's platform specific text :-/

You'll have to make these tests use "revisions" targeting windows and linux separately in the same file.

estebank avatar Mar 07 '24 04:03 estebank

@bors r+

estebank avatar Mar 07 '24 22:03 estebank

:pushpin: Commit 25ab1c70734f101596e8703d8c3a4e65da55ec01 has been approved by estebank

It is now in the queue for this repository.

bors avatar Mar 07 '24 22:03 bors

@bors rollup

Nadrieril avatar Mar 09 '24 20:03 Nadrieril

@bors r- rollup=iffy https://github.com/rust-lang/rust/pull/122273#issuecomment-1987161358

matthiaskrgr avatar Mar 10 '24 09:03 matthiaskrgr

Failed in https://github.com/rust-lang/rust/pull/122273#issuecomment-1987161358

@bors r- rollup=iffy

workingjubilee avatar Mar 10 '24 09:03 workingjubilee

@matthiaskrgr jinx

workingjubilee avatar Mar 10 '24 09:03 workingjubilee

:umbrella: The latest upstream changes (presumably #121589) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 13 '24 15:03 bors

I've resolved conflicts and rebased. It's ready to merge.

kornelski avatar Mar 19 '24 18:03 kornelski

@rustbot r=estebank

workingjubilee avatar Mar 19 '24 18:03 workingjubilee

@estebank bors needs to be told to merge this

kornelski avatar Mar 24 '24 22:03 kornelski

...

workingjubilee avatar Mar 25 '24 00:03 workingjubilee

doh. @bors r=estebank

workingjubilee avatar Mar 25 '24 00:03 workingjubilee

:pushpin: Commit 502e254bfb201e619e17d76569debef6f737c7e6 has been approved by estebank

It is now in the queue for this repository.

bors avatar Mar 25 '24 00:03 bors

:hourglass: Testing commit 502e254bfb201e619e17d76569debef6f737c7e6 with merge f9cae7882eb22ffb5c3bec6ee9e9d0d861b878fc...

bors avatar Mar 25 '24 00:03 bors

The job i686-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
$DIR\tests
$DIR\parent_dir.rs
diff of stderr:

- error: couldn't read `$DIR/include-macros/file.txt`: $FILE_NOT_FOUND_MSG (os error 2)
+ error: couldn't read `$DIR/include-macros/file.txt`: $FILE_NOT_FOUND_MSG (os error 3)
3    |
3    |
4 LL |     let _ = include_str!("include-macros/file.txt");
20 help: there is a file with the same name in a different directory
21    |
21    |
22 LL |     let _ = include_str!("../hello.rs");
+    |                          ~~~~~~~~~~~~~~
24 
24 
25 error: couldn't read `$DIR/../../data.bin`: $FILE_NOT_FOUND_MSG (os error 2)


34 LL |     let _ = include_bytes!("data.bin");
36 
36 
- error: couldn't read `$DIR/tests/ui/include-macros/file.txt`: $FILE_NOT_FOUND_MSG (os error 2)
+ error: couldn't read `$DIR/tests/ui/include-macros/file.txt`: $FILE_NOT_FOUND_MSG (os error 3)
39    |
39    |
40 LL |     let _ = include_str!("tests/ui/include-macros/file.txt");

The actual stderr differed from the expected stderr.
Actual stderr saved to C:\a\rust\rust\build\i686-pc-windows-msvc\test\ui\include-macros\parent_dir\parent_dir.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args include-macros\parent_dir.rs`

error: 1 errors occurred comparing output.
status: exit code: 1
command: PATH="C:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x86;C:\a\rust\rust\build\i686-pc-windows-msvc\stage0-bootstrap-tools\i686-pc-windows-msvc\release\deps;C:\a\rust\rust\build\i686-pc-windows-msvc\stage0\bin;C:\Program Files\PowerShell\7;C:\a\_temp\msys64\mingw32\bin;C:\a\_temp\msys64\usr\local\bin;C:\a\_temp\msys64\usr\bin;C:\a\_temp\msys64\usr\bin;C:\a\rust\rust\ninja;C:\hostedtoolcache\windows\Python\3.12.2\x64\Scripts;C:\hostedtoolcache\windows\Python\3.12.2\x64;C:\a\rust\rust\sccache;C:\a\_temp\setup-msys2;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.15.3\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\R\R-4.3.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.8\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\3.0.6\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.402-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;C:\a\_temp\msys64\usr\bin\site_perl;C:\a\_temp\msys64\usr\bin\vendor_perl;C:\a\_temp\msys64\usr\bin\core_perl" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage2\\bin\\rustc.exe" "C:\\a\\rust\\rust\\tests\\ui\\include-macros\\parent_dir.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "--sysroot" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage2" "--target=i686-pc-windows-msvc" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\ui\\include-macros\\parent_dir" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\native\\rust-test-helpers" "-L" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\test\\ui\\include-macros\\parent_dir\\auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\include-macros/file.txt`: The system cannot find the path specified. (os error 3)
   |
   |
LL |     let _ = include_str!("include-macros/file.txt");            //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("file.txt");            //~ ERROR couldn't read


error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\hello.rs`: The system cannot find the file specified. (os error 2)
   |
   |
LL |     let _ = include_str!("hello.rs");                           //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("..\\hello.rs");                           //~ ERROR couldn't read


error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\../../data.bin`: The system cannot find the file specified. (os error 2)
   |
   |
LL |     let _ = include_bytes!("../../data.bin");                   //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_bytes!("data.bin");                   //~ ERROR couldn't read


error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\tests/ui/include-macros/file.txt`: The system cannot find the path specified. (os error 3)
   |
   |
LL |     let _ = include_str!("tests/ui/include-macros/file.txt");   //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("file.txt");   //~ ERROR couldn't read

error: aborting due to 4 previous errors
------------------------------------------

---

test result: FAILED. 16164 passed; 1 failed; 300 ignored; 0 measured; 2 filtered out; finished in 428.02s

Build completed unsuccessfully in 0:40:08
Some tests failed in compiletest suite=ui mode=ui host=i686-pc-windows-msvc target=i686-pc-windows-msvc
make: *** [Makefile:73: ci-msvc-ps1] Error 1
  network time: Mon, 25 Mar 2024 01:31:58 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

rust-log-analyzer avatar Mar 25 '24 01:03 rust-log-analyzer

:broken_heart: Test failed - checks-actions

bors avatar Mar 25 '24 01:03 bors

I've made error message normalization normalize the error code too

kornelski avatar Mar 25 '24 03:03 kornelski

@bors r=estebank

workingjubilee avatar Mar 26 '24 01:03 workingjubilee

:pushpin: Commit 0e4d790e5147cd67da135662e5819b99a995493c has been approved by estebank

It is now in the queue for this repository.

bors avatar Mar 26 '24 01:03 bors

:hourglass: Testing commit 0e4d790e5147cd67da135662e5819b99a995493c with merge b47a37760a01332dbfda3d14f1ca67e4fbd0fcb5...

bors avatar Mar 26 '24 04:03 bors

The job x86_64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
diff of stderr:

20 help: there is a file with the same name in a different directory
21    |
22 LL |     let _ = include_str!("../hello.rs");
+    |                          ~~~~~~~~~~~~~~
24 
24 
25 error: couldn't read `$DIR/../../data.bin`: $FILE_NOT_FOUND_MSG


The actual stderr differed from the expected stderr.
Actual stderr saved to C:\a\rust\rust\build\x86_64-pc-windows-msvc\test\ui\include-macros\parent_dir\parent_dir.stderr
Actual stderr saved to C:\a\rust\rust\build\x86_64-pc-windows-msvc\test\ui\include-macros\parent_dir\parent_dir.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args include-macros\parent_dir.rs`

error: 1 errors occurred comparing output.
status: exit code: 1
command: PATH="C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin;C:\Program Files\PowerShell\7;C:\a\_temp\msys64\mingw64\bin;C:\a\_temp\msys64\usr\local\bin;C:\a\_temp\msys64\usr\bin;C:\a\_temp\msys64\usr\bin;C:\a\rust\rust\ninja;C:\hostedtoolcache\windows\Python\3.12.2\x64\Scripts;C:\hostedtoolcache\windows\Python\3.12.2\x64;C:\a\rust\rust\sccache;C:\a\_temp\setup-msys2;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.15.3\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\R\R-4.3.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.8\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\3.0.6\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.402-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;C:\a\_temp\msys64\usr\bin\site_perl;C:\a\_temp\msys64\usr\bin\vendor_perl;C:\a\_temp\msys64\usr\bin\core_perl" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "C:\\a\\rust\\rust\\tests\\ui\\include-macros\\parent_dir.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "--sysroot" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2" "--target=x86_64-pc-windows-msvc" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\include-macros\\parent_dir" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "-L" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\include-macros\\parent_dir\\auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\include-macros/file.txt`: The system cannot find the path specified. (os error 3)
   |
   |
LL |     let _ = include_str!("include-macros/file.txt");            //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("file.txt");            //~ ERROR couldn't read


error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\hello.rs`: The system cannot find the file specified. (os error 2)
   |
   |
LL |     let _ = include_str!("hello.rs");                           //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("..\\hello.rs");                           //~ ERROR couldn't read


error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\../../data.bin`: The system cannot find the file specified. (os error 2)
   |
   |
LL |     let _ = include_bytes!("../../data.bin");                   //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_bytes!("data.bin");                   //~ ERROR couldn't read


error: couldn't read `C:\a\rust\rust\tests\ui\include-macros\tests/ui/include-macros/file.txt`: The system cannot find the path specified. (os error 3)
   |
   |
LL |     let _ = include_str!("tests/ui/include-macros/file.txt");   //~ ERROR couldn't read
   |
   = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
   |
   |
LL |     let _ = include_str!("file.txt");   //~ ERROR couldn't read

error: aborting due to 4 previous errors
------------------------------------------

---

test result: FAILED. 16267 passed; 1 failed; 221 ignored; 0 measured; 2 filtered out; finished in 353.77s

Build completed unsuccessfully in 0:38:24
Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-msvc target=x86_64-pc-windows-msvc
make: *** [Makefile:73: ci-msvc-ps1] Error 1
  network time: Tue, 26 Mar 2024 05:25:01 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

rust-log-analyzer avatar Mar 26 '24 05:03 rust-log-analyzer