-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
internal compiler error: unexpected panic #9414
Comments
I can't manage to make a repro. Can you share the code? It's failing on a |
The use std::{
error::Error,
sync::{Mutex, MutexGuard},
};
#[cfg(test)]
mod tests;
pub type Result<'a, T> = std::result::Result<T, Box<dyn 'a + Error>>;
#[derive(Default)]
pub struct Foo<T: Send> {
data: Mutex<T>,
}
pub struct WriteLock<'a, T: Send + 'a>(MutexGuard<'a, T>);
impl<'a, T: Send + 'a> WriteLock<'a, T> {
pub fn get(&self) -> &T {
&self.0
}
}
impl<T: Sync + Send> Foo<T> {
pub fn foo(&self) -> Result<WriteLock<T>> {
Ok(WriteLock(self.data.try_lock()?))
}
} |
Looks like the latest nightly is working (2022-08-31) |
My clippy version is 09-01 🤔 |
I guess the playground hadn't updated by the time I checked. |
Thank you so much for the quick response and fix!👏 |
The change will be in nightly about a week from now. |
Thanks for the very fast fix, we hit that too in our CI ! |
Hey all, I get this message when running clippy nightly on my project:
Info
lib.rs
with ~70 lines, andtests.rs
with 12 lines)unsafe
or anythingworkspace
configuration, and ~80 other crates (Idk if it helps, just trying to provide as much relevant context as I can)Please lmk if there's anything else you need from me, and thank you for this amazing project! 🙂
The text was updated successfully, but these errors were encountered: