Closed andrewhickman closed 7 years ago
Minimal reproducible example (without sdl2 requirement):
lib.rs of crate "s":
#[repr(u8)]
pub enum E {
B = 1 as u8,
}
main.rs of crate "t":
extern crate s;
enum I {
E(s::E),
}
fn main() {}
No repro on stable (Regression).
The error on this line (<LintId as Decodable>::decode()
) is FindLintError::NotFound
. The LintStore is actually empty at this point.
The LintStore becomes empty due to check_crate
temporarily moving out the LintStore until the end of the function. But walk_crate
eventually needs to decode the crate "s", which has an trivial_numeric_casts
lint that is not found in the empty LintStore.
Compiling this short snippet causes a compiler panic
Compiler version:
SDL version was
0.29.0
.Backtrace: