Skip to content

Commit c9fb097

Browse files
committed
use a different trait for sysroot-private tests
1 parent 578b1b4 commit c9fb097

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

tests/ui/privacy/sysroot-private.default.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
error[E0405]: cannot find trait `Equivalent` in this scope
1+
error[E0405]: cannot find trait `Relocate` in this scope
22
--> $DIR/sysroot-private.rs:27:18
33
|
4-
LL | trait Trait2<K>: Equivalent<K> {}
5-
| ^^^^^^^^^^ not found in this scope
4+
LL | trait Trait2<K>: Relocate<K> {}
5+
| ^^^^^^^^ not found in this scope
66

77
error[E0412]: cannot find type `K` in this scope
8-
--> $DIR/sysroot-private.rs:32:35
8+
--> $DIR/sysroot-private.rs:32:34
99
|
10-
LL | fn trait_member<T>(val: &T, key: &K) -> bool {
11-
| - ^
10+
LL | fn trait_member<T>(val: &T, key: K) -> bool {
11+
| - ^
1212
| |
1313
| similarly named type parameter `T` defined here
1414
|
1515
help: a type parameter with a similar name exists
1616
|
17-
LL - fn trait_member<T>(val: &T, key: &K) -> bool {
18-
LL + fn trait_member<T>(val: &T, key: &T) -> bool {
17+
LL - fn trait_member<T>(val: &T, key: K) -> bool {
18+
LL + fn trait_member<T>(val: &T, key: T) -> bool {
1919
|
2020
help: you might be missing a type parameter
2121
|
22-
LL | fn trait_member<T, K>(val: &T, key: &K) -> bool {
22+
LL | fn trait_member<T, K>(val: &T, key: K) -> bool {
2323
| +++
2424

2525
error[E0220]: associated type `ExpressionStack` not found for `Trait`

tests/ui/privacy/sysroot-private.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ type AssociatedTy = dyn Trait<ExpressionStack = i32, Bar = i32>;
2323
//~^ ERROR associated type `ExpressionStack` not found
2424
//[rustc_private_enabled]~| NOTE there is an associated type `ExpressionStack` in the trait `gimli::read::op::EvaluationStorage`
2525

26-
// Attempt to get a suggestion for `hashbrown::Equivalent`
27-
trait Trait2<K>: Equivalent<K> {}
26+
// Attempt to get a suggestion for `gimli::read::Relocate`
27+
trait Trait2<K>: Relocate<K> {}
2828
//~^ ERROR cannot find trait
2929
//~| NOTE not found
3030

31-
// Attempt to get a suggestion for `hashbrown::Equivalent::equivalent`
32-
fn trait_member<T>(val: &T, key: &K) -> bool {
31+
// Attempt to get a suggestion for `gimli::read::Relocate::relocate_address`
32+
fn trait_member<T>(val: &T, key: K) -> bool {
3333
//~^ ERROR cannot find type `K`
3434
//~| NOTE similarly named
35-
val.equivalent(key)
35+
val.relocate_address(key, 0).is_ok()
3636
}
3737

3838
// Attempt to get a suggestion for `memchr::memchr2`

tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
error[E0405]: cannot find trait `Equivalent` in this scope
1+
error[E0405]: cannot find trait `Relocate` in this scope
22
--> $DIR/sysroot-private.rs:27:18
33
|
4-
LL | trait Trait2<K>: Equivalent<K> {}
5-
| ^^^^^^^^^^ not found in this scope
4+
LL | trait Trait2<K>: Relocate<K> {}
5+
| ^^^^^^^^ not found in this scope
66

77
error[E0412]: cannot find type `K` in this scope
8-
--> $DIR/sysroot-private.rs:32:35
8+
--> $DIR/sysroot-private.rs:32:34
99
|
10-
LL | fn trait_member<T>(val: &T, key: &K) -> bool {
11-
| - ^
10+
LL | fn trait_member<T>(val: &T, key: K) -> bool {
11+
| - ^
1212
| |
1313
| similarly named type parameter `T` defined here
1414
|
1515
help: a type parameter with a similar name exists
1616
|
17-
LL - fn trait_member<T>(val: &T, key: &K) -> bool {
18-
LL + fn trait_member<T>(val: &T, key: &T) -> bool {
17+
LL - fn trait_member<T>(val: &T, key: K) -> bool {
18+
LL + fn trait_member<T>(val: &T, key: T) -> bool {
1919
|
2020
help: you might be missing a type parameter
2121
|
22-
LL | fn trait_member<T, K>(val: &T, key: &K) -> bool {
22+
LL | fn trait_member<T, K>(val: &T, key: K) -> bool {
2323
| +++
2424

2525
error[E0220]: associated type `ExpressionStack` not found for `Trait`

0 commit comments

Comments
 (0)