Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

error: macro undefined: 'postgres!' #3

Closed
@sfisol

Description

@sfisol

I had a working code that compiles with:
rustc 1.15.0-nightly (c80c31a50 2016-12-02)
Upgrading to:
rustc 1.16.0-nightly (df8debf6d 2017-01-25)

shows
error: macro undefined: 'postgres!'
on
5 | #[postgres(name = "panel_position")]
and
14 | #[postgres(name = "panel_value_type")]

Given code (starting at line 4):

#[derive(Debug, ToSql, FromSql, PartialEq, Clone, Copy)]
#[postgres(name = "panel_position")]
pub enum Position {
    #[postgres(name = "left")]
    Left,
    #[postgres(name = "right")]
    Right,
}

#[derive(Debug, ToSql, FromSql)]
#[postgres(name = "panel_value_type")]
pub enum PanelValueType {
    #[postgres(name = "link")]
    Link,
    #[postgres(name = "post")]
    Post,
    #[postgres(name = "category")]
    Category,
   (...)

Also version of rust-postgres changed from 0.13.3 to 0.13.5, I can provide version changes for rest of crates if it would be necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions