# 2022-05-22 meeting
Previously decided to layout a plan to be able to model a test: [#25680](https://github.com/rust-lang/rust/issues/25680)
There are docs for setting up `a-mir-formality`
[available here](https://nikomatsakis.github.io/a-mir-formality/docs/setup)
* Should include hack for Magic Racket:
*
[from here](https://github.com/rust-lang/rust/blob/master/src/test/ui/generic-associated-types/extended/lending_iterator_2.rs):
```rust
pub trait FromLendingIterator<A>: Sized {
fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self;
}
impl<A> FromLendingIterator<A> for Vec<A> {
fn from_iter<I: for<'x> LendingIterator<Item<'x> = A>>(mut iter: I) -> Self {
//[base]~^ impl has stricter
let mut v = vec![];
while let Some(item) = iter.next() {
v.push(item);
}
v
}
}
pub trait LendingIterator {
type Item<'a>
where
Self: 'a;
fn next(&mut self) -> Option<Self::Item<'_>>;
}
fn main() {}
```
* things we need for this example:
* lowering from "user types" to "internal types"
* need rust surface types that get lowered to internal types
* well-formedness check:
* check that the traits are well-formed
* check that the impl is well-formed
* check that the impl signatures match the trait
* coherence check:
* not a good example because there is only one impl
* type check of the (default) function:
* convert the MIR into goals
* do the type check
*