about summary refs log tree commit diff
path: root/tests/ui/traits/core-marker-name-shadowing-issue-2284.rs
blob: e5d083ac8c3fb8fb0e98407e030133f679f758e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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() {
}