re-introduce a cache for ast-ty-to-ty
It turns out that `ast_ty_to_ty` is supposed to be updating the `def` after it finishes, but at some point in the past it stopped doing so. This was never noticed because of the `ast_ty_to_ty_cache`, but that cache was recently removed. This PR fixes the code to update the def properly, but apparently that is not quite enough to make the operation idempotent, so for now we reintroduce the cache too. Fixes #33425.
This commit is contained in:
parent
e88defe718
commit
aa00e3a552
6 changed files with 98 additions and 27 deletions
26
src/test/run-pass/associated-types-in-bound-type-arg.rs
Normal file
26
src/test/run-pass/associated-types-in-bound-type-arg.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Test the case where we resolve `C::Result` and the trait bound
|
||||
// itself includes a `Self::Item` shorthand.
|
||||
//
|
||||
// Regression test for issue #33425.
|
||||
|
||||
trait ParallelIterator {
|
||||
type Item;
|
||||
fn drive_unindexed<C>(self, consumer: C) -> C::Result
|
||||
where C: Consumer<Self::Item>;
|
||||
}
|
||||
|
||||
pub trait Consumer<ITEM> {
|
||||
type Result;
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
Loading…
Add table
Add a link
Reference in a new issue