Skip to content

Commit 825833c

Browse files
committed
Auto merge of #14378 - lowr:patch/bump-chalk-0.89, r=lnicola
internal: Bump chalk This release fixes a problem around GATs (rust-lang/chalk#790). While a regression test is added in chalk's own test suite, I also added one in ours so that we can catch regressions when we move away from chalk. Fixes #14164
2 parents 7c05f55 + e12460b commit 825833c

File tree

3 files changed

+44
-12
lines changed

3 files changed

+44
-12
lines changed

Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/hir-ty/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ either = "1.7.0"
2222
tracing = "0.1.35"
2323
rustc-hash = "1.1.0"
2424
scoped-tls = "1.0.0"
25-
chalk-solve = { version = "0.88.0", default-features = false }
26-
chalk-ir = "0.88.0"
27-
chalk-recursive = { version = "0.88.0", default-features = false }
28-
chalk-derive = "0.88.0"
25+
chalk-solve = { version = "0.89.0", default-features = false }
26+
chalk-ir = "0.89.0"
27+
chalk-recursive = { version = "0.89.0", default-features = false }
28+
chalk-derive = "0.89.0"
2929
la-arena = { version = "0.3.0", path = "../../lib/la-arena" }
3030
once_cell = "1.17.0"
3131
typed-arena = "2.0.1"

crates/hir-ty/src/tests/regression.rs

+32
Original file line numberDiff line numberDiff line change
@@ -1756,3 +1756,35 @@ const C: usize = 2 + 2;
17561756
"#,
17571757
);
17581758
}
1759+
1760+
#[test]
1761+
fn regression_14164() {
1762+
check_types(
1763+
r#"
1764+
trait Rec {
1765+
type K;
1766+
type Rebind<Tok>: Rec<K = Tok>;
1767+
}
1768+
1769+
trait Expr<K> {
1770+
type Part: Rec<K = K>;
1771+
fn foo(_: <Self::Part as Rec>::Rebind<i32>) {}
1772+
}
1773+
1774+
struct Head<K>(K);
1775+
impl<K> Rec for Head<K> {
1776+
type K = K;
1777+
type Rebind<Tok> = Head<Tok>;
1778+
}
1779+
1780+
fn test<E>()
1781+
where
1782+
E: Expr<usize, Part = Head<usize>>,
1783+
{
1784+
let head;
1785+
//^^^^ Head<i32>
1786+
E::foo(head);
1787+
}
1788+
"#,
1789+
);
1790+
}

0 commit comments

Comments
 (0)