From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_incremental/src/assert_dep_graph.rs | 9 +++------ compiler/rustc_incremental/src/persist/dirty_clean.rs | 4 +--- compiler/rustc_incremental/src/persist/fs.rs | 7 +++---- 3 files changed, 7 insertions(+), 13 deletions(-) (limited to 'compiler/rustc_incremental') diff --git a/compiler/rustc_incremental/src/assert_dep_graph.rs b/compiler/rustc_incremental/src/assert_dep_graph.rs index 69e482ce8..33a9a0cab 100644 --- a/compiler/rustc_incremental/src/assert_dep_graph.rs +++ b/compiler/rustc_incremental/src/assert_dep_graph.rs @@ -249,7 +249,7 @@ fn dump_graph(query: &DepGraphQuery) { // dump a .txt file with just the edges: let txt_path = format!("{}.txt", path); let mut file = BufWriter::new(File::create(&txt_path).unwrap()); - for &(ref source, ref target) in &edges { + for (source, target) in &edges { write!(file, "{:?} -> {:?}\n", source, target).unwrap(); } } @@ -368,7 +368,7 @@ fn walk_between<'q>( ) -> FxHashSet { // This is a bit tricky. We want to include a node only if it is: // (a) reachable from a source and (b) will reach a target. And we - // have to be careful about cycles etc. Luckily efficiency is not + // have to be careful about cycles etc. Luckily efficiency is not // a big concern! #[derive(Copy, Clone, PartialEq)] @@ -432,10 +432,7 @@ fn walk_between<'q>( } } -fn filter_edges<'q>( - query: &'q DepGraphQuery, - nodes: &FxHashSet, -) -> Vec<(DepKind, DepKind)> { +fn filter_edges(query: &DepGraphQuery, nodes: &FxHashSet) -> Vec<(DepKind, DepKind)> { let uniq: FxHashSet<_> = query .edges() .into_iter() diff --git a/compiler/rustc_incremental/src/persist/dirty_clean.rs b/compiler/rustc_incremental/src/persist/dirty_clean.rs index a8acaf659..ed7b272b1 100644 --- a/compiler/rustc_incremental/src/persist/dirty_clean.rs +++ b/compiler/rustc_incremental/src/persist/dirty_clean.rs @@ -1,4 +1,4 @@ -//! Debugging code to test fingerprints computed for query results. For each node marked with +//! Debugging code to test fingerprints computed for query results. For each node marked with //! `#[rustc_clean]` we will compare the fingerprint from the current and from the previous //! compilation session as appropriate: //! @@ -30,8 +30,6 @@ use rustc_middle::hir::nested_filter; use rustc_middle::ty::TyCtxt; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; -use std::iter::FromIterator; -use std::vec::Vec; const LOADED_FROM_DISK: Symbol = sym::loaded_from_disk; const EXCEPT: Symbol = sym::except; diff --git a/compiler/rustc_incremental/src/persist/fs.rs b/compiler/rustc_incremental/src/persist/fs.rs index 97ebed058..1fd2b9b0d 100644 --- a/compiler/rustc_incremental/src/persist/fs.rs +++ b/compiler/rustc_incremental/src/persist/fs.rs @@ -113,7 +113,6 @@ use rustc_span::Symbol; use std::fs as std_fs; use std::io::{self, ErrorKind}; -use std::mem; use std::path::{Path, PathBuf}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; @@ -305,7 +304,7 @@ pub fn prepare_session_directory( } delete_session_dir_lock_file(sess, &lock_file_path); - mem::drop(directory_lock); + drop(directory_lock); } } } @@ -864,7 +863,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> { // Let's make it explicit that the file lock is released at this point, // or rather, that we held on to it until here - mem::drop(lock); + drop(lock); } Err(_) => { debug!( @@ -898,7 +897,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> { // Let's make it explicit that the file lock is released at this point, // or rather, that we held on to it until here - mem::drop(lock); + drop(lock); } Ok(()) -- cgit v1.2.3