6

recursive: fix hang on fulfill by slightly smarter check for progress. by Dirbai...

 2 years ago
source link: https://github.com/rust-lang/chalk/pull/752
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

@Dirbaio Dirbaio commented 8 days ago

This fixes a hang using the recursive solver when trying to prove exists<'a, T> { if(T: 'a) { WellFormed(&'a T) } }.

Snippet of the log when looping

The issue is:

  • it tries to prove InEnvironment { environment: Env([for<> ?0: '?1]), goal: ?2: '?3 }
  • it gets "useless" substs [?0 := ^0.0, ?1 := '^0.1]
  • it applies them, they cause nothing to change but it thinks they did
  • so in next round it processes again the exact same obligation...

There was already an if treating empty substs as "useless", this extends it to treating trivial subs as "useless". (empty substs are also trivial).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK