diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-15 19:35:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-15 19:35:59 +0200 |
| commit | 2e11e81f1e94c7883c7dde694e9ba6f7a562dd91 (patch) | |
| tree | 113a8dcc0720bc0c29b993f5afd6626c324cd40a /src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs | |
| parent | 0a2e07ec1dc5194e12dfb1ca00c4bc87533ac88d (diff) | |
| parent | a946b8d6e1ff39f22e3f9f1c46ba81898901d907 (diff) | |
| download | rust-2e11e81f1e94c7883c7dde694e9ba6f7a562dd91.tar.gz rust-2e11e81f1e94c7883c7dde694e9ba6f7a562dd91.zip | |
Rollup merge of #64250 - Xanewok:save-analysis-assoc-nested, r=varkor
save-analysis: Nest typeck tables when processing functions/methods
Fixes an issue where we did not nest tables correctly when resolving
associated types in formal argument/return type positions.
This was the minimized reproduction case that I tested the fix on:
```rust
pub trait Trait {
type Assoc;
}
pub struct A;
pub fn func() {
fn _inner1<U: Trait>(_: U::Assoc) {}
fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }
impl A {
fn _inner1<U: Trait>(self, _: U::Assoc) {}
fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() }
}
}
```
using `debug_assertions`-enabled rustc and by additionally passing `-Zsave-analysis`.
Unfortunately the original assertion fired is a *debug* one and from what I can tell we don't run the tests with these on, so I'm not adding a test here. If I missed it and there is a way to run tests with these on, I'd love to add a test case for this.
Closes #63663
Closes #50328
Closes #43982
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs')
0 files changed, 0 insertions, 0 deletions
