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

Quasiquoter raises unused import warnings #14618

Closed
sfackler opened this issue Jun 3, 2014 · 1 comment
Closed

Quasiquoter raises unused import warnings #14618

sfackler opened this issue Jun 3, 2014 · 1 comment
Labels
A-syntaxext Area: Syntax extensions

Comments

@sfackler
Copy link
Member

sfackler commented Jun 3, 2014

#![feature(quote)]

extern crate syntax;

use syntax::ext::base::ExtCtxt;

#[allow(dead_code)]
fn f(cx: &mut ExtCtxt) {
    let idx = 10i;
    let _ = quote_expr!(cx, $idx);
}

fn main() {}
test.rs:10:13: 10:35 warning: unused import, #[warn(unused_imports)] on by default
test.rs:10     let _ = quote_expr!(cx, $idx);
                       ^~~~~~~~~~~~~~~~~~~~~~
note: in expansion of quote_expr!
test.rs:10:13: 10:35 note: expansion site
test.rs:10:13: 10:35 warning: unused import, #[warn(unused_imports)] on by default
test.rs:10     let _ = quote_expr!(cx, $idx);
                       ^~~~~~~~~~~~~~~~~~~~~~
note: in expansion of quote_expr!
test.rs:10:13: 10:35 note: expansion site
@sfackler
Copy link
Member Author

sfackler commented Jun 3, 2014

cc @klutzy

bors added a commit that referenced this issue Jun 3, 2014
As part of removing `pub use` glob, two extra import globs were
injected to make `quote_expr!` work. However the globs caused
`unused_import` warning in some places.

Quasiquoter needed the globs since it generated idents (e.g. `TyU`)
rather than absolute paths (`::syntax::ast::TyU`).
This patch removes the extra globs and makes quasiquoter use absolute
paths.

Fixes #14618

cc @sfackler
@bors bors closed this as completed in 1ec6de3 Jun 3, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
…meter-hints-toggle, r=Veykril

fix: `editor.parameterHints.enabled` not always being respected

rust-lang#13472

When accepting a suggestion, the parameter hints would always trigger automatically. This PR provides the ability for users to toggle this functionality off by specifying the new "rust-analyzer.autoTriggerParameterHints" option in `settings.json`. Possible options are `true` and `false`. It's `true` by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant