Skip to content

Commit c949908

Browse files
committed
Update some tests from mgca changes
1 parent 7a3630b commit c949908

File tree

4 files changed

+6
-39
lines changed

4 files changed

+6
-39
lines changed

tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ check-pass
2+
13
#![feature(associated_const_equality, generic_const_items)]
24
#![expect(incomplete_features)]
35

@@ -16,9 +18,4 @@ fn bar<const N: u32, T: Foo<ASSOC<N> = 10>>() {}
1618

1719
fn main() {
1820
bar::<_, ()>();
19-
//~^ ERROR: type mismatch resolving `<() as Foo>::ASSOC<_> == 10`
20-
21-
// FIXME(mgca):
22-
// FIXME(associated_const_equality):
23-
// This ought to start compiling once const items are aliases rather than bodies
2421
}

tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.stderr

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
1919
fn foo()
2020
where
2121
(): Trait,
22-
//~^ ERROR type mismatch resolving
22+
//~^ ERROR type annotations needed
2323
{
2424
}
2525

tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.stderr

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,13 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self
1414
LL | impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
1515
| ^ unconstrained type parameter
1616

17-
error[E0271]: type mismatch resolving `<(_,) as AssocConst>::A == 0`
17+
error[E0282]: type annotations needed
1818
--> $DIR/unconstrained_impl_param.rs:21:5
1919
|
2020
LL | (): Trait,
21-
| ^^^^^^^^^ expected `0`, found `<(_,) as AssocConst>::A`
22-
|
23-
= note: expected constant `0`
24-
found constant `<(_,) as AssocConst>::A`
25-
note: required for `()` to implement `Trait`
26-
--> $DIR/unconstrained_impl_param.rs:15:9
27-
|
28-
LL | impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
29-
| ^^^^^ ^^ --------- unsatisfied trait bound introduced here
30-
= help: see issue #48214
31-
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
32-
|
33-
LL + #![feature(trivial_bounds)]
34-
|
21+
| ^^^^^^^^^ cannot infer type for type parameter `U`
3522

3623
error: aborting due to 3 previous errors
3724

38-
Some errors have detailed explanations: E0207, E0271, E0658.
25+
Some errors have detailed explanations: E0207, E0282, E0658.
3926
For more information about an error, try `rustc --explain E0207`.

0 commit comments

Comments
 (0)