Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl fmt::Display for FlycheckConfig {
pub struct FlycheckHandle {
// XXX: drop order is significant
sender: Sender<Restart>,
thread: jod_thread::JoinHandle,
_thread: jod_thread::JoinHandle,
}

impl FlycheckHandle {
Expand All @@ -71,7 +71,7 @@ impl FlycheckHandle {
.name("Flycheck".to_owned())
.spawn(move || actor.run(receiver))
.expect("failed to spawn thread");
FlycheckHandle { sender, thread }
FlycheckHandle { sender, _thread: thread }
}

/// Schedule a re-start of the cargo check worker.
Expand Down
6 changes: 3 additions & 3 deletions crates/hir/src/source_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub(crate) struct SourceAnalyzer {
body: Option<Arc<Body>>,
body_source_map: Option<Arc<BodySourceMap>>,
infer: Option<Arc<InferenceResult>>,
scopes: Option<Arc<ExprScopes>>,
_scopes: Option<Arc<ExprScopes>>,
}

impl SourceAnalyzer {
Expand All @@ -65,7 +65,7 @@ impl SourceAnalyzer {
body: Some(body),
body_source_map: Some(source_map),
infer: Some(db.infer(def)),
scopes: Some(scopes),
_scopes: Some(scopes),
file_id: node.file_id,
}
}
Expand All @@ -79,7 +79,7 @@ impl SourceAnalyzer {
body: None,
body_source_map: None,
infer: None,
scopes: None,
_scopes: None,
file_id: node.file_id,
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/ide_completion/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub(crate) struct CompletionContext<'a> {

pub(super) pattern_ctx: Option<PatternContext>,
pub(super) path_context: Option<PathCompletionContext>,
pub(super) active_parameter: Option<ActiveParameter>,
pub(super) _active_parameter: Option<ActiveParameter>,
pub(super) locals: Vec<(String, Local)>,

pub(super) incomplete_let: bool,
Expand Down Expand Up @@ -170,7 +170,7 @@ impl<'a> CompletionContext<'a> {
attribute_under_caret: None,
previous_token: None,
path_context: None,
active_parameter: ActiveParameter::at(db, position),
_active_parameter: ActiveParameter::at(db, position),
locals,
incomplete_let: false,
no_completion_required: false,
Expand Down
12 changes: 10 additions & 2 deletions crates/ide_completion/src/render/enum_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub(crate) fn render_variant(
#[derive(Debug)]
struct EnumRender<'a> {
ctx: RenderContext<'a>,
name: hir::Name,
_name: hir::Name,
variant: hir::Variant,
path: Option<hir::ModPath>,
qualified_name: hir::ModPath,
Expand Down Expand Up @@ -58,7 +58,15 @@ impl<'a> EnumRender<'a> {
),
};

EnumRender { ctx, name, variant, path, qualified_name, short_qualified_name, variant_kind }
EnumRender {
ctx,
_name: name,
variant,
path,
qualified_name,
short_qualified_name,
variant_kind,
}
}
fn render(self, import_to_add: Option<ImportEdit>) -> CompletionItem {
let mut item = CompletionItem::new(
Expand Down
2 changes: 1 addition & 1 deletion crates/ide_ssr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct SsrRule {

#[derive(Debug)]
pub struct SsrPattern {
raw: parsing::RawPattern,
_raw: parsing::RawPattern,
parsed_rules: Vec<parsing::ParsedRule>,
}

Expand Down
6 changes: 3 additions & 3 deletions crates/ide_ssr/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct Match {
pub(crate) struct PlaceholderMatch {
/// The node that the placeholder matched to. If set, then we'll search for further matches
/// within this node. It isn't set when we match tokens within a macro call's token tree.
pub(crate) node: Option<SyntaxNode>,
pub(crate) _node: Option<SyntaxNode>,
pub(crate) range: FileRange,
/// More matches, found within `node`.
pub(crate) inner_matches: SsrMatches,
Expand Down Expand Up @@ -717,7 +717,7 @@ fn recording_match_fail_reasons() -> bool {
impl PlaceholderMatch {
fn new(node: Option<&SyntaxNode>, range: FileRange) -> Self {
Self {
node: node.cloned(),
_node: node.cloned(),
range,
inner_matches: SsrMatches::default(),
autoderef_count: 0,
Expand Down Expand Up @@ -805,7 +805,7 @@ mod tests {
assert_eq!(matches.matches[0].placeholder_values.len(), 1);
assert_eq!(
matches.matches[0].placeholder_values[&Var("x".to_string())]
.node
._node
.as_ref()
.unwrap()
.text(),
Expand Down
2 changes: 1 addition & 1 deletion crates/ide_ssr/src/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl FromStr for SsrPattern {
fn from_str(pattern_str: &str) -> Result<SsrPattern, SsrError> {
let raw_pattern = pattern_str.parse()?;
let parsed_rules = ParsedRule::new(&raw_pattern, None)?;
Ok(SsrPattern { raw: raw_pattern, parsed_rules })
Ok(SsrPattern { _raw: raw_pattern, parsed_rules })
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/proc_macro_api/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{

#[derive(Debug)]
pub(crate) struct ProcMacroProcessSrv {
process: Process,
_process: Process,
stdin: ChildStdin,
stdout: BufReader<ChildStdout>,
}
Expand All @@ -29,7 +29,7 @@ impl ProcMacroProcessSrv {
let mut process = Process::run(process_path, args)?;
let (stdin, stdout) = process.stdio().expect("couldn't access child stdio");

let srv = ProcMacroProcessSrv { process, stdin, stdout };
let srv = ProcMacroProcessSrv { _process: process, stdin, stdout };

Ok(srv)
}
Expand Down
4 changes: 2 additions & 2 deletions crates/vfs-notify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use walkdir::WalkDir;
pub struct NotifyHandle {
// Relative order of fields below is significant.
sender: Sender<Message>,
thread: jod_thread::JoinHandle,
_thread: jod_thread::JoinHandle,
}

#[derive(Debug)]
Expand All @@ -35,7 +35,7 @@ impl loader::Handle for NotifyHandle {
.name("VfsLoader".to_owned())
.spawn(move || actor.run(receiver))
.expect("failed to spawn thread");
NotifyHandle { sender, thread }
NotifyHandle { sender, _thread: thread }
}
fn set_config(&mut self, config: loader::Config) {
self.sender.send(Message::Config(config)).unwrap()
Expand Down