mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
fix tidy and bless test
This commit is contained in:
parent
7fc84ac964
commit
fb8784585e
@ -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
|
||||
|
@ -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();
|
||||
| ^^
|
||||
|
Loading…
x
Reference in New Issue
Block a user