Skip to content

1.100 beta crater regression: cannot find type OrderRepository in this scope #164136

Description

@theemathas

This regression was found in the 1.100 beta crater run.

[INFO] [stderr] error[E0425]: cannot find type `OrderRepository` in this scope
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:44:42
[INFO] [stderr]    |
[INFO] [stderr] 44 | fn assert_generated_methods(repository: &OrderRepository) {
[INFO] [stderr]    |                                          ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stderr]    |
[INFO] [stderr] note: similarly named trait `PgRepository` defined here
[INFO] [stderr]   --> src/repository.rs
[INFO] [stderr]    |
[INFO] [stderr]    | pub trait PgRepository: Send + Sync {
[INFO] [stderr]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:32:8
[INFO] [stderr]    |
[INFO] [stderr] 29 | #[cfg(feature = "single")]
[INFO] [stderr]    |       ------------------ the item is gated behind the `single` feature
[INFO] [stderr] ...
[INFO] [stderr] 32 | struct OrderRepository {
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:39:8
[INFO] [stderr]    |
[INFO] [stderr] 36 | #[cfg(feature = "factory")]
[INFO] [stderr]    |       ------------------- the item is gated behind the `factory` feature
[INFO] [stderr] ...
[INFO] [stderr] 39 | struct OrderRepository {
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^
[INFO] [stderr] help: a trait with a similar name exists
[INFO] [stderr]    |
[INFO] [stderr] 44 - fn assert_generated_methods(repository: &OrderRepository) {
[INFO] [stderr] 44 + fn assert_generated_methods(repository: &PgRepository) {
[INFO] [stderr]    |
[INFO] [stderr] 
[INFO] [stderr] error[E0425]: cannot find type `OrderRepository` in this scope
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:54:18
[INFO] [stderr]    |
[INFO] [stderr] 54 |     repository: &OrderRepository,
[INFO] [stderr]    |                  ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stderr]    |
[INFO] [stderr] note: similarly named trait `PgRepository` defined here
[INFO] [stderr]   --> src/repository.rs
[INFO] [stderr]    |
[INFO] [stderr]    | pub trait PgRepository: Send + Sync {
[INFO] [stderr]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:32:8
[INFO] [stderr]    |
[INFO] [stderr] 29 | #[cfg(feature = "single")]
[INFO] [stderr]    |       ------------------ the item is gated behind the `single` feature
[INFO] [stderr] ...
[INFO] [stderr] 32 | struct OrderRepository {
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:39:8
[INFO] [stderr]    |
[INFO] [stderr] 36 | #[cfg(feature = "factory")]
[INFO] [stderr]    |       ------------------- the item is gated behind the `factory` feature
[INFO] [stderr] ...
[INFO] [stderr] 39 | struct OrderRepository {
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^
[INFO] [stderr] help: a trait with a similar name exists
[INFO] [stderr]    |
[INFO] [stderr] 54 -     repository: &OrderRepository,
[INFO] [stderr] 54 +     repository: &PgRepository,
[INFO] [stderr]    |
[INFO] [stderr] 
[INFO] [stderr] error[E0425]: cannot find type `OrderRepository` in this scope
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:94:78
[INFO] [stderr]    |
[INFO] [stderr] 94 | fn assert_transaction_callback(database: &PgDatabaseService, repository: Arc<OrderRepository>) {
[INFO] [stderr]    |                                                                              ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stderr]    |
[INFO] [stderr] note: similarly named trait `PgRepository` defined here
[INFO] [stderr]   --> src/repository.rs
[INFO] [stderr]    |
[INFO] [stderr]    | pub trait PgRepository: Send + Sync {
[INFO] [stderr]    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:32:8
[INFO] [stderr]    |
[INFO] [stderr] 29 | #[cfg(feature = "single")]
[INFO] [stderr]    |       ------------------ the item is gated behind the `single` feature
[INFO] [stderr] ...
[INFO] [stderr] 32 | struct OrderRepository {
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]   --> tests/ui/pass_derive_contract.rs:39:8
[INFO] [stderr]    |
[INFO] [stderr] 36 | #[cfg(feature = "factory")]
[INFO] [stderr]    |       ------------------- the item is gated behind the `factory` feature
[INFO] [stderr] ...
[INFO] [stderr] 39 | struct OrderRepository {
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^
[INFO] [stderr] help: a trait with a similar name exists
[INFO] [stderr]    |
[INFO] [stderr] 94 - fn assert_transaction_callback(database: &PgDatabaseService, repository: Arc<OrderRepository>) {
[INFO] [stderr] 94 + fn assert_transaction_callback(database: &PgDatabaseService, repository: Arc<PgRepository>) {
[INFO] [stderr]    |
[INFO] [stderr] help: you might be missing a type parameter
[INFO] [stderr]    |
[INFO] [stderr] 94 | fn assert_transaction_callback<OrderRepository>(database: &PgDatabaseService, repository: Arc<OrderRepository>) {
[INFO] [stderr]    |                               +++++++++++++++++
[INFO] [stderr] 
[INFO] [stderr] error[E0425]: cannot find type `OrderRepository` in this scope
[INFO] [stderr]    --> tests/ui/pass_derive_contract.rs:116:18
[INFO] [stderr]     |
[INFO] [stderr] 116 |     repository: &OrderRepository,
[INFO] [stderr]     |                  ^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stderr]     |
[INFO] [stderr] note: similarly named trait `PgRepository` defined here
[INFO] [stderr]    --> src/repository.rs
[INFO] [stderr]     |
[INFO] [stderr]     | pub trait PgRepository: Send + Sync {
[INFO] [stderr]     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]    --> tests/ui/pass_derive_contract.rs:32:8
[INFO] [stderr]     |
[INFO] [stderr]  29 | #[cfg(feature = "single")]
[INFO] [stderr]     |       ------------------ the item is gated behind the `single` feature
[INFO] [stderr] ...
[INFO] [stderr]  32 | struct OrderRepository {
[INFO] [stderr]     |        ^^^^^^^^^^^^^^^
[INFO] [stderr] note: found an item that was configured out
[INFO] [stderr]    --> tests/ui/pass_derive_contract.rs:39:8
[INFO] [stderr]     |
[INFO] [stderr]  36 | #[cfg(feature = "factory")]
[INFO] [stderr]     |       ------------------- the item is gated behind the `factory` feature
[INFO] [stderr] ...
[INFO] [stderr]  39 | struct OrderRepository {
[INFO] [stderr]     |        ^^^^^^^^^^^^^^^
[INFO] [stderr] help: a trait with a similar name exists
[INFO] [stderr]     |
[INFO] [stderr] 116 -     repository: &OrderRepository,
[INFO] [stderr] 116 +     repository: &PgRepository,
[INFO] [stderr]     |

https://crater-reports.s3.amazonaws.com/beta-1.100-4/1.100.0-beta.1/reg/lily_postgresql-0.1.0/log.txt

Notably, this was found in a ui test that is supposed to compile without errors.

Activity

  1. added
    C-bugCategory: This is a bug.
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Oct 11, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 11, 2026
  3. asquared31415 commented on Oct 11, 2026

    @asquared31415
    Contributor

    This is more fallout from the cargo build dir changes, this crate is using trybuild, which does automatic feature detection, but v1.0.118 fails. The fix is dtolnay/trybuild@ed84d28 which is only in v1.0.119 and later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingregression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions