Files
rust/tests/ui/lint/non-local-defs/trait-solver-overflow-123573.rs
Urgau 0c0dfb88ee Switch back non_local_definitions lint to allow-by-default
as request T-lang is requesting some major changes in the lint inner
workings in #126768#issuecomment-2192634762
2024-06-27 08:05:07 +02:00

17 lines
310 B
Rust

//@ check-pass
//@ edition:2021
// https://github.com/rust-lang/rust/issues/123573#issue-2229428739
#![warn(non_local_definitions)]
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
}