Skip to content

Commit

Permalink
Fix test on WASM target by making ambiguity pruning more agressive
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Oct 4, 2023
1 parent fd3804a commit 8d92c99
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
// 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.
if ambiguities.len() > 20 {
if ambiguities.len() > 5 {
let infcx = self.infcx;
if !ambiguities.iter().all(|option| match option {
DefId(did) => infcx.fresh_args_for_item(DUMMY_SP, *did).is_empty(),
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/traits/issue-77982.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect(
- impl From<char> for u32;
- impl From<u16> 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
|
LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(<u32 as Into<T>>::into(0u32))).collect();
Expand Down

0 comments on commit 8d92c99

Please sign in to comment.