2024-04-07 16:53:54 +02:00
|
|
|
//@ check-pass
|
|
|
|
|
//@ edition:2021
|
|
|
|
|
|
|
|
|
|
// https://github.com/rust-lang/rust/issues/123573#issue-2229428739
|
|
|
|
|
|
2024-06-27 08:05:07 +02:00
|
|
|
#![warn(non_local_definitions)]
|
|
|
|
|
|
2024-04-07 16:53:54 +02:00
|
|
|
pub trait Test {}
|
|
|
|
|
|
|
|
|
|
impl<'a, T: 'a> Test for &[T] where &'a T: Test {}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
struct Local {}
|
|
|
|
|
impl Test for &Local {}
|
|
|
|
|
//~^ WARN non-local `impl` definition
|
|
|
|
|
}
|