Skip to content

Rust: Auto-format a type inference test #20174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
multipleCallTargets
| dereference.rs:61:15:61:24 | e1.deref() |
| main.rs:2278:13:2278:31 | ...::from(...) |
| main.rs:2279:13:2279:31 | ...::from(...) |
| main.rs:2280:13:2280:31 | ...::from(...) |
| main.rs:2286:13:2286:31 | ...::from(...) |
| main.rs:2281:13:2281:31 | ...::from(...) |
| main.rs:2287:13:2287:31 | ...::from(...) |
| main.rs:2288:13:2288:31 | ...::from(...) |
| main.rs:2289:13:2289:31 | ...::from(...) |
5 changes: 2 additions & 3 deletions rust/ql/test/library-tests/type-inference/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,7 @@ mod impl_trait {
let c = uses_my_trait2(a); // $ type=c:S2 target=uses_my_trait2
let d = uses_my_trait2(S1); // $ type=d:S2 target=uses_my_trait2
let e = get_a_my_trait2(S1).get_a(); // $ target=get_a_my_trait2 target=MyTrait::get_a type=e:S1

// For this function the `impl` type does not appear in the root of the return type
let f = get_a_my_trait3(S1).unwrap().get_a(); // $ target=get_a_my_trait3 target=unwrap target=MyTrait::get_a type=f:S1
let g = get_a_my_trait4(S1).0.get_a(); // $ target=get_a_my_trait4 target=MyTrait::get_a type=g:S1
Expand Down Expand Up @@ -2487,8 +2488,7 @@ pub mod pattern_matching_experimental {
pub mod exec {
// a *greatly* simplified model of `MySqlConnection.execute` in SQLX

trait Connection {
}
trait Connection {}

trait Executor {
fn execute1(&self);
Expand Down Expand Up @@ -2519,7 +2519,6 @@ pub mod exec {
c.execute2::<&str>("SELECT * FROM users"); // $ MISSING: target=execute2
MySqlConnection::execute2(&c, "SELECT * FROM users"); // $ MISSING: target=execute2
MySqlConnection::execute2::<&str>(&c, "SELECT * FROM users"); // $ MISSING: target=execute2

}
}

Expand Down
Loading