Skip to content

sqlx-postgres Fails to Build on Latest 1.91.0 #145288

Closed

Description

@HTGAzureX1212

I tried this code:

// sqlx library

I expected compilation to succeed.
Instead, this happened: hangs for a while (possibly due to recursion) and then errors out with
error[E0275]: overflow evaluating the requirement `(&mut PgConnection, Oid): std::marker::Send` .

Details
error[E0275]: overflow evaluating the requirement `(&mut PgConnection, Oid): std::marker::Send`
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-core-0.8.6\src\ext\async_stream.rs:28:56
     |
  28 |         Fut: 'a + Future<Output = Result<(), Error>> + Send,
     |                                                        ^^^^
     |
     = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`sqlx_postgres`)
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:319:36
     |
 319 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 320 | |         let base_type = self.maybe_fetch_type_info_by_oid(base_type, true).await?;
 321 | |
 322 | |         Ok(PgTypeInfo(PgType::Custom(Arc::new(PgCustomType {
...    |
 326 | |         }))))
 327 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:193:82
     |
 193 |       async fn fetch_type_by_oid(&mut self, oid: Oid) -> Result<PgTypeInfo, Error> {
     |  __________________________________________________________________________________^
 194 | |         let (name, typ_type, category, relation_id, element, base_type): (
 195 | |             String,
 196 | |             i8,
...    |
 257 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33
     |
 172 |             let info = Box::pin(async { self.fetch_type_by_oid(oid).await }).await?;
     |                                 ^^^^^
     = note: required for `Unique<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>` to implement `std::marker::Send`
note: required because it appears within the type `Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\alloc\src\boxed.rs:231:12
     |
 231 | pub struct Box<
     |            ^^^
note: required because it appears within the type `Pin<Box<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:172:33: 172:38}>>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\pin.rs:1094:12
     |
1094 | pub struct Pin<Ptr> {
     |            ^^^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:157:36
     |
 157 |       ) -> Result<PgTypeInfo, Error> {
     |  ____________________________________^
 158 | |         // first we check if this is a built-in type
 159 | |         // in the average application, the vast majority of checks should flow through this
 160 | |         if let Some(info) = PgTypeInfo::try_from_oid(oid) {
...    |
 191 | |     }
     | |_____^
note: required because it's used within this `async` fn body
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\describe.rs:104:63
     |
 104 |       ) -> Result<(Vec<PgColumn>, HashMap<UStr, usize>), Error> {
     |  _______________________________________________________________^
 105 | |         let mut columns = Vec::new();
 106 | |         let mut column_names = HashMap::new();
...    |
 137 | |         Ok((columns, column_names))
 138 | |     }
     | |_____^
note: required because it's used within this `async` block
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-postgres-0.8.6\src\connection\executor.rs:294:12
     |
 294 |           Ok(try_stream! {
     |  ____________^
 295 | |             loop {
 296 | |                 let message = self.inner.stream.recv().await?;
...    |
 375 | |             Ok(())
 376 | |         })
     | |_________^
note: required because it appears within the type `ManuallyDrop<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-core-0.8.6\src\ext\async_stream.rs:124:110: 124:120}>`
    --> C:\Users\htgaz\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\mem\manually_drop.rs:157:12
     |
 157 | pub struct ManuallyDrop<T: ?Sized> {
     |            ^^^^^^^^^^^^
note: required because it appears within the type `Instrumented<{async block@C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\sqlx-core-0.8.6\src\ext\async_stream.rs:124:110: 124:120}>`
    --> C:\Users\htgaz\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\tracing-0.1.41\src\instrument.rs:266:16
     |
 266 |     pub struct Instrumented<T> {
     |                ^^^^^^^^^^^^
     = note: this error originates in the macro `try_stream` (in Nightly builds, run with -Z macro-backtrace for more info)

Meta

rustc --version --verbose:

rustc 1.91.0-nightly (1ebbd87a6 2025-08-11)
binary: rustc
commit-hash: 1ebbd87a62ce96a72b22da61b7c2c43893534842
commit-date: 2025-08-11
host: x86_64-pc-windows-msvc
release: 1.91.0-nightly
LLVM version: 21.1.0

Activity

  1. added
    C-bug
    on Aug 12, 2025
  2. added
    needs-triage
    on Aug 12, 2025
  3. added
    T-compiler
    E-needs-bisection
    E-needs-mcve
    on Aug 12, 2025
  4. theemathas commented on Aug 12, 2025

    @theemathas
    Contributor

    Probably a duplicate of #145151

    If it is, it should be fixed in tomorrow's nightly release.

  5. lqd commented on Aug 12, 2025

    @lqd
    Member

    I can't analyze this, please provide steps to reproduce the issue:

    - on sqlx (commit c825bd36b50b157e68fb1dac542eb4d9fe863850): your nightly seems to work? cargo +nightly-2025-08-10 check --features "postgres" and build complete successfully.
    - on sqlx-postgres-0.8.6 from your errors: cargo check and build both work on that nightly as well.

    edit: ah no "2025-08-11" is "today's" nightly-2025-08-12 which contains #145194, not tomorrow's nightly. I can't reproduce the OP on nightly-2025-08-12, but have worse results there, that I'll describe below.

    How long did it take to produce the error? Quickly, or after a long time?

    edit2: to answer my own question, the error in the OP shows up after more than 11 minutes or so. I was this close earlier.


    However, @compiler-errors, it looks like #145194 itself has a problem on this code, an infinite loop or really slow compilation.

    2025-08-10 and 11 are similar, as is a6620a4, the parent of rollup #145240 where #145194 landed: around 10s.

    sqlx-postgres-0.8.6> cargo clean -q && time cargo +nightly-2025-08-11 check -q
    real    0m9.502s
    

    nightly-2025-08-12 is the one with #145194, and its artifacts d0f3f08 don't complete quickly: I killed compilation after 10 minutes or so.

    A revert of #145194, + a rebased version of #145193 does make sqlx-postgres-0.8.6 compile quickly again, but tests don't pass on #145193 itself (some ABI assertions trigger in the async drop tests).

  6. added
    S-needs-repro
    and removed
    E-needs-mcve
    on Aug 12, 2025
  7. compiler-errors commented on Aug 12, 2025

    @compiler-errors
    Contributor

    @lncr found the fix, and will put up a follow up to the coroutine fix I put up

  8. added a commit that references this issue on Aug 14, 2025
  9. added a commit that references this issue on Aug 14, 2025
  10. 7 remaining items

  11. AMDmi3 commented on Aug 18, 2025

    @AMDmi3
  12. compiler-errors commented on Aug 18, 2025

    @compiler-errors
  13. added a commit that references this issue on Aug 19, 2025
  14. added 2 commits that reference this issue on Aug 19, 2025
    92009dd
    99de64b
  15. added a commit that references this issue on Aug 19, 2025
    6ff35da
  16. added 2 commits that reference this issue on Aug 20, 2025
    05b7b68
    6443009
  17. AMDmi3 commented on Sep 7, 2025

    @AMDmi3
  18. added 2 commits that reference this issue on Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugT-compiler

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions