Skip to content

looking up hidden types in the opaque storage may need to consider duplicate entries #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lcnr opened this issue May 1, 2025 · 0 comments

Comments

@lcnr
Copy link
Contributor

lcnr commented May 1, 2025

only necessary after rust-lang/rust#140497 rust-lang/rust#140405

my worry is something like this, even if I can't quite exploit it

trait Trait {
    type Assoc;
}
impl<T> Trait for T {
    type Assoc = String;
}

fn get_assoc<T: Trait>(x: T) -> T::Assoc {
    loop {}
}
fn foo<T: Copy + Default>(x: T) -> impl Trait<Assoc = String> + Default + Copy {
    let mut y = Default::default();
    let mut inf1 = Default::default();
    inf1 = foo(y);
    let inf = Default::default();
    if false {
        return inf;
    }
    y = x;
    get_assoc(inf1).len()
} 

TODO: lcnr explain/figure out

@lcnr lcnr moved this from unknown to potentially irrelevant in -Znext-solver=globally May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: potentially irrelevant
Development

No branches or pull requests

1 participant