File: crate_root.rs

package info (click to toggle)
rust-derive-builder 0.20.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 500 kB
  • sloc: makefile: 2
file content (16 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[macro_use]
extern crate derive_builder;

// This is a stand-in for any bad crate directive
mod empty {}

#[derive(Builder)]
// It would be nice if the "failed to resolve" errors would identify `"empty"` as the error span,
// but doing so would require rewriting a lot of the code generation to use the crate_root span
// for the full path of the thing being imported, and that doesn't seem worth the code churn.
#[builder(crate = "empty")]
struct BadCrate {
    lorem: String,
}

fn main() {}