Skip to content

Breakage on nightly #17

@Hybridlo

Description

@Hybridlo

Hello maintainers, thank you for your work on the crate.

I want to bring attention to an issue happening when using the crate while compiled on nightly.

error[E0659]: `sanitize` is ambiguous
 --> src\main.rs:5:7
  |
5 |     #[sanitize(trim)]
  |       ^^^^^^^^ ambiguous name
  |
  = note: ambiguous because of a name conflict with a builtin attribute
  = note: `sanitize` could refer to a built-in attribute
note: `sanitize` could also refer to the derive helper attribute defined here
 --> src\main.rs:3:10
  |
3 | #[derive(Sanitize)]
  |          ^^^^^^^^

...and more

Minimal reproducible example:

use sanitizer::prelude::*;

#[derive(Sanitize)]
pub struct Thing {
    #[sanitize(trim)]
    value: String,
}

fn main() {
}

cargo +nightly run

This is happening due to ongoing work for address sanitizer support in rustc (tracking issue: rust-lang/rust#39699) and their move from #[no_sanitize] to #[sanitize(...)] (rust-lang/rust#142681)

And I believe this will become a problem in stable Rust once 1.91 lands (not 100% sure on that)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions