-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
New overflow error while compiling wundergraph
#104322
Comments
As #103274 was reported before the release of 1.65 as regression: Are there any plans to fix this or is this expected breakage due to a "bug-fix"? |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
…rors Reverts check done by rust-lang#100757 As my `fix` caused more issues than it resolved it's better to revert it. ( rust-lang#103274 rust-lang#104322 rust-lang#104606) r? `@compiler-errors` Reopens rust-lang#95134
@compiler-errors This code reproduces the issue. I'm not sure if that's the most minimal version you can get, but at least it's nothing that depends on external crates: use mini_diesel::*;
pub trait HandleDelete<K> {}
pub fn handle_delete<D, R>()
where
R: HasTable,
R::Table: HandleDelete<D> + 'static,
{
}
impl<K, T> HandleDelete<K> for T
where
T: Table + HasTable<Table = T> + 'static,
K: 'static,
&'static K: Identifiable<Table = T>,
T::PrimaryKey: EqAll<<&'static K as Identifiable>::Id>,
T::Query: FilterDsl<<T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output>,
Filter<T::Query, <T::PrimaryKey as EqAll<<&'static K as Identifiable>::Id>>::Output>:
IntoUpdateTarget<Table = T>,
{
}
mod mini_diesel {
pub trait HasTable {
type Table: Table;
}
pub trait Identifiable: HasTable {
type Id;
}
pub trait EqAll<Rhs> {
type Output;
}
pub trait IntoUpdateTarget: HasTable {
type WhereClause;
}
pub trait Query {
type SqlType;
}
pub trait AsQuery {
type Query: Query;
}
impl<T: Query> AsQuery for T {
type Query = Self;
}
pub trait FilterDsl<Predicate> {
type Output;
}
impl<T, Predicate> FilterDsl<Predicate> for T
where
T: Table,
T::Query: FilterDsl<Predicate>,
{
type Output = Filter<T::Query, Predicate>;
}
pub trait QuerySource {
type FromClause;
}
pub trait Table: QuerySource + AsQuery + Sized {
type PrimaryKey;
}
pub type Filter<Source, Predicate> = <Source as FilterDsl<Predicate>>::Output;
}
Can you give some pointer where that should be added as regression test? |
Thanks @weiznich, please add it as a UI test: https://rustc-dev-guide.rust-lang.org/tests/ui.html Somewhere in like |
…2, r=compiler-errors Add a regression test for rust-lang#104322 r? `@compiler-errors`
…2, r=compiler-errors Add a regression test for rust-lang#104322 r? ``@compiler-errors``
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#103065 (rustdoc-json: Document and Test that args can be patterns.) - rust-lang#104865 (Don't overwrite local changes when updating submodules) - rust-lang#104895 (Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code) - rust-lang#105063 (Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item.) - rust-lang#105064 (rustdoc: add comment to confusing CSS `main { min-width: 0 }`) - rust-lang#105074 (Add Nicholas Bishop to `.mailmap`) - rust-lang#105081 (Add a regression test for rust-lang#104322) - rust-lang#105086 (rustdoc: clean up sidebar link CSS) - rust-lang#105091 (add Tshepang Mbambo to .mailmap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…rors Reverts check done by rust-lang#100757 As my `fix` caused more issues than it resolved it's better to revert it. ( rust-lang#103274 rust-lang#104322 rust-lang#104606) r? `@compiler-errors` Reopens rust-lang#95134
Code
I tried this code:
I expected to see this happen: Code compiles, is it does with rust 1.64
Instead, this happened: Compiler emits new overflow error
Version it worked on
It most recently worked on: 1.64
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged
The text was updated successfully, but these errors were encountered: