Skip to content

Regular incremental (?) build failures during stage 0 build #99538

Closed
@RalfJung

Description

@RalfJung

Regularly, when I do a git pull that skips over a few days worth of commits, or switch between branches based on different master commits, a ./x.py check fails afterwards. It fails with errors like "lifetime may not live long enough" or "this associated function takes 2 generic arguments but 1 generic argument was supplied" -- regular build errors, not ICEs. The errors are completely bogus though. Here's an example of the most recent one that I experienced today:

Checking stage0 std test/bench/example targets (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/r/src/rust/rustc.2/src/tools/miri/Cargo.toml
workspace: /home/r/src/rust/rustc.2/Cargo.toml
    Checking core v0.0.0 (/home/r/src/rust/rustc.2/library/core)
error[E0107]: this associated function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:145:14
    |
145 |             .provide_value::<String>(|| "bye".to_owned());
    |              ^^^^^^^^^^^^^   ------ supplied 1 generic argument
    |              |
    |              expected 2 generic arguments
    |
help: add missing generic argument
    |
145 |             .provide_value::<String, F>(|| "bye".to_owned());
    |                                    +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:185:9
    |
185 |         request_ref::<T>(self)
    |         ^^^^^^^^^^^   - supplied 1 generic argument
    |         |
    |         expected 2 generic arguments
    |
help: add missing generic argument
    |
185 |         request_ref::<T, P>(self)
    |                        +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:154:19
    |
154 |     assert_eq!(&**request_ref::<String>(obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^   ------ supplied 1 generic argument
    |                   |
    |                   expected 2 generic arguments
    |
help: add missing generic argument
    |
154 |     assert_eq!(&**request_ref::<String, P>(obj).unwrap(), "hello");
    |                                       +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:155:18
    |
155 |     assert_eq!(&*request_value::<String>(obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^   ------ supplied 1 generic argument
    |                  |
    |                  expected 2 generic arguments
    |
help: add missing generic argument
    |
155 |     assert_eq!(&*request_value::<String, P>(obj).unwrap(), "bye");
    |                                        +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:156:16
    |
156 |     assert_eq!(request_value::<u8>(obj), None);
    |                ^^^^^^^^^^^^^   -- supplied 1 generic argument
    |                |
    |                expected 2 generic arguments
    |
help: add missing generic argument
    |
156 |     assert_eq!(request_value::<u8, P>(obj), None);
    |                                  +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:164:19
    |
164 |     assert_eq!(&**request_ref::<String>(&*obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^   ------ supplied 1 generic argument
    |                   |
    |                   expected 2 generic arguments
    |
help: add missing generic argument
    |
164 |     assert_eq!(&**request_ref::<String, P>(&*obj).unwrap(), "hello");
    |                                       +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:165:18
    |
165 |     assert_eq!(&*request_value::<String>(&*obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^   ------ supplied 1 generic argument
    |                  |
    |                  expected 2 generic arguments
    |
help: add missing generic argument
    |
165 |     assert_eq!(&*request_value::<String, P>(&*obj).unwrap(), "bye");
    |                                        +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:166:16
    |
166 |     assert_eq!(request_value::<u8>(&*obj), None);
    |                ^^^^^^^^^^^^^   -- supplied 1 generic argument
    |                |
    |                expected 2 generic arguments
    |
help: add missing generic argument
    |
166 |     assert_eq!(request_value::<u8, P>(&*obj), None);
    |                                  +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:174:19
    |
174 |     assert_eq!(&**request_ref::<String>(&obj).unwrap(), "hello");
    |                   ^^^^^^^^^^^   ------ supplied 1 generic argument
    |                   |
    |                   expected 2 generic arguments
    |
help: add missing generic argument
    |
174 |     assert_eq!(&**request_ref::<String, P>(&obj).unwrap(), "hello");
    |                                       +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:175:18
    |
175 |     assert_eq!(&*request_value::<String>(&obj).unwrap(), "bye");
    |                  ^^^^^^^^^^^^^   ------ supplied 1 generic argument
    |                  |
    |                  expected 2 generic arguments
    |
help: add missing generic argument
    |
175 |     assert_eq!(&*request_value::<String, P>(&obj).unwrap(), "bye");
    |                                        +++

error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
   --> library/core/tests/any.rs:176:16
    |
176 |     assert_eq!(request_value::<u8>(&obj), None);
    |                ^^^^^^^^^^^^^   -- supplied 1 generic argument
    |                |
    |                expected 2 generic arguments
    |
help: add missing generic argument
    |
176 |     assert_eq!(request_value::<u8, P>(&obj), None);
    |                                  +++

For more information about this error, try `rustc --explain E0107`.
error: could not compile `core` due to 11 previous errors

These always go away when I do ./x.py clean. This started some time not too long before Jun 28 and has been going on since then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions