diff options
| author | Skgland <bennet.blessmann+github@googlemail.com> | 2025-05-05 21:09:31 +0200 |
|---|---|---|
| committer | Bennet Bleßmann <bennet.blessmann+github@googlemail.com> | 2025-05-05 21:09:31 +0200 |
| commit | fb8784585eece42a22c782bb01c1c2f188f70505 (patch) | |
| tree | b959959192f7b5f06f3dc3228e4ef20893dbafce | |
| parent | 7fc84ac964b45955cc9beb7ec269d3d06a3591ab (diff) | |
| download | rust-fb8784585eece42a22c782bb01c1c2f188f70505.tar.gz rust-fb8784585eece42a22c782bb01c1c2f188f70505.zip | |
fix tidy and bless test
| -rw-r--r-- | tests/ui/type-inference/regression-issue-81317.rs | 12 | ||||
| -rw-r--r-- | tests/ui/type-inference/regression-issue-81317.stderr | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/ui/type-inference/regression-issue-81317.rs b/tests/ui/type-inference/regression-issue-81317.rs index 39c91948426..0b1266e6a0f 100644 --- a/tests/ui/type-inference/regression-issue-81317.rs +++ b/tests/ui/type-inference/regression-issue-81317.rs @@ -1,6 +1,7 @@ // Regression test for #81317: type can no longer be infered as of 1.49 // -// The problem is that the xor operator and the index.into() each have two candidate impls that could apply +// The problem is that the xor operator and the index.into() call +// each have two candidate impls that could apply // { S as BitXor<S>, S as BitXor<&'a S> } for xor and // { T::I as Into<u64>, T::I as Into<S> } for index.into() // previously inference was able to infer that the only valid combination was @@ -8,13 +9,14 @@ // // after rust-lang/rust#73905 this is no longer infered // -// the error message could be better e.g. when iv is unused or has an an explicitly specified type S +// the error message could be better e.g. +// when iv is unused or has an an explicitly specified type S // there is currently the following help message // // error[E0284]: type annotations needed // --> src/main.rs:13:24 // | -// 42 | let iv = S ^ index.into(); +// 44 | let iv = S ^ index.into(); // | - ^^^^ // | | // | type must be known at this point @@ -22,8 +24,8 @@ // = note: cannot satisfy `<S as BitXor<_>>::Output == _` // help: try using a fully qualified path to specify the expected types // | -// 42 - let iv = S ^ index.into(); -// 42 + let iv = S ^ <<T as P>::I as Into<T>>::into(index); +// 44 - let iv = S ^ index.into(); +// 44 + let iv = S ^ <<T as P>::I as Into<T>>::into(index); // // this is better as it's actually sufficent to fix the problem, // while just specifying the type of iv as currently suggested is insufficent diff --git a/tests/ui/type-inference/regression-issue-81317.stderr b/tests/ui/type-inference/regression-issue-81317.stderr index d018a2c4854..fcd3fca06e1 100644 --- a/tests/ui/type-inference/regression-issue-81317.stderr +++ b/tests/ui/type-inference/regression-issue-81317.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/regression-issue-81317.rs:13:9 + --> $DIR/regression-issue-81317.rs:44:9 | LL | let iv = S ^ index.into(); | ^^ |
