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

VS Code diagnostics #1092

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
39 changes: 21 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [

[workspace.package]
edition = "2021"
rust-version = "1.78.0"
rust-version = "1.80.0"

[profile.release]
# This adds file and line number information to backtraces while only increasing
Expand Down
21 changes: 11 additions & 10 deletions compiler/backend_inkwell/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#![feature(let_chains)]
#![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
#![allow(
clippy::cognitive_complexity,
clippy::match_same_arms,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::similar_names,
clippy::too_many_lines
)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
// #![allow(
// clippy::cognitive_complexity,
// clippy::match_same_arms,
// clippy::missing_errors_doc,
// clippy::missing_panics_doc,
// clippy::module_name_repetitions,
// clippy::similar_names,
// clippy::too_many_lines
// )]

use candy_frontend::{
builtin_functions::BuiltinFunction,
Expand Down
22 changes: 11 additions & 11 deletions compiler/cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#![feature(lazy_cell)]
#![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
#![allow(
clippy::cognitive_complexity,
clippy::match_same_arms,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::similar_names,
clippy::too_many_lines
)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
// #![allow(
// clippy::cognitive_complexity,
// clippy::match_same_arms,
// clippy::missing_errors_doc,
// clippy::missing_panics_doc,
// clippy::module_name_repetitions,
// clippy::similar_names,
// clippy::too_many_lines
// )]

use candy_vm::CAN_USE_STDOUT;
use clap::Parser;
Expand Down
15 changes: 8 additions & 7 deletions compiler/formatter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
const_trait_impl,
let_chains
)]
#![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
#![allow(
clippy::cognitive_complexity,
clippy::match_same_arms,
clippy::module_name_repetitions,
clippy::too_many_lines
)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
// #![allow(
// clippy::cognitive_complexity,
// clippy::match_same_arms,
// clippy::module_name_repetitions,
// clippy::too_many_lines
// )]

use candy_frontend::{cst::Cst, position::Offset};
use existing_whitespace::{TrailingWithIndentationConfig, WhitespacePositionInBody};
Expand Down
22 changes: 11 additions & 11 deletions compiler/frontend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#![feature(
anonymous_lifetime_in_impl_trait,
box_patterns,
entry_insert,
extract_if,
hasher_prefixfree_extras,
io_error_more,
let_chains,
try_blocks
)]
#![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
#![allow(
clippy::cognitive_complexity,
clippy::match_same_arms,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::similar_names,
clippy::too_many_lines
)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
// #![allow(
// clippy::cognitive_complexity,
// clippy::match_same_arms,
// clippy::missing_errors_doc,
// clippy::missing_panics_doc,
// clippy::module_name_repetitions,
// clippy::similar_names,
// clippy::too_many_lines
// )]

pub use self::tracing::{CallTracingMode, TracingConfig, TracingMode};

Expand Down
5 changes: 3 additions & 2 deletions compiler/fuzzer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![feature(let_chains, round_char_boundary)]
#![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
#![allow(clippy::missing_panics_doc, clippy::module_name_repetitions)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
// #![allow(clippy::missing_panics_doc, clippy::module_name_repetitions)]

mod coverage;
mod fuzzer;
Expand Down
24 changes: 12 additions & 12 deletions compiler/language_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
anonymous_lifetime_in_impl_trait,
async_closure,
box_patterns,
let_chains,
strict_provenance
)]
#![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
#![allow(
clippy::future_not_send, // TODO: Fix clippy::future_not_send occurrences
clippy::large_enum_variant,
clippy::match_same_arms,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::too_many_lines
let_chains
)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic, unused_crate_dependencies)]
// #![allow(
// clippy::future_not_send, // TODO: Fix clippy::future_not_send occurrences
// clippy::large_enum_variant,
// clippy::match_same_arms,
// clippy::missing_errors_doc,
// clippy::missing_panics_doc,
// clippy::module_name_repetitions,
// clippy::too_many_lines
// )]

pub mod database;
pub mod debug_adapter;
Expand Down
2 changes: 1 addition & 1 deletion compiler/vm/benches/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(absolute_path)]
#![allow(unused_attributes)]
#![allow(clippy::all)]

use candy_frontend::module::PackagesPath;
use candy_vm::{
Expand Down
8 changes: 4 additions & 4 deletions compiler/vm/src/instruction_pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ impl InstructionPointer {
}
}
impl Step for InstructionPointer {
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
(**end).checked_sub(**start)
fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>) {
usize::steps_between(&**start, &**end)
}

fn forward_checked(start: Self, count: usize) -> Option<Self> {
(*start).checked_add(count).map(Self)
usize::forward_checked(*start, count).map(InstructionPointer)
}

fn backward_checked(start: Self, count: usize) -> Option<Self> {
(*start).checked_sub(count).map(Self)
usize::backward_checked(*start, count).map(InstructionPointer)
}
}
impl Debug for InstructionPointer {
Expand Down
22 changes: 11 additions & 11 deletions compiler/vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
nonzero_ops,
slice_ptr_get,
step_trait,
strict_provenance,
try_blocks
)]
// We can't enable `unused_crate_dependencies` since it reports false positives about
// dev-dependencies used in our benchmarks.
// https://github.com/rust-lang/rust/issues/57274
// https://github.com/rust-lang/rust/issues/95513
// https://github.com/rust-lang/rust-clippy/issues/4341
#![warn(clippy::nursery, clippy::pedantic)]
#![allow(
clippy::large_enum_variant,
clippy::match_same_arms,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::similar_names,
clippy::too_many_lines
)]
#![allow(clippy::all)]
// #![warn(clippy::nursery, clippy::pedantic)]
// #![allow(
// clippy::large_enum_variant,
// clippy::match_same_arms,
// clippy::missing_errors_doc,
// clippy::missing_panics_doc,
// clippy::module_name_repetitions,
// clippy::similar_names,
// clippy::too_many_lines
// )]

pub use builtin_functions::CAN_USE_STDOUT;
pub use instruction_pointer::InstructionPointer;
Expand Down
2 changes: 2 additions & 0 deletions compiler_v4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ itertools = "0.12.0"
petgraph = "0.6.5"
replace_with = "0.1.7"
rustc-hash = "2.0.0"
serde = { version = "1.0.216", features = ["derive"] }
serde_json = "1.0.133"
strum = { version = "0.26.1", features = ["derive"] }
tracing = { version = "0.1", features = ["release_max_level_debug"] }
tracing-subscriber = { version = "0.3.16", features = ["registry"] }
Expand Down
1 change: 1 addition & 0 deletions compiler_v4/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ pub struct AstTypeParameter {

// Types

#[allow(clippy::large_enum_variant)]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub enum AstType {
Named(AstNamedType),
Expand Down
Loading
Loading