Skip to content

Consider borrowing here: &0 #52544

Closed
@jjl

Description

@jjl
error[E0308]: mismatched types
  --> src/schema_parser.rs:91:20
   |
91 |             if i < 0 {
   |                    ^
   |                    |
   |                    expected &i64, found integral variable
   |                    help: consider borrowing here: `&0`
   |
   = note: expected type `&i64`
              found type `{integer}`

What I actually wanted was *i.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions