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 compile on rust nightly #3364

Merged
merged 1 commit into from May 28, 2023
Merged

Fix compile on rust nightly #3364

merged 1 commit into from May 28, 2023

Conversation

heiher
Copy link
Contributor

@heiher heiher commented May 25, 2023

This PR fixes compile on rust nightly (1.71.0-nightly) with non-default features:

--no-default-features --features curl-backend,reqwest-backend,reqwest-default-tls --features vendored-openssl

Compile errors

error: cannot find macro `lazy_static` in this scope
   --> download/src/lib.rs:345:5
    |
345 |     lazy_static! {
    |     ^^^^^^^^^^^
    |
    = help: consider importing this macro:
            lazy_static::lazy_static
    = note: `lazy_static` is in scope, but it is a crate, not a macro

error[E0425]: cannot find value `CLIENT_DEFAULT_TLS` in this scope
   --> download/src/lib.rs:379:37
    |
379 |             TlsBackend::Default => &CLIENT_DEFAULT_TLS,
    |                                     ^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.

Copy link
Contributor

@xen0n xen0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my own experiments this only happens with the reqwest-rustls-tls feature disabled but reqwest-backend and reqwest-default-tls enabled. Given the context of your work that's loongarch64 enablement, maybe mentioning the intended use case (no ring yet, so no reqwest-rustls-tls) would further justify the change.

@heiher
Copy link
Contributor Author

heiher commented May 26, 2023

r? @hi-rustin

@@ -269,8 +269,6 @@ pub mod reqwest_be {
use std::time::Duration;

use anyhow::{anyhow, Context, Result};
#[cfg(feature = "reqwest-rustls-tls")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just put a any in here with the additional feature that requires rustls.

@heiher heiher requested a review from rbtcollins May 28, 2023 08:31
@rbtcollins rbtcollins merged commit 686c9f3 into rust-lang:master May 28, 2023
15 checks passed
@rami3l rami3l mentioned this pull request Jan 29, 2024
1 task
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

3 participants