repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
SVE intrinsics: Fold svdiv with all-zero operands to zero vector
[official-gcc.git]
/
gcc
/
testsuite
/
rust
/
compile
/
issue-2070.rs
blob
981e59926fbb95cf096b1034b9e5351f1d4b65f3
1
#[lang = "sized"]
2
pub trait Sized {}
3
4
trait Foo {
5
fn get(self) -> i32;
6
}
7
8
struct Bar(i32);
9
impl Foo for Bar {
10
fn get(self) -> i32 {
11
self.0
12
}
13
}
14
15
fn type_bound_test<T: Foo>(a: T) -> i32 {
16
Foo::get(a)
17
}
18
19
fn main() {
20
let a;
21
a = Bar(456);
22
23
let b;
24
b = type_bound_test(a);
25
}