0c0dfb88ee
as request T-lang is requesting some major changes in the lint inner workings in #126768#issuecomment-2192634762
20 lines
325 B
Rust
20 lines
325 B
Rust
//@ check-pass
|
|
|
|
#![warn(non_local_definitions)]
|
|
|
|
trait Trait<T> {}
|
|
|
|
fn main() {
|
|
mod below {
|
|
pub struct Type<T>(T);
|
|
}
|
|
struct InsideMain;
|
|
trait HasFoo {}
|
|
|
|
impl<T> Trait<InsideMain> for &Vec<below::Type<(InsideMain, T)>>
|
|
//~^ WARN non-local `impl` definition
|
|
where
|
|
T: HasFoo
|
|
{}
|
|
}
|