]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/imm-ref-trait-object-literal.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / suggestions / imm-ref-trait-object-literal.rs
CommitLineData
e74abb32
XL
1trait Trait {}
2
3struct S;
4
5impl<'a> Trait for &'a mut S {}
6
7fn foo<X: Trait>(_: X) {}
8
9
10fn main() {
11 let s = S;
12 foo(&s); //~ ERROR the trait bound `&S: Trait` is not satisfied
13 foo(s); //~ ERROR the trait bound `S: Trait` is not satisfied
14}