Rollup merge of #136199 - purplesyringa:emscripten-tests, r=jieyouxu

Fix a couple Emscripten tests

This fixes a couple Emscripten tests where the correct fix is more or less obvious. A couple UI tests are still broken with this PR:

- `tests/ui/abi/numbers-arithmetic/return-float.rs` (#136197)
- `tests/ui/no_std/no-std-unwind-binary.rs` (haven't debugged yet)
- `tests/ui/test-attrs/test-passed.rs` (haven't debugged this either)

`````@rustbot````` label +T-compiler +O-emscripten
This commit is contained in:
Matthias Krüger 2025-01-30 12:45:35 +01:00 committed by GitHub
commit d7668d8bf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 41 additions and 10 deletions

View file

@ -1,11 +1,11 @@
error[E0405]: cannot find trait `Equivalent` in this scope
--> $DIR/sysroot-private.rs:26:18
--> $DIR/sysroot-private.rs:27:18
|
LL | trait Trait2<K>: Equivalent<K> {}
| ^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `K` in this scope
--> $DIR/sysroot-private.rs:31:35
--> $DIR/sysroot-private.rs:32:35
|
LL | fn trait_member<T>(val: &T, key: &K) -> bool {
| - ^
@ -22,13 +22,13 @@ LL | fn trait_member<T, K>(val: &T, key: &K) -> bool {
| +++
error[E0220]: associated type `ExpressionStack` not found for `Trait`
--> $DIR/sysroot-private.rs:21:31
--> $DIR/sysroot-private.rs:22:31
|
LL | type AssociatedTy = dyn Trait<ExpressionStack = i32, Bar = i32>;
| ^^^^^^^^^^^^^^^ help: `Trait` has the following associated type: `Bar`
error[E0425]: cannot find function `memchr2` in this scope
--> $DIR/sysroot-private.rs:39:5
--> $DIR/sysroot-private.rs:40:5
|
LL | memchr2(b'a', b'b', buf)
| ^^^^^^^ not found in this scope

View file

@ -7,6 +7,7 @@
//! of `std`'s dependencies, but may not be robust against dependency upgrades/changes.
//@ only-unix Windows sysroots seem to not expose this dependency
//@ ignore-emscripten neither does Emscripten
//@ revisions: default rustc_private_enabled
// Enabling `rustc_private` should `std`'s dependencies accessible, so they should show up

View file

@ -1,11 +1,11 @@
error[E0405]: cannot find trait `Equivalent` in this scope
--> $DIR/sysroot-private.rs:26:18
--> $DIR/sysroot-private.rs:27:18
|
LL | trait Trait2<K>: Equivalent<K> {}
| ^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `K` in this scope
--> $DIR/sysroot-private.rs:31:35
--> $DIR/sysroot-private.rs:32:35
|
LL | fn trait_member<T>(val: &T, key: &K) -> bool {
| - ^
@ -22,13 +22,13 @@ LL | fn trait_member<T, K>(val: &T, key: &K) -> bool {
| +++
error[E0220]: associated type `ExpressionStack` not found for `Trait`
--> $DIR/sysroot-private.rs:21:31
--> $DIR/sysroot-private.rs:22:31
|
LL | type AssociatedTy = dyn Trait<ExpressionStack = i32, Bar = i32>;
| ^^^^^^^^^^^^^^^ there is an associated type `ExpressionStack` in the trait `gimli::read::op::EvaluationStorage`
error[E0425]: cannot find function `memchr2` in this scope
--> $DIR/sysroot-private.rs:39:5
--> $DIR/sysroot-private.rs:40:5
|
LL | memchr2(b'a', b'b', buf)
| ^^^^^^^ not found in this scope