-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Open
Copy link
Labels
Description
We would like to add #[diagnostic::do_not_recommend] to this particular impl:
diesel/diesel/src/expression/mod.rs
Lines 245 to 255 in c9bbd85
| impl<T, ST> AsExpression<ST> for T | |
| where | |
| T: Expression<SqlType = ST>, | |
| ST: SqlType + TypedExpressionType, | |
| { | |
| type Expression = T; | |
| fn as_expression(self) -> T { | |
| self | |
| } | |
| } |
This would significantly improve the error messages emitted by #[derive(Insertable)] for type mismatches. It's currently not possible to add this attribute as it regresses the error message by rustc loosing the relevant span. This was reported upstream as regression in rust-lang/rust#123503 but is still not resolved.
We would need investigate if:
- There is something we can to in the derive code to fix these spans
- It's an actual rustc issue and needs to be resolved there.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo