Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/112832.rs: fixed with no errors #1660

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 6, 2023

Issue: rust-lang/rust#112832

pub trait QueryDb {
    type Db;
}

pub struct QueryTable<Q, DB> {
    db: DB,
    storage: Q,
}

impl<Q> QueryTable<Q, <Q as QueryDb>::Db> where Q: for<'d> AsyncQueryFunction<'d> {}

pub trait AsyncQueryFunction<'d>: QueryDb<Db = <Self as AsyncQueryFunction<'d>>::SendDb> {
    type SendDb: 'd;
}

pub trait QueryStorageOpsAsync<Q>
where
    Q: for<'d> AsyncQueryFunction<'d>,
{
}

fn main() {}
=== stdout ===
=== stderr ===
warning: fields `db` and `storage` are never read
 --> /home/runner/work/glacier/glacier/ices/112832.rs:6:5
  |
5 | pub struct QueryTable<Q, DB> {
  |            ---------- fields in this struct
6 |     db: DB,
  |     ^^
7 |     storage: Q,
  |     ^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

==============

=== stdout ===
=== stderr ===
warning: fields `db` and `storage` are never read
 --> /home/runner/work/glacier/glacier/ices/112832.rs:6:5
  |
5 | pub struct QueryTable<Q, DB> {
  |            ---------- fields in this struct
6 |     db: DB,
  |     ^^
7 |     storage: Q,
  |     ^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

==============
@JohnTitor JohnTitor merged commit 24f876c into master Sep 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/112832.rs branch September 21, 2023 18:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants