Stream: t-compiler/help

Topic: spurious (?) compiler error const_fn_union


Santiago Pastorino (Sep 27 2019 at 18:14, on Zulip):

I'm getting the following error (it's like the second time it's happening) ...

Santiago Pastorino (Sep 27 2019 at 18:14, on Zulip):
[santiago@galago rust1 (master)]$ RUST_BACKTRACE=full ./x.py build -i --stage 1 src/libstd
Updating only changed submodules
Updating submodule src/tools/cargo
Submodule path 'src/tools/cargo': checked out 'ab6fa8908c9b6c8f7e2249231c395eebfbc49891'
Updating submodule src/tools/clippy
Submodule path 'src/tools/clippy': checked out '68ff8b19bc6705724d1e77a8dc17ffb8dfbbe26b'
Submodules updated in 0.32 seconds
    Finished dev [unoptimized] target(s) in 0.12s
  Downloaded compiletest_rs v0.3.23
  Downloaded 1 crate (51.5 KB) in 2.74s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling core v0.0.0 (/home/santiago/src/oss/rust1/src/libcore)
   Compiling std v0.0.0 (/home/santiago/src/oss/rust1/src/libstd)
error: unused attribute
  --> src/libcore/slice/mod.rs:66:5
   |
66 |     #[allow_internal_unstable(const_fn_union)]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-attributes` implied by `-D warnings`

error: unused attribute
    --> src/libcore/str/mod.rs:2170:5
     |
2170 |     #[allow_internal_unstable(const_fn_union)]
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

error: could not compile `core`.

To learn more, run the command again with --verbose.
command did not execute successfully: "/home/santiago/src/oss/rust1/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/home/santiago/src/oss/rust1/src/libtest/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
failed to run: /home/santiago/src/oss/rust1/build/bootstrap/debug/bootstrap build -i --stage 1 src/libstd
Build completed unsuccessfully in 0:00:09
Santiago Pastorino (Sep 27 2019 at 18:14, on Zulip):

last time I ended fixing it by running clean

Santiago Pastorino (Sep 27 2019 at 18:15, on Zulip):

does someone have an idea why this happens so I can avoid failling into this and then needing to run clean from time to time?

Wesley Wiser (Sep 29 2019 at 15:02, on Zulip):

Just ran into this as well. rm -rf build/x86_64-unknown-linux-gnu/stage0-std fixed it for me

Wesley Wiser (Sep 29 2019 at 15:05, on Zulip):

Not ideal obviously but maybe a pointer in the right direction?

simulacrum (Sep 29 2019 at 21:03, on Zulip):

I suspect this is an incremental

simulacrum (Sep 29 2019 at 22:13, on Zulip):

er, incremental issue

simulacrum (Sep 29 2019 at 22:13, on Zulip):

but not sure

Santiago Pastorino (Sep 30 2019 at 12:19, on Zulip):

Not ideal obviously but maybe a pointer in the right direction?

yes, to fix it I've ran clean, was mainly wondering what was the problem about

oli (Sep 30 2019 at 12:34, on Zulip):

the stage0 compiler was swapped out but I guess that swapping out didn't trigger an incremental cache invalidation but instead re-used the cache

simulacrum (Sep 30 2019 at 13:04, on Zulip):

hm, I think I've seen that more than once but maybe I'm wrong

simulacrum (Sep 30 2019 at 13:05, on Zulip):

bit unfortunate we're not seeing incremental invalidation

Santiago Pastorino (Sep 30 2019 at 15:52, on Zulip):

it's definitely incremental and the issue is happening all the time

Santiago Pastorino (Sep 30 2019 at 15:52, on Zulip):

needed to stop using it

simulacrum (Sep 30 2019 at 16:55, on Zulip):

maybe we can slap a #[allow(unused_attributes)] on there for now?

simulacrum (Sep 30 2019 at 16:55, on Zulip):

but sounds like something we should definitely fix

centril (Sep 30 2019 at 22:04, on Zulip):

@simulacrum yeah while I hate saying we should #[allow(...)] I would like the pain to go away :D (also seeing this frequently-ish)

Santiago Pastorino (Oct 02 2019 at 21:05, on Zulip):

is there an issue open about this?

Santiago Pastorino (Oct 02 2019 at 21:12, on Zulip):

didn't find anything so I've just reported it https://github.com/rust-lang/rust/issues/65023

Last update: Nov 11 2019 at 22:45UTC