Rollup merge of #93226 - compiler-errors:issue-93141, r=jackh726
Normalize field access types during borrowck I think a normalize was just left out here, since we normalize analogously throughout this file. Fixes #93141
This commit is contained in:
commit
5adef281d6
2 changed files with 26 additions and 0 deletions
25
src/test/ui/generic-associated-types/issue-93141.rs
Normal file
25
src/test/ui/generic-associated-types/issue-93141.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// check-pass
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
pub trait Fooey: Sized {
|
||||
type Context<'c> where Self: 'c;
|
||||
}
|
||||
|
||||
pub struct Handle<E: Fooey>(Option<Box<dyn for<'c> Fn(&mut E::Context<'c>)>>);
|
||||
|
||||
fn tuple<T>() -> (Option<T>,) { (Option::None,) }
|
||||
|
||||
pub struct FooImpl {}
|
||||
impl Fooey for FooImpl {
|
||||
type Context<'c> = &'c ();
|
||||
}
|
||||
|
||||
impl FooImpl {
|
||||
pub fn fail1() -> Handle<Self> {
|
||||
let (tx,) = tuple();
|
||||
Handle(tx)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue