rust/src/librustc
Mazdak Farrokhzad 2e11e81f1e
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
2019-09-15 19:35:59 +02:00
..
benches Remove licenses 2018-12-25 21:08:33 -07:00
dep_graph Refactor diagnostic emission for green nodes 2019-07-11 02:09:37 +02:00
hir Auto merge of #64469 - matthewjasper:increase-hygiene-use, r=petrochenkov 2019-09-15 08:17:57 +00:00
ich Rollup merge of #64066 - petrochenkov:softstab, r=matthewjasper 2019-09-08 00:07:31 +02:00
infer Shrink ObligationCauseCode by boxing IfExpression. 2019-09-09 14:20:24 +10:00
lint Rollup merge of #64066 - petrochenkov:softstab, r=matthewjasper 2019-09-08 00:07:31 +02:00
middle Rollup merge of #64290 - Mark-Simulacrum:span-no-main, r=estebank 2019-09-14 22:16:05 +02:00
mir Rollup merge of #64116 - ZeGentzy:patch-1, r=oli-obk 2019-09-14 16:42:20 +02:00
query Aggregation of cosmetic changes made during work on REPL PRs: librustc 2019-09-07 16:27:19 +01:00
session Apply suggestions from code review 2019-09-07 16:27:20 +01:00
traits Shrink ObligationCauseCode by boxing IfExpression. 2019-09-09 14:20:24 +10:00
ty Rollup merge of #64250 - Xanewok:save-analysis-assoc-nested, r=varkor 2019-09-15 19:35:59 +02:00
util Move librustc panic handler into the new one 2019-08-30 12:34:20 +02:00
arena.rs Aggregation of cosmetic changes made during work on REPL PRs: librustc 2019-09-07 16:27:19 +01:00
build.rs Remove licenses 2018-12-25 21:08:33 -07:00
Cargo.toml Auto merge of #60584 - jonas-schievink:ice-panic-hook, r=oli-obk 2019-09-15 00:10:08 +00:00
error_codes.rs Replace diagnostic plugins with macro_rules 2019-09-05 12:35:15 -04:00
lib.rs Auto merge of #60584 - jonas-schievink:ice-panic-hook, r=oli-obk 2019-09-15 00:10:08 +00:00
macros.rs Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
tests.rs librustc: Unconfigure tests during normal build 2019-08-02 01:59:01 +03:00

For more information about how rustc works, see the rustc guide.