add comments to tests

This commit is contained in:
xonx 2026-02-13 14:44:40 +00:00
parent 7a7d48ea62
commit 34981bf3cd
4 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,7 @@
// Regression test for issue #149910.
// The compiler previously incorrectly claimed that the local param-env bound
// shadowed the global impl, but they are actually the same.
trait Trait {
type Assoc;
}

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/param-env-shadowing-false-positive.rs:10:5
--> $DIR/param-env-shadowing-false-positive.rs:14:5
|
LL | fn foo<T: Trait>(x: T::Assoc) -> u32 {
| --- expected `u32` because of return type

View file

@ -1,3 +1,7 @@
// Regression test for issue #149910.
// This ensures that the diagnostics logic handles Generic Associated Types (GATs)
// correctly without crashing (ICE).
trait Trait {
type Assoc<T>;
}

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/param-env-shadowing-gat.rs:10:5
--> $DIR/param-env-shadowing-gat.rs:14:5
|
LL | fn foo<T: Trait>(x: T::Assoc<T>) -> u32 {
| --- expected `u32` because of return type