Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no as_slice() on arrays on old toolchains #201

Merged
merged 1 commit into from Dec 27, 2021
Merged

Fix no as_slice() on arrays on old toolchains #201

merged 1 commit into from Dec 27, 2021

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Dec 27, 2021

Pre-1.57:

error[E0658]: use of unstable library feature 'array_methods'
   --> src/runtime.rs:320:33
    |
320 |     repr.starts_with(['t', 'f'].as_slice())
    |                                 ^^^^^^^^
    |
    = note: see issue #76118 <https://github.com/rust-lang/rust/issues/76118> for more information

Pre-1.48:

error[E0599]: no method named `as_slice` found for array `[char; 2]` in the current scope
   --> src/runtime.rs:320:33
    |
320 |     repr.starts_with(['t', 'f'].as_slice())
    |                                 ^^^^^^^^ method not found in `[char; 2]`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use std::array::FixedSizeArray;`

@dtolnay dtolnay merged commit 7e3c9fc into master Dec 27, 2021
@dtolnay dtolnay deleted the isboolean branch December 27, 2021 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant