Skip to content

Commit 619a696

Browse files
committed
clean up issue-2284 (core marker trait name shadowing)
1 parent 637b50b commit 619a696

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

tests/ui/issues/issue-2284.rs

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//@ run-pass
2+
#![allow(dead_code)]
3+
4+
//! Tests that user-defined trait is prioritized in compile time over
5+
//! the core::marker trait with the same name, allowing shadowing core traits.
6+
//!
7+
//! # Context
8+
//! Original issue: https://github.com/rust-lang/rust/issues/2284
9+
//! Original fix pull request: https://github.com/rust-lang/rust/pull/3792
10+
11+
12+
trait Send {
13+
fn f(&self);
14+
}
15+
16+
fn f<T:Send>(t: T) {
17+
t.f();
18+
}
19+
20+
pub fn main() {
21+
}

0 commit comments

Comments
 (0)