< 返回版块

C-Jeril 发表于 2024-03-15 15:30

[{
	"resource": "/e:/Backend/src/service.rs",
	"owner": "rustc",
	"code": {
		"value": "Click for full compiler diagnostic",
		"target": {
			"$mid": 1,
			"path": "/diagnostic message [2]",
			"scheme": "rust-analyzer-diagnostics-view",
			"query": "2",
			"fragment": "file:///e%3A/Backend/src/service.rs"
		}
	},
	"severity": 8,
	"message": "the trait bound `(diesel::sql_types::Integer, diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Nullable<diesel::sql_types::Text>): CompatibleType<Card, _>` is not satisfied\nthe following other types implement trait `CompatibleType<U, DB>`:\n  (ST0,)\n  (ST0, ST1)\n  (ST0, ST1, ST2)\n  (ST0, ST1, ST2, ST3)\n  (ST0, ST1, ST2, ST3, ST4)\n  (ST0, ST1, ST2, ST3, ST4, ST5)\n  (ST0, ST1, ST2, ST3, ST4, ST5, ST6)\n  (ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)\nand 24 others\nrequired for `SelectStatement<FromClause<table>, DefaultSelectClause<FromClause<table>>, NoDistinctClause, ..., ..., ...>` to implement `diesel::query_dsl::LoadQuery<'_, _, Card>`\nthe full type name has been written to 'E:\\Backend\\target\\debug\\deps\\backend-10dc2a70393d135b.long-type-17675412758270497264.txt'",
	"source": "rustc",
	"startLineNumber": 30,
	"startColumn": 24,
	"endLineNumber": 30,
	"endColumn": 33,
	"relatedInformation": [
		{
			"startLineNumber": 30,
			"startColumn": 10,
			"endLineNumber": 30,
			"endColumn": 15,
			"message": "required by a bound introduced by this call",
			"resource": "/e:/Backend/src/service.rs"
		},
		{
			"startLineNumber": 1780,
			"startColumn": 22,
			"endLineNumber": 1780,
			"endColumn": 48,
			"message": "required by a bound in `diesel::RunQueryDsl::first`",
			"resource": "/c:/Users/Administrator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/diesel-2.1.4/src/query_dsl/mod.rs"
		}
	]
}]

动不动就提&mut conn和&conn的错误

评论区

写评论
作者 C-Jeril 2024-03-18 10:59

感谢感谢,我再研究下哈

--
👇
潜水的猫: 原始代码没有吗?报错栈没有吗?

作者 C-Jeril 2024-03-18 10:59

感谢感谢,我再研究下哈

--
👇
ipconfiger: 我看你发这个也很懵逼啊

潜水的猫 2024-03-17 14:23

原始代码没有吗?报错栈没有吗?

ipconfiger 2024-03-16 12:13

我看你发这个也很懵逼啊

1 共 4 条评论, 1 页