Fix test on WASM target by making ambiguity pruning more agressive
This commit is contained in:
parent
fd3804ab50
commit
8d92c996ca
2 changed files with 1 additions and 3 deletions
|
@ -2103,7 +2103,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||||
// It doesn't make sense to talk about applicable impls if there are more than a
|
// It doesn't make sense to talk about applicable impls if there are more than a
|
||||||
// handful of them. If there are a lot of them, but only a few of them have no type
|
// handful of them. If there are a lot of them, but only a few of them have no type
|
||||||
// params, we only show those, as they are more likely to be useful/intended.
|
// params, we only show those, as they are more likely to be useful/intended.
|
||||||
if ambiguities.len() > 20 {
|
if ambiguities.len() > 5 {
|
||||||
let infcx = self.infcx;
|
let infcx = self.infcx;
|
||||||
if !ambiguities.iter().all(|option| match option {
|
if !ambiguities.iter().all(|option| match option {
|
||||||
DefId(did) => infcx.fresh_args_for_item(DUMMY_SP, *did).is_empty(),
|
DefId(did) => infcx.fresh_args_for_item(DUMMY_SP, *did).is_empty(),
|
||||||
|
|
|
@ -50,8 +50,6 @@ LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect(
|
||||||
- impl From<char> for u32;
|
- impl From<char> for u32;
|
||||||
- impl From<u16> for u32;
|
- impl From<u16> for u32;
|
||||||
- impl From<u8> for u32;
|
- impl From<u8> for u32;
|
||||||
- impl<T> From<!> for T;
|
|
||||||
- impl<T> From<T> for T;
|
|
||||||
help: try using a fully qualified path to specify the expected types
|
help: try using a fully qualified path to specify the expected types
|
||||||
|
|
|
|
||||||
LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(<u32 as Into<T>>::into(0u32))).collect();
|
LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(<u32 as Into<T>>::into(0u32))).collect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue