summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.rs
blob: 5053c115b45377e7ed748399508f3d6f3dab54e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(do_not_recommend)]

pub trait Foo {
}

impl Foo for i32 {
}

pub trait Bar {
}

#[do_not_recommend]
impl<T: Foo> Bar for T {
}

fn stuff<T: Bar>(_: T) {}

fn main() {
    stuff(1u8);
    //~^ the trait bound `u8: Foo` is not satisfied
}