mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Rust: Add type inference test
This commit is contained in:
@@ -13,23 +13,25 @@ multipleResolvedTargets
|
||||
| dyn_type.rs:90:10:90:13 | * ... |
|
||||
| invalid/main.rs:69:13:69:17 | * ... |
|
||||
| invalid/main.rs:76:13:76:17 | * ... |
|
||||
| main.rs:1077:14:1077:18 | * ... |
|
||||
| main.rs:1159:26:1159:30 | * ... |
|
||||
| main.rs:1503:14:1503:21 | * ... |
|
||||
| main.rs:1503:16:1503:20 | * ... |
|
||||
| main.rs:1508:14:1508:18 | * ... |
|
||||
| main.rs:1539:27:1539:29 | * ... |
|
||||
| main.rs:1653:17:1653:24 | * ... |
|
||||
| main.rs:1653:18:1653:24 | * ... |
|
||||
| main.rs:1791:17:1791:21 | * ... |
|
||||
| main.rs:1806:28:1806:32 | * ... |
|
||||
| main.rs:2439:13:2439:18 | * ... |
|
||||
| main.rs:2633:13:2633:31 | ...::from(...) |
|
||||
| main.rs:2634:13:2634:31 | ...::from(...) |
|
||||
| main.rs:2635:13:2635:31 | ...::from(...) |
|
||||
| main.rs:2641:13:2641:31 | ...::from(...) |
|
||||
| main.rs:2642:13:2642:31 | ...::from(...) |
|
||||
| main.rs:2643:13:2643:31 | ...::from(...) |
|
||||
| main.rs:3072:13:3072:17 | x.f() |
|
||||
| main.rs:841:9:841:14 | x.m2() |
|
||||
| main.rs:842:9:842:14 | y.m2() |
|
||||
| main.rs:1092:14:1092:18 | * ... |
|
||||
| main.rs:1174:26:1174:30 | * ... |
|
||||
| main.rs:1518:14:1518:21 | * ... |
|
||||
| main.rs:1518:16:1518:20 | * ... |
|
||||
| main.rs:1523:14:1523:18 | * ... |
|
||||
| main.rs:1554:27:1554:29 | * ... |
|
||||
| main.rs:1668:17:1668:24 | * ... |
|
||||
| main.rs:1668:18:1668:24 | * ... |
|
||||
| main.rs:1806:17:1806:21 | * ... |
|
||||
| main.rs:1821:28:1821:32 | * ... |
|
||||
| main.rs:2454:13:2454:18 | * ... |
|
||||
| main.rs:2648:13:2648:31 | ...::from(...) |
|
||||
| main.rs:2649:13:2649:31 | ...::from(...) |
|
||||
| main.rs:2650:13:2650:31 | ...::from(...) |
|
||||
| main.rs:2656:13:2656:31 | ...::from(...) |
|
||||
| main.rs:2657:13:2657:31 | ...::from(...) |
|
||||
| main.rs:2658:13:2658:31 | ...::from(...) |
|
||||
| main.rs:3087:13:3087:17 | x.f() |
|
||||
| pattern_matching.rs:273:13:273:27 | * ... |
|
||||
| pattern_matching.rs:273:14:273:27 | * ... |
|
||||
|
||||
@@ -827,6 +827,21 @@ mod function_trait_bounds {
|
||||
}
|
||||
}
|
||||
|
||||
trait MyTrait2 {
|
||||
// MyTrait2::m2
|
||||
fn m2(self);
|
||||
}
|
||||
|
||||
trait MyTrait3 {
|
||||
// MyTrait3::m2
|
||||
fn m2(&self);
|
||||
}
|
||||
|
||||
fn bound_overlap<T: MyTrait2 + MyTrait3>(x: T, y: &T) {
|
||||
x.m2(); // $ target=MyTrait2::m2 $ SPURIOUS: target=MyTrait3::m2
|
||||
y.m2(); // $ target=MyTrait3::m2 $ SPURIOUS: target=MyTrait2::m2
|
||||
}
|
||||
|
||||
pub fn f() {
|
||||
let x = MyThing { a: S1 };
|
||||
let y = MyThing { a: S2 };
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user