]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-14853.rs
Auto merge of #104013 - notriddle:notriddle/rustdoc-sizeof, r=GuillaumeGomez
[rust.git] / src / test / ui / issues / issue-14853.rs
1 use std::fmt::Debug;
2
3 trait Str {}
4
5 trait Something: Sized {
6     fn yay<T: Debug>(_: Option<Self>, thing: &[T]);
7 }
8
9 struct X { data: u32 }
10
11 impl Something for X {
12     fn yay<T: Str>(_:Option<X>, thing: &[T]) {
13     //~^ ERROR E0276
14     }
15 }
16
17 fn main() {
18     let arr = &["one", "two", "three"];
19     println!("{:?}", Something::yay(None::<X>, arr));
20 }