Skip to content

Commit

Permalink
Update some postgres trybuild tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Jan 1, 2021
1 parent fe357d2 commit 02eea35
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion tests/ui/postgres/issue_30.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: "\'1" is not a valid Rust identifier
error: column name "\'1" is invalid: "\'1" is not a valid Rust identifier
--> $DIR/issue_30.rs:2:17
|
2 | let query = sqlx::query!("select 1 as \"'1\"");
Expand Down
44 changes: 18 additions & 26 deletions tests/ui/postgres/wrong_param_type.stderr
Original file line number Diff line number Diff line change
@@ -1,55 +1,47 @@
error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:2:18
--> $DIR/wrong_param_type.rs:2:50
|
2 | let _query = sqlx::query!("select $1::text", 0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
| ^^^^ expected `&str`, found `i32`

error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:4:18
--> $DIR/wrong_param_type.rs:4:50
|
4 | let _query = sqlx::query!("select $1::text", &0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found `i32`
| ^ expected `str`, found `i32`
|
= note: expected reference `&str`
found reference `&i32`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:6:18
--> $DIR/wrong_param_type.rs:6:50
|
6 | let _query = sqlx::query!("select $1::text", Some(0i32));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32`
| ^^^^ expected `&str`, found `i32`
|
= note: expected enum `std::option::Option<&str>`
found enum `std::option::Option<i32>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
= note: expected enum `Option<&str>`
found enum `Option<i32>`

error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:9:18
--> $DIR/wrong_param_type.rs:9:50
|
9 | let _query = sqlx::query!("select $1::text", arg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
| ^^^ expected `&str`, found `i32`

error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:12:18
--> $DIR/wrong_param_type.rs:12:50
|
12 | let _query = sqlx::query!("select $1::text", arg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32`
| ^^^ expected `&str`, found `i32`
|
= note: expected enum `std::option::Option<&str>`
found enum `std::option::Option<i32>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
= note: expected enum `Option<&str>`
found enum `Option<i32>`

error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:13:18
--> $DIR/wrong_param_type.rs:13:50
|
13 | let _query = sqlx::query!("select $1::text", arg.as_ref());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found `i32`
| ^^^ expected `str`, found `i32`
|
= note: expected enum `std::option::Option<&str>`
found enum `std::option::Option<&i32>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
= note: expected enum `Option<&str>`
found enum `Option<&i32>`

0 comments on commit 02eea35

Please sign in to comment.