Skip to content

better_any regression #183

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
compiler-errors opened this issue Apr 18, 2025 · 0 comments
Open

better_any regression #183

compiler-errors opened this issue Apr 18, 2025 · 0 comments
Labels
from-crater A regression found via a crater run, not part of our test suite

Comments

@compiler-errors
Copy link
Member

https://crater-reports.s3.amazonaws.com/pr-133502-2/try%23da0a4799770027c4c578bf48cdb390acfde09023/reg/better_any-0.2.0/log.txt

use std::any::TypeId;

unsafe trait TidAble<'a>: Tid<'a> {}
trait TidExt<'a>: Tid<'a> {
    fn downcast_box(self: Box<Self>) {
        loop {}
    }
}

impl<'a, X: ?Sized + Tid<'a>> TidExt<'a> for X {}

unsafe trait Tid<'a>: 'a {}

unsafe impl<'a, T: ?Sized + TidAble<'a>> Tid<'a> for T {}

impl<'a> dyn Tid<'a> + 'a {
    fn downcast_any_box(self: Box<Self>) {
        self.downcast_box();
    }
}

unsafe impl<'a> TidAble<'a> for dyn Tid<'a> + 'a {}
error[E0283]: type annotations needed: cannot satisfy `dyn Tid<'a>: Tid<'_>`
  --> src/lib.rs:18:14
   |
18 |         self.downcast_box();

Conflict between blanket impl and dyn impl. Probably fixed if we were to fix the dyn overlap problem.

@lcnr lcnr added the from-crater A regression found via a crater run, not part of our test suite label Apr 19, 2025
@lcnr lcnr changed the title better_any regression better_any regression May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from-crater A regression found via a crater run, not part of our test suite
Projects
Status: unknown
Development

No branches or pull requests

2 participants