Skip to content

1.98 beta rustdoc crater regression: "no method named ... found" #159476

Closed

Description

@theemathas

This regression was found by the 1.98 beta rustdoc crater run. (Edit: this also affects normal compilation.)

Error output
[INFO] [stdout] error[E0599]: no method named `array_max` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:275:19
[INFO] [stdout]     |
[INFO] [stdout] 275 |     Ok(s.array()?.array_max().into())
[INFO] [stdout]     |                   ^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_max` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_arg_max` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 275 |     Ok(s.array()?.array_arg_max().into())
[INFO] [stdout]     |                         ++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_min` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:279:19
[INFO] [stdout]     |
[INFO] [stdout] 279 |     Ok(s.array()?.array_min().into())
[INFO] [stdout]     |                   ^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_min` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_median` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 279 -     Ok(s.array()?.array_min().into())
[INFO] [stdout] 279 +     Ok(s.array()?.array_median().into())
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_sum` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:283:16
[INFO] [stdout]     |
[INFO] [stdout] 283 |     s.array()?.array_sum().map(Column::from)
[INFO] [stdout]     |                ^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_std` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:70:5
[INFO] [stdout]     |
[INFO] [stdout]  70 |     fn array_std(&self, ddof: u8) -> PolarsResult<Series> {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_sum` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_std` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:287:16
[INFO] [stdout]     |
[INFO] [stdout] 287 |     s.array()?.array_std(ddof).map(Column::from)
[INFO] [stdout]     |                ^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_sum` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:46:5
[INFO] [stdout]     |
[INFO] [stdout]  46 |     fn array_sum(&self) -> PolarsResult<Series> {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_std` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_var` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:291:16
[INFO] [stdout]     |
[INFO] [stdout] 291 |     s.array()?.array_var(ddof).map(Column::from)
[INFO] [stdout]     |                ^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_max` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:36:5
[INFO] [stdout]     |
[INFO] [stdout]  36 |     fn array_max(&self) -> Series {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_var` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_mean` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:295:16
[INFO] [stdout]     |
[INFO] [stdout] 295 |     s.array()?.array_mean().map(Column::from)
[INFO] [stdout]     |                ^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_mean` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_median` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 295 |     s.array()?.array_median().map(Column::from)
[INFO] [stdout]     |                        ++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_median` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:299:16
[INFO] [stdout]     |
[INFO] [stdout] 299 |     s.array()?.array_median().map(Column::from)
[INFO] [stdout]     |                ^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_median` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_mean` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 299 -     s.array()?.array_median().map(Column::from)
[INFO] [stdout] 299 +     s.array()?.array_mean().map(Column::from)
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_unique_stable` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:305:12
[INFO] [stdout]     |
[INFO] [stdout] 305 |         ca.array_unique_stable()
[INFO] [stdout]     |            ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_unique_stable` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_unique` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 305 -         ca.array_unique_stable()
[INFO] [stdout] 305 +         ca.array_unique()
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_unique` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:307:12
[INFO] [stdout]     |
[INFO] [stdout] 307 |         ca.array_unique()
[INFO] [stdout]     |            ^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_unique` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_n_unique` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 307 |         ca.array_n_unique()
[INFO] [stdout]     |                  ++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_n_unique` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:313:19
[INFO] [stdout]     |
[INFO] [stdout] 313 |     Ok(s.array()?.array_n_unique()?.into_column())
[INFO] [stdout]     |                   ^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_n_unique` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_unique` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 313 -     Ok(s.array()?.array_n_unique()?.into_column())
[INFO] [stdout] 313 +     Ok(s.array()?.array_unique()?.into_column())
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_sort` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:332:19
[INFO] [stdout]     |
[INFO] [stdout] 332 |     Ok(s.array()?.array_sort(options)?.into_column())
[INFO] [stdout]     |                   ^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_get` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:136:5
[INFO] [stdout]     |
[INFO] [stdout] 136 |     fn array_get(&self, index: &Int64Chunked, null_on_oob: bool) -> PolarsResult<Series> {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_sort` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_reverse` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:336:19
[INFO] [stdout]     |
[INFO] [stdout] 336 |     Ok(s.array()?.array_reverse().into_column())
[INFO] [stdout]     |                   ^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_reverse` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `reverse` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 336 -     Ok(s.array()?.array_reverse().into_column())
[INFO] [stdout] 336 +     Ok(s.array()?.reverse().into_column())
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_arg_min` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:340:19
[INFO] [stdout]     |
[INFO] [stdout] 340 |     Ok(s.array()?.array_arg_min().into_column())
[INFO] [stdout]     |                   ^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_arg_min` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_min` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 340 -     Ok(s.array()?.array_arg_min().into_column())
[INFO] [stdout] 340 +     Ok(s.array()?.array_min().into_column())
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_arg_max` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:344:19
[INFO] [stdout]     |
[INFO] [stdout] 344 |     Ok(s.array()?.array_arg_max().into_column())
[INFO] [stdout]     |                   ^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_arg_max` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] help: there is a method `array_max` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 344 -     Ok(s.array()?.array_arg_max().into_column())
[INFO] [stdout] 344 +     Ok(s.array()?.array_max().into_column())
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_get` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:351:8
[INFO] [stdout]     |
[INFO] [stdout] 351 |     ca.array_get(index, null_on_oob).map(Column::from)
[INFO] [stdout]     |        ^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_max` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:36:5
[INFO] [stdout]     |
[INFO] [stdout]  36 |     fn array_max(&self) -> Series {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_get` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_join` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:357:8
[INFO] [stdout]     |
[INFO] [stdout] 357 |     ca.array_join(separator, ignore_nulls).map(Column::from)
[INFO] [stdout]     |        ^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_min` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:41:5
[INFO] [stdout]     |
[INFO] [stdout]  41 |     fn array_min(&self) -> Series {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_join` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_shift` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:394:8
[INFO] [stdout]     |
[INFO] [stdout] 394 |     ca.array_shift(n.as_materialized_series()).map(Column::from)
[INFO] [stdout]     |        ^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_slice` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:208:5
[INFO] [stdout]     |
[INFO] [stdout] 208 |     fn array_slice(&self, offset: i64, length: i64) -> PolarsResult<Series> {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_shift` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `array_slice` found for reference `&polars_core::chunked_array::ChunkedArray<FixedSizeListType>` in the current scope
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-plan-0.51.0/src/plans/aexpr/function_expr/array.rs:399:8
[INFO] [stdout]     |
[INFO] [stdout] 399 |     ca.array_slice(offset, length).map(Column::from)
[INFO] [stdout]     |        ^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = help: items from traits can only be used if the trait is in scope
[INFO] [stdout] help: there is a method `array_shift` with a similar name, but with different arguments
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/polars-ops-0.51.0/src/chunked_array/array/namespace.rs:152:5
[INFO] [stdout]     |
[INFO] [stdout] 152 |     fn array_shift(&self, n: &Series) -> PolarsResult<Series> {
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: trait `ArrayNameSpace` which provides `array_slice` is implemented but not in scope; perhaps you want to import it
[INFO] [stdout]     |
[INFO] [stdout]   1 + use polars_ops::chunked_array::array::ArrayNameSpace;
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0599`.

Affects dependencies of an old version of polars-plan (polars-plan-0.51.0):

Activity

  1. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    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 Jul 18, 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 Jul 18, 2026
  3. theemathas commented on Jul 19, 2026

    @theemathas
    ContributorAuthor

    This regression is reproducible with an cargo check on an empty crate with the following dependency:

    [dependencies]
    polars = { version = "=0.51.0", default-features = false, features = ["lazy", "dtype-array"]}
  4. removed
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Jul 19, 2026
  5. theemathas commented on Jul 19, 2026

    @theemathas
    ContributorAuthor

    Bisection result:

    searched toolchains 5ac8ecea36e7548534e0bc3d4aa1c12bd4908566 through 7148b31956911d5d5496900bf564ca5212bf199b
    
    
    ********************************************************************************
    Regression in 029c9e18dd1f4668e1d42bb187c1c263dfe20093
    ********************************************************************************
    
    Attempting to search unrolled perf builds
    Found commits ["a0e7b863", "9425b650", "76aff5ab", "3ae66d10", "7f046546", "29ee19f2", "cc65dc87", "ea288ce9", "cf800c4d", "19158edc", "255226aa", "73476db9", "c87ebfd6", "e17ee295", "03034725", "4d8cef0c", "7b0a2575", "605377c9", "39363f16", "f6dd86e4", "5559d710", "e888ccc1", "7fe31d7a", "c30bc205", "ebdae72f"]
    installing a0e7b86344b26a832ede7d175d9009c94d22f262
    uninstalling a0e7b86344b26a832ede7d175d9009c94d22f262
    installing 9425b650c434400799bcc0e04a4c155553d8803a
    uninstalling 9425b650c434400799bcc0e04a4c155553d8803a
    installing 76aff5ab5f50af64e71685cf545cc87ab4abbba9
    uninstalling 76aff5ab5f50af64e71685cf545cc87ab4abbba9
    installing 3ae66d10f132a025ba322a64ca33625d62c4d114
    uninstalling 3ae66d10f132a025ba322a64ca33625d62c4d114
    installing 7f0465468643c9d01d2b592296cf6400ba674518
    uninstalling 7f0465468643c9d01d2b592296cf6400ba674518
    installing 29ee19f2262edfa7dcf5cc8a6fa033f5153336a2
    uninstalling 29ee19f2262edfa7dcf5cc8a6fa033f5153336a2
    installing cc65dc879cc5a875a115d132435309bf245f6e32
    uninstalling cc65dc879cc5a875a115d132435309bf245f6e32
    installing ea288ce92fd40639ef78b3fd9430d83e6a6a001b
    uninstalling ea288ce92fd40639ef78b3fd9430d83e6a6a001b
    installing cf800c4d4b479bc16df0eff14c89f6aa7e50b152
    uninstalling cf800c4d4b479bc16df0eff14c89f6aa7e50b152
    installing 19158edc1de7e5491cfc5cebe0dac63e3d379e46
    uninstalling 19158edc1de7e5491cfc5cebe0dac63e3d379e46
    installing 255226aa03b47a13c1758981e0e2cbc700d87e1d
    uninstalling 255226aa03b47a13c1758981e0e2cbc700d87e1d
    installing 73476db997630a4ed5b3f3d7019ba8b0bb5f9f9c
    uninstalling 73476db997630a4ed5b3f3d7019ba8b0bb5f9f9c
    installing c87ebfd64071147e8df0cadc1eecf215f2d7536b
    uninstalling c87ebfd64071147e8df0cadc1eecf215f2d7536b
    installing e17ee295b09f96523add23fe8655b4063bff9c5a
    uninstalling e17ee295b09f96523add23fe8655b4063bff9c5a
    installing 03034725e1c21170ca0598b53b316fc0a65b759c
    uninstalling 03034725e1c21170ca0598b53b316fc0a65b759c
    installing 4d8cef0c2d822bd99b9238eded354d7f896db8d4
    uninstalling 4d8cef0c2d822bd99b9238eded354d7f896db8d4
    installing 7b0a2575c40001cdf0b084ffdce7ca522a0df98f
    uninstalling 7b0a2575c40001cdf0b084ffdce7ca522a0df98f
    installing 605377c952208992ce7e0837faaee28f27ee3aa1
    uninstalling 605377c952208992ce7e0837faaee28f27ee3aa1
    installing 39363f16ae61633b038db4b100c933821d9956cd
    uninstalling 39363f16ae61633b038db4b100c933821d9956cd
    installing f6dd86e45f39d07ee4846d024eb35197db2ad9f7
    uninstalling f6dd86e45f39d07ee4846d024eb35197db2ad9f7
    installing 5559d710d4fcb57575837de6c46e55bcb210c59f
    uninstalling 5559d710d4fcb57575837de6c46e55bcb210c59f
    installing e888ccc1f6919deb5d2adb10d35ba34685f3c21e
    uninstalling e888ccc1f6919deb5d2adb10d35ba34685f3c21e
    installing 7fe31d7a98e3df78620538e7ec63224085e0371f
    uninstalling 7fe31d7a98e3df78620538e7ec63224085e0371f
    installing c30bc205ffec08918b1dedc42b29ea2f9df87864
    uninstalling c30bc205ffec08918b1dedc42b29ea2f9df87864
    installing ebdae72fa61cc696ae8ba18878c6c62329c3ff60
    uninstalling ebdae72fa61cc696ae8ba18878c6c62329c3ff60
    ERROR: none of the toolchains satisfied the predicate
    

    The only relevant PR from that rollup seems to be #145108? cc @petrochenkov @LorrensP-2158466

  6. added
    S-has-bisectionStatus: A bisection has been found for this issue
    and removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    on Jul 19, 2026
  7. petrochenkov commented on Jul 19, 2026

    @petrochenkov
    Contributor

    polars-plan is a familiar name, we've seen in various crater reports related to ambiguous glob imports - https://github.com/rust-lang/rust/pulls?q=is%3Apr+"polars+plan"+is%3Aclosed.

    This case looks most similar to what #152822 tries to prevent.

  8. added
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    on Jul 19, 2026
  9. 4 remaining items

  10. added
    S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
    on Jul 20, 2026
  11. theemathas commented on Jul 20, 2026

    @theemathas
    ContributorAuthor

    Self-contained reproducer (compiles on stable, errors on beta):

    mod module_1 {
        mod nested_1 {
            pub struct Foo;
        }
    
        pub use nested_1::Foo;
    }
    
    mod module_2 {
        // same name as the struct
        pub trait Foo: Sized {
            fn method(self) {}
        }
        impl Foo for i32 {}
    }
    
    mod module_3 {
        mod nested_3 {
            use super::*;
            use crate::module_2::*;
            fn weird() {
                1_i32.method();
            }
        }
    
        use crate::module_1::*;
    }

    The regression seems to be very sensitive to the exact way the code is written.

  12. LorrensP-2158466 commented on Jul 20, 2026

    @LorrensP-2158466
    Contributor

    Sounds like.... the ArrayNameSpace trait somehow had a name collision with the ArrayNameSpace struct, even though neither is mentioned by name?

    Yeah, the lint tracks names that are glob imported. So for that example:

      use super::*; // Provides the `ArrayNameSpace` *struct*
      use polars_ops::chunked_array::array::*; // Provides the `ArrayNameSpace` *trait*
    
      pub(super) fn arg_max(a: &polars_core::prelude::ArrayChunked) {
          a.array_arg_max();
      }

    We track such ambiguously glob-imported traits so that we can report the lint in method picking (in this case the one you pasted).

    Notably, there's the following warning on stable, linking to #147992:

    That issue should be the tracking issue, seems that we missed that? @petrochenkov


    Though, the self-contained reproducer should report the same lint:

    use super::*; // Imports *struct* `Foo` through `crate::module_1::*;
    use crate::module_2::*; // Imports *trait* `Foo`
    fn weird() {
        1_i32.method();
    }
    

    So there is something wrong with resolution and ambiguity tracking of those traits, I am looking into it.

  13. theemathas commented on Jul 20, 2026

    @theemathas
    ContributorAuthor

    Though, the self-contained reproducer should report the same lint:

    @LorrensP-2158466 It does report the same lint on stable.

  14. LorrensP-2158466 commented on Jul 20, 2026

    @LorrensP-2158466
    Contributor

    Yeah, I just noticed, excuse me...

  15. LorrensP-2158466 commented on Jul 20, 2026

    @LorrensP-2158466
    Contributor

    I think I found it. In ensure_traits (the function used to record traits of a module):

    fn ensure_traits<'tcx>(self, resolver: &Resolver<'ra, 'tcx>) {
        let mut traits = self.traits.borrow_mut(resolver.as_ref());
        if traits.is_none() {
            let mut collected_traits = Vec::new();
            self.for_each_child(resolver, |r, ident, _, ns, binding| {
                if ns != TypeNS {
                    return;
                }
                if let Res::Def(DefKind::Trait | DefKind::TraitAlias, def_id) = binding.res() {
                    collected_traits.push((
                        ident.name,
                        binding,
                        r.as_ref().get_module(def_id),
                        binding.is_ambiguity_recursive(), // Used for the lint
                    ));
                }
            });
            *traits = Some(collected_traits.into_boxed_slice());
        }
    }

    The problem here is that if a struct and trait are ambiguous, then it is possible that the struct will be the "main" declaration and the trait will be the ambiguous declaration:

    struct DeclData<'ra> { // main decl is the *struct* `Foo`
        kind: DeclKind<'ra>,
        ambiguity: CmCell<Option<(Decl<'ra>, bool /*warning*/)>>, // ambiguous decl is the *trait* `Foo`
        // ...
    }

    And we thus never record that ambiguous trait, not even for the lint in question. So the fix is to also look at the ambiguous decl if the main decl is not a trait and check if that is a trait and push it to the collected_traits as an ambiguous one.

  16. petrochenkov commented on Jul 20, 2026

    @petrochenkov
    Contributor

    That issue should be the tracking issue, seems that we missed that?

    Yes, this tracking issue was created after the PR was merged, and the link wasn't updated

  17. rustbot commented on Jul 20, 2026

    @rustbot
    Collaborator

    Assigning P-high (discussion on Zulip).

  18. added
    P-highHigh priority
    and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jul 20, 2026
  19. added a commit that references this issue on Jul 20, 2026
  20. added a commit that references this issue on Jul 20, 2026
  21. theemathas commented on Jul 25, 2026

    @theemathas
    ContributorAuthor

    Fixed by #159599 and backported in #159791.

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

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.P-highHigh priorityS-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-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