Auto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakis
ty/walk: iterate `GenericArg`s instead of `Ty`s. Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it. By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`. I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
This commit is contained in:
commit
209b2be09f
23 changed files with 616 additions and 601 deletions
|
|
@ -8,8 +8,8 @@ extern crate coherence_lib as lib;
|
|||
use lib::*;
|
||||
|
||||
#[fundamental]
|
||||
struct Local;
|
||||
struct Local<T>(T);
|
||||
|
||||
impl Remote for Local {}
|
||||
impl Remote for Local<()> {}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue