diff options
Diffstat (limited to 'tests/ui/lint/non-local-defs/trait-solver-overflow-123573.rs')
| -rw-r--r-- | tests/ui/lint/non-local-defs/trait-solver-overflow-123573.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/lint/non-local-defs/trait-solver-overflow-123573.rs b/tests/ui/lint/non-local-defs/trait-solver-overflow-123573.rs new file mode 100644 index 00000000000..4291426e046 --- /dev/null +++ b/tests/ui/lint/non-local-defs/trait-solver-overflow-123573.rs @@ -0,0 +1,14 @@ +//@ check-pass +//@ edition:2021 + +// https://github.com/rust-lang/rust/issues/123573#issue-2229428739 + +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 +} |
