diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/issues/issue-2284.rs | 13 | ||||
| -rw-r--r-- | tests/ui/traits/core-marker-name-shadowing-issue-2284.rs | 21 |
2 files changed, 21 insertions, 13 deletions
diff --git a/tests/ui/issues/issue-2284.rs b/tests/ui/issues/issue-2284.rs deleted file mode 100644 index 358331ecd9a..00000000000 --- a/tests/ui/issues/issue-2284.rs +++ /dev/null @@ -1,13 +0,0 @@ -//@ run-pass -#![allow(dead_code)] - -trait Send { - fn f(&self); -} - -fn f<T:Send>(t: T) { - t.f(); -} - -pub fn main() { -} diff --git a/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs b/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs new file mode 100644 index 00000000000..e5d083ac8c3 --- /dev/null +++ b/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs @@ -0,0 +1,21 @@ +//@ run-pass +#![allow(dead_code)] + +//! Tests that user-defined trait is prioritized in compile time over +//! the core::marker trait with the same name, allowing shadowing core traits. +//! +//! # Context +//! Original issue: https://github.com/rust-lang/rust/issues/2284 +//! Original fix pull request: https://github.com/rust-lang/rust/pull/3792 + + +trait Send { + fn f(&self); +} + +fn f<T:Send>(t: T) { + t.f(); +} + +pub fn main() { +} |
