Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepend self:: scopes to proc-macro imports #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LumaKernel
Copy link

Partially resolves #208

Example:

use memoise::memoise;
use proconio_derive::fastout;

#[fastout]
fn main() {
    for i in 0..=10 {
        println!("{}", fib(i));
    }
}

#[memoise(n <= 10)]
fn fib(n: i64) -> i64 {
    if n == 0 || n == 1 {
        return n;
    }
    fib(n - 1) + fib(n - 2)
}

HEAD:

#[allow(unused_imports)]
use memoise::memoise;
#[allow(unused_imports)]
use proconio_derive::fastout;
pub use __cargo_equip::prelude::*;

/*#[fastout]
....

This PR:

#[allow(unused_imports)]
use self::memoise::memoise;
#[allow(unused_imports)]
use self::proconio_derive::fastout;
pub use __cargo_equip::prelude::*;

/*#[fastout]
....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Support local run, so it's necessary to import replaced modules with self:: prefix.
1 participant