Skip to content

Crate cloud-storage does not compile on nightly-2023-07-27 #114579

Closed
@df-oss

Description

@df-oss

Got compilation error when bumping rust for external crate cloud-storage for version indicated below. (https://github.com/ThouCheese/cloud-storage-rs)

Code

I tried this code:

⋊> ~/g/d/cloud-storage-rs on master ◦ rustup default nightly-2023-07-26-x86_64-unknown-linux-gnu                                                                                                                                                                          13:51:22
info: using existing install for 'nightly-2023-07-26-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-2023-07-26-x86_64-unknown-linux-gnu'

  nightly-2023-07-26-x86_64-unknown-linux-gnu unchanged - rustc 1.73.0-nightly (864bdf784 2023-07-25)

⋊> ~/g/d/cloud-storage-rs on master ◦ rustc --version                                                                                                                                                                                                                     13:51:23
rustc 1.73.0-nightly (864bdf784 2023-07-25)
⋊> ~/g/d/cloud-storage-rs on master ◦ cargo clippy                                                                                                                                                                                                                        13:51:28
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
⋊> ~/g/d/cloud-storage-rs on master ◦ rustup default nightly-2023-07-27-x86_64-unknown-linux-gnu                                                                                                                                                                          13:51:34
info: using existing install for 'nightly-2023-07-27-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-2023-07-27-x86_64-unknown-linux-gnu'

  nightly-2023-07-27-x86_64-unknown-linux-gnu unchanged - rustc 1.73.0-nightly (0d95f9132 2023-07-26)

⋊> ~/g/d/cloud-storage-rs on master ◦ cargo clippy                                                                                                                                                                                                                        13:54:54
   Compiling libc v0.2.147
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
    Checking once_cell v1.18.0
   Compiling vcpkg v0.2.15
   Compiling pkg-config v0.3.27
    Checking cfg-if v1.0.0
    Checking pin-project-lite v0.2.11
   Compiling futures-core v0.3.28
    Checking bytes v1.4.0
    Checking itoa v1.0.9
   Compiling serde v1.0.183
   Compiling tokio v1.29.1
   Compiling num-traits v0.2.16
   Compiling serde_derive v1.0.183
   Compiling futures-task v0.3.28
   Compiling indexmap v1.9.3
   Compiling quote v1.0.32
    Checking mio v0.8.8
    Checking socket2 v0.4.9
   Compiling cc v1.0.82
   Compiling syn v2.0.28
   Compiling slab v0.4.8
    Checking tracing-core v0.1.31
   Compiling futures-util v0.3.28
   Compiling openssl v0.10.56
    Checking foreign-types-shared v0.1.1
    Checking fnv v1.0.7
    Checking http v0.2.9
    Checking foreign-types v0.3.2
   Compiling num-integer v0.1.45
    Checking tracing v0.1.37
    Checking futures-sink v0.3.28
   Compiling futures-channel v0.3.28
    Checking hashbrown v0.12.3
   Compiling native-tls v0.2.11
    Checking bitflags v1.3.2
    Checking tinyvec_macros v0.1.1
   Compiling httparse v1.8.0
    Checking pin-utils v0.1.0
    Checking tinyvec v1.6.0
   Compiling num-bigint v0.2.6
    Checking percent-encoding v2.3.0
   Compiling serde_json v1.0.104
    Checking openssl-probe v0.1.5
    Checking try-lock v0.2.4
    Checking ryu v1.0.15
    Checking log v0.4.19
    Checking regex-syntax v0.7.4
    Checking unicode-normalization v0.1.22
    Checking want v0.3.1
   Compiling openssl-sys v0.9.91
   Compiling ring v0.16.20
    Checking form_urlencoded v1.2.0
    Checking http-body v0.4.5
    Checking time v0.1.45
    Checking unicode-bidi v0.3.13
    Checking iana-time-zone v0.1.57
    Checking tower-service v0.3.2
    Checking httpdate v1.0.2
    Checking regex-automata v0.3.6
    Checking chrono v0.4.26
    Checking idna v0.4.0
    Checking base64 v0.13.1
    Checking untrusted v0.7.1
   Compiling async-trait v0.1.72
    Checking spin v0.5.2
    Checking url v2.4.0
    Checking serde_urlencoded v0.7.1
    Checking encoding_rs v0.8.32
    Checking base64 v0.21.2
    Checking base64 v0.12.3
    Checking mime v0.3.17
    Checking ipnet v2.8.0
    Checking lazy_static v1.4.0
    Checking simple_asn1 v0.4.1
    Checking dotenv v0.15.0
    Checking regex v1.9.3
    Checking hex v0.4.3
    Checking pem v0.8.3
    Checking jsonwebtoken v7.2.0
   Compiling tokio-macros v2.1.0
   Compiling openssl-macros v0.1.1
    Checking tokio-util v0.7.8
    Checking tokio-native-tls v0.3.1
    Checking h2 v0.3.20
    Checking hyper v0.14.27
    Checking hyper-tls v0.5.0
    Checking reqwest v0.11.18
    Checking cloud-storage v0.11.1 (/home/mikael/gitrepos/dev/cloud-storage-rs)
error: concrete type differs from previous defining opaque type use
   --> src/client/object.rs:325:24
    |
325 |     ) -> crate::Result<impl Stream<Item = crate::Result<u8>> + Unpin> {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                        |
    |                        expected `resources::object::SizedByteStream<futures_util::stream::TryFlatten<futures_util::stream::Map<impl futures_util::Stream<Item = std::result::Result<bytes::Bytes, reqwest::Error>>, [closure@src/client/object.rs:344:18: 344:25]>>>`, got `resources::object::SizedByteStream<futures_util::stream::TryFlatten<futures_util::stream::Map<impl futures_util::Stream<Item = std::result::Result<bytes::Bytes, reqwest::Error>>, [closure@src/client/object.rs:344:18: 344:25]>>>`
    |                        this expression supplies two conflicting concrete types for the same opaque type

error: could not compile `cloud-storage` (lib) due to previous error

I expected to see this happen: Should compile on nightly 2023-07-27 toolchain.

Instead, this happened: Did not compile on nightly 2023-07-27 toolchain.

Version it worked on

It most recently worked on: Compiles on nightly 2023-07-26 toolchain.

Version with regression

rustc --version --verbose:

rustc 1.73.0-nightly (0d95f9132 2023-07-26)
binary: rustc
commit-hash: 0d95f9132909ae7c5f2456748d0ffd1c3ba4a8e8
commit-date: 2023-07-26
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

Backtrace

Backtrace

<backtrace>

Metadata

Metadata

Assignees

Labels

A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.T-typesRelevant to the types team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions