rust/tests/ui/drop/dropck-normalize-errors.rs
Rémy Rakic f4094ea252 update test expectations for boring locals + dropckoutlives interactions
The suboptimal error only appears with NLLs due to liveness differences
where polonius cannot have as many boring locals. Sometimes this causes
NLLs to emit a duplicate error as well.
2025-08-08 14:10:41 +00:00

36 lines
738 B
Rust

// Test that we don't ICE when computing the drop types for
//@ ignore-compare-mode-polonius (explicit revisions)
//@ revisions: nll polonius
//@ [polonius] compile-flags: -Zpolonius=next
trait Decode<'a> {
type Decoder;
}
trait NonImplementedTrait {
type Assoc;
}
struct NonImplementedStruct;
pub struct ADecoder<'a> {
b: <B as Decode<'a>>::Decoder,
}
fn make_a_decoder<'a>() -> ADecoder<'a> {
//~^ ERROR the trait bound
//[nll]~| ERROR the trait bound
panic!()
}
struct B;
impl<'a> Decode<'a> for B {
type Decoder = BDecoder;
//~^ ERROR the trait bound
}
pub struct BDecoder {
non_implemented: <NonImplementedStruct as NonImplementedTrait>::Assoc,
//~^ ERROR the trait bound
}
fn main() {}