Updated to rustc 1.73.0-nightly (399b06823 2023-07-20).

This commit is contained in:
Filipe Rodrigues 2023-08-23 13:30:37 +01:00
parent 1ae8448b11
commit 94ecd810ec
3 changed files with 16 additions and 10 deletions

View File

@ -103,10 +103,14 @@ clippy.mem_forget = "allow"
clippy.shadow_same = "allow"
clippy.shadow_reuse = "allow"
clippy.shadow_unrelated = "allow" # TODO: Maybe check this one every once in a while? Pretty noisy though
clippy.wildcard_enum_match_arm = "allow"
clippy.min_ident_chars = "allow" # Useful for generics such as `f: impl FnOnce()`
clippy.single_call_fn = "allow" # It's still useful to separate blocks of code into functions
clippy.float_arithmetic = "allow"
clippy.default_numeric_fallback = "allow"
clippy.print_stdout = "allow"
clippy.default_numeric_fallback = "allow" # TODO: This isn't very useful for floats, but might be for integers
# We prefer the short version
clippy.pub_with_shorthand = "allow"
clippy.pub_without_shorthand = "warn"
# Triggers in macro-generated code
# TODO: Turn these on once they don't trigger in macro-generated code
@ -137,8 +141,6 @@ clippy.separated_literal_suffix = "allow"
# Matching on a vale and adding `ref` is easier than matching on ref and de-referencing values within the body
clippy.ref_patterns = "allow"
clippy.semicolon_outside_block = "allow"
clippy.manual_let_else = "allow" # Rustfmt doesn't support let-else yet
# Performance of floats isn't paramount
clippy.suboptimal_flops = "allow"

View File

@ -173,7 +173,9 @@ impl<'s> Builder<'s> {
/// Resets a build
pub async fn reset_build(&self, target: &Target<'s, CowStr<'s>>, rules: &Rules<'s>) -> Result<(), AppError> {
// Get the rule for the target
let Some((_, target_rule)) = self.target_rule(target, rules)? else { return Ok(()) };
let Some((_, target_rule)) = self.target_rule(target, rules)? else {
return Ok(());
};
// Get the built lock, or create it
// Note: Important to clone since we'll be `await`ing with it.
@ -225,9 +227,8 @@ impl<'s> Builder<'s> {
};
// Get the rule for the target
let (rule, target_rule) = match self.target_rule(&target, rules)? {
Some((rule, target_rule)) => (rule, target_rule),
None => match target {
let Some((rule, target_rule)) = self.target_rule(&target, rules)? else {
match target {
Target::File { ref file, .. } => match fs::metadata(&**file).await {
Ok(metadata) => {
let build_time = self::file_modified_time(metadata);
@ -262,7 +263,7 @@ impl<'s> Builder<'s> {
},
// Note: If `target_rule` returns `Err` if this was a rule, so we can never reach here
Target::Rule { .. } => unreachable!(),
},
}
};
// Get the built lock, or create it
@ -456,6 +457,7 @@ impl<'s> Builder<'s> {
};
// If the dependency if a dependency deps file or an output deps file (and exists), build it's dependencies too
#[allow(clippy::wildcard_enum_match_arm, reason = "We only care about some variants")]
let dep_deps = match &dep {
Dep::File {
file,

View File

@ -14,6 +14,8 @@
strict_provenance,
assert_matches
)]
// Lints
#![allow(clippy::print_stdout, reason = "We're a binary that should talk to the user")]
// Modules
mod args;