mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
bd32c4c21e
PR #121208 converted this from a `span_delayed_bug` to a `span_bug` because nothing in the test suite caused execution to hit this path. But now fuzzing has found a test case that does hit it. So this commit converts it back to `span_delayed_bug` and adds the relevant test. Fixes #126385.
15 lines
401 B
Rust
15 lines
401 B
Rust
// This test was triggering a `span_bug` crash, which was then fixed by
|
|
// downgrading it to a `span_delayed_bug`.
|
|
|
|
pub struct MyStruct<'field> {
|
|
field: &'field [u32],
|
|
}
|
|
|
|
impl MyStruct<'_> {
|
|
pub fn f(field: &[u32]) -> Self<u32> { //~ ERROR type arguments are not allowed on self type
|
|
Self { field } //~ ERROR lifetime may not live long enough
|
|
}
|
|
}
|
|
|
|
fn main() {}
|