summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/errors.rs15
-rw-r--r--cli/lsp/tsc.rs2
-rw-r--r--cli/npm/managed/resolvers/local.rs2
-rw-r--r--cli/tools/test/mod.rs2
-rw-r--r--cli/util/file_watcher.rs8
-rw-r--r--ext/fetch/proxy.rs4
-rw-r--r--ext/ffi/Cargo.toml3
-rw-r--r--ext/webgpu/Cargo.toml4
-rw-r--r--runtime/Cargo.toml3
-rw-r--r--runtime/ops/http.rs10
-rw-r--r--runtime/web_worker.rs2
-rw-r--r--runtime/worker.rs2
-rw-r--r--rust-toolchain.toml2
-rw-r--r--tests/Cargo.toml1
-rw-r--r--tests/integration/run_tests.rs12
-rw-r--r--tests/util/server/src/servers/jsr_registry.rs2
-rw-r--r--tests/util/server/src/servers/mod.rs2
-rw-r--r--tests/util/server/src/servers/npm_registry.rs2
18 files changed, 34 insertions, 44 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index 9fe433f18..a8fde6e76 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -17,7 +17,6 @@ use deno_graph::ModuleGraphError;
use deno_graph::ModuleLoadError;
use deno_graph::ResolutionError;
use import_map::ImportMapError;
-use std::fmt::Write;
fn get_import_map_error_class(_: &ImportMapError) -> &'static str {
"URIError"
@@ -112,17 +111,5 @@ pub fn get_error_class_name(e: &AnyError) -> &'static str {
e.downcast_ref::<ResolutionError>()
.map(get_resolution_error_class)
})
- .unwrap_or_else(|| {
- if cfg!(debug) {
- log::warn!(
- "Error '{}' contains boxed error of unknown type:{}",
- e,
- e.chain().fold(String::new(), |mut output, e| {
- let _ = write!(output, "\n {e:?}");
- output
- })
- );
- }
- "Error"
- })
+ .unwrap_or("Error")
}
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index 4592edad4..7dfb68f53 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -215,6 +215,8 @@ pub enum SemicolonPreference {
Remove,
}
+// Allow due to false positive https://github.com/rust-lang/rust-clippy/issues/13170
+#[allow(clippy::needless_borrows_for_generic_args)]
fn normalize_diagnostic(
diagnostic: &mut crate::tsc::Diagnostic,
specifier_map: &TscSpecifierMap,
diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs
index b741fd15d..7687e23f8 100644
--- a/cli/npm/managed/resolvers/local.rs
+++ b/cli/npm/managed/resolvers/local.rs
@@ -1048,7 +1048,7 @@ fn junction_or_symlink_dir(
match junction::create(old_path, new_path) {
Ok(()) => Ok(()),
Err(junction_err) => {
- if cfg!(debug) {
+ if cfg!(debug_assertions) {
// When running the tests, junctions should be created, but if not then
// surface this error.
log::warn!("Error creating junction. {:#}", junction_err);
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 904b9ecb7..4fbd0423e 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -1653,7 +1653,7 @@ fn is_supported_test_ext(path: &Path) -> bool {
/// input order.
///
/// - Specifiers matching the `is_supported_test_ext` predicate are marked as
-/// `TestMode::Documentation`.
+/// `TestMode::Documentation`.
/// - Specifiers matching the `is_supported_test_path` are marked as `TestMode::Executable`.
/// - Specifiers matching both predicates are marked as `TestMode::Both`
fn collect_specifiers_with_test_mode(
diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs
index 51dde8404..d92d880bc 100644
--- a/cli/util/file_watcher.rs
+++ b/cli/util/file_watcher.rs
@@ -195,8 +195,8 @@ impl WatcherCommunicator {
/// Creates a file watcher.
///
/// - `operation` is the actual operation we want to run every time the watcher detects file
-/// changes. For example, in the case where we would like to bundle, then `operation` would
-/// have the logic for it like bundling the code.
+/// changes. For example, in the case where we would like to bundle, then `operation` would
+/// have the logic for it like bundling the code.
pub async fn watch_func<O, F>(
flags: Arc<Flags>,
print_config: PrintConfig,
@@ -234,8 +234,8 @@ pub enum WatcherRestartMode {
/// Creates a file watcher.
///
/// - `operation` is the actual operation we want to run every time the watcher detects file
-/// changes. For example, in the case where we would like to bundle, then `operation` would
-/// have the logic for it like bundling the code.
+/// changes. For example, in the case where we would like to bundle, then `operation` would
+/// have the logic for it like bundling the code.
pub async fn watch_recv<O, F>(
mut flags: Arc<Flags>,
print_config: PrintConfig,
diff --git a/ext/fetch/proxy.rs b/ext/fetch/proxy.rs
index bbb40e2f1..f23df5dd0 100644
--- a/ext/fetch/proxy.rs
+++ b/ext/fetch/proxy.rs
@@ -269,10 +269,10 @@ impl NoProxy {
/// * If neither environment variable is set, `None` is returned
/// * Entries are expected to be comma-separated (whitespace between entries is ignored)
/// * IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size,
- /// for example "`192.168.1.0/24`").
+ /// for example "`192.168.1.0/24`").
/// * An entry "`*`" matches all hostnames (this is the only wildcard allowed)
/// * Any other entry is considered a domain name (and may contain a leading dot, for example `google.com`
- /// and `.google.com` are equivalent) and would match both that domain AND all subdomains.
+ /// and `.google.com` are equivalent) and would match both that domain AND all subdomains.
///
/// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all of the following would match
/// (and therefore would bypass the proxy):
diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml
index 5220c4fdb..961c96b01 100644
--- a/ext/ffi/Cargo.toml
+++ b/ext/ffi/Cargo.toml
@@ -27,3 +27,6 @@ serde_json = "1.0"
[target.'cfg(windows)'.dependencies]
winapi = { workspace = true, features = ["errhandlingapi", "minwindef", "ntdef", "winbase", "winnt"] }
+
+[lints.rust]
+unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_aarch, values("x86_64", "aarch64"))'] }
diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml
index 47b2a3172..00e265f09 100644
--- a/ext/webgpu/Cargo.toml
+++ b/ext/webgpu/Cargo.toml
@@ -13,6 +13,10 @@ description = "WebGPU implementation for Deno"
[lib]
path = "lib.rs"
+[features]
+angle = []
+vulkan-portability = []
+
# We make all dependencies conditional on not being wasm,
# so the whole workspace can built as wasm.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml
index 35b160636..72ffa3eae 100644
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -28,6 +28,9 @@ hmr = ["include_js_files_for_snapshotting"]
# assertion that a snapshot is provided.
only_snapshotted_js_sources = ["include_js_files_for_snapshotting"]
+[lints.rust]
+unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
+
[lib]
name = "deno_runtime"
path = "lib.rs"
diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs
index ca51b001d..cde2d5858 100644
--- a/runtime/ops/http.rs
+++ b/runtime/ops/http.rs
@@ -8,11 +8,9 @@ use deno_core::error::AnyError;
use deno_core::op2;
use deno_core::OpState;
use deno_core::ResourceId;
-use deno_core::ToJsBuffer;
use deno_http::http_create_conn_resource;
use deno_net::io::TcpStreamResource;
use deno_net::ops_tls::TlsStreamResource;
-use serde::Serialize;
pub const UNSTABLE_FEATURE_NAME: &str = "http";
@@ -74,11 +72,3 @@ fn op_http_start(
Err(bad_resource_id())
}
-
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct HttpUpgradeResult {
- conn_rid: ResourceId,
- conn_type: &'static str,
- read_buf: ToJsBuffer,
-}
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 2611b6f34..ed1e19c9e 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -514,7 +514,7 @@ impl WebWorker {
ops::web_worker::deno_web_worker::init_ops_and_esm(),
];
- #[cfg(hmr)]
+ #[cfg(feature = "hmr")]
assert!(
cfg!(not(feature = "only_snapshotted_js_sources")),
"'hmr' is incompatible with 'only_snapshotted_js_sources'."
diff --git a/runtime/worker.rs b/runtime/worker.rs
index bd67c8706..696786b56 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -448,7 +448,7 @@ impl MainWorker {
ops::web_worker::deno_web_worker::init_ops_and_esm().disable(),
];
- #[cfg(hmr)]
+ #[cfg(feature = "hmr")]
assert!(
cfg!(not(feature = "only_snapshotted_js_sources")),
"'hmr' is incompatible with 'only_snapshotted_js_sources'."
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 874939176..85cb9e7bb 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,3 +1,3 @@
[toolchain]
-channel = "1.79.0"
+channel = "1.80.0"
components = ["rustfmt", "clippy"]
diff --git a/tests/Cargo.toml b/tests/Cargo.toml
index 34cffbb40..daef13dc7 100644
--- a/tests/Cargo.toml
+++ b/tests/Cargo.toml
@@ -14,6 +14,7 @@ path = "lib.rs"
[features]
run = []
+upgrade = []
[[test]]
name = "integration_tests"
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index 7a6ee61cf..9252de2e7 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -2621,7 +2621,7 @@ mod permissions {
fn with_allow() {
for permission in &util::PERMISSION_VARIANTS {
let status = util::deno_cmd()
- .current_dir(&util::testdata_path())
+ .current_dir(util::testdata_path())
.arg("run")
.arg("--unstable")
.arg(format!("--allow-{permission}"))
@@ -2655,7 +2655,7 @@ mod permissions {
const PERMISSION_VARIANTS: [&str; 2] = ["read", "write"];
for permission in &PERMISSION_VARIANTS {
let status = util::deno_cmd()
- .current_dir(&util::testdata_path())
+ .current_dir(util::testdata_path())
.arg("run")
.arg(format!(
"--allow-{0}={1}",
@@ -2698,7 +2698,7 @@ mod permissions {
const PERMISSION_VARIANTS: [&str; 2] = ["read", "write"];
for permission in &PERMISSION_VARIANTS {
let status = util::deno_cmd()
- .current_dir(&util::testdata_path())
+ .current_dir(util::testdata_path())
.arg("run")
.arg(format!(
"--allow-{0}={1}",
@@ -2746,7 +2746,7 @@ mod permissions {
let js_dir = util::root_path().join("js");
for permission in &PERMISSION_VARIANTS {
let status = util::deno_cmd()
- .current_dir(&util::testdata_path())
+ .current_dir(util::testdata_path())
.arg("run")
.arg(format!("--allow-{permission}={test_dir},{js_dir}"))
.arg("run/complex_permissions_test.ts")
@@ -2765,7 +2765,7 @@ mod permissions {
const PERMISSION_VARIANTS: [&str; 2] = ["read", "write"];
for permission in &PERMISSION_VARIANTS {
let status = util::deno_cmd()
- .current_dir(&util::testdata_path())
+ .current_dir(util::testdata_path())
.arg("run")
.arg(format!("--allow-{permission}=."))
.arg("run/complex_permissions_test.ts")
@@ -2784,7 +2784,7 @@ mod permissions {
const PERMISSION_VARIANTS: [&str; 2] = ["read", "write"];
for permission in &PERMISSION_VARIANTS {
let status = util::deno_cmd()
- .current_dir(&util::testdata_path())
+ .current_dir(util::testdata_path())
.arg("run")
.arg(format!("--allow-{permission}=tls/../"))
.arg("run/complex_permissions_test.ts")
diff --git a/tests/util/server/src/servers/jsr_registry.rs b/tests/util/server/src/servers/jsr_registry.rs
index affd2c30e..8970750a2 100644
--- a/tests/util/server/src/servers/jsr_registry.rs
+++ b/tests/util/server/src/servers/jsr_registry.rs
@@ -153,7 +153,7 @@ async fn registry_server_handler(
// serve the registry package files
let mut file_path = tests_path().join("registry").join("jsr").to_path_buf();
file_path.push(
- &req.uri().path()[1..]
+ req.uri().path()[1..]
.replace("%2f", "/")
.replace("%2F", "/"),
);
diff --git a/tests/util/server/src/servers/mod.rs b/tests/util/server/src/servers/mod.rs
index 1b6e2f71d..3e18aafce 100644
--- a/tests/util/server/src/servers/mod.rs
+++ b/tests/util/server/src/servers/mod.rs
@@ -1135,7 +1135,7 @@ async fn main_server(
_ => {
let uri_path = req.uri().path();
let mut file_path = testdata_path().to_path_buf();
- file_path.push(&uri_path[1..].replace("%2f", "/"));
+ file_path.push(uri_path[1..].replace("%2f", "/"));
if let Ok(file) = tokio::fs::read(&file_path).await {
let file_resp = custom_headers(uri_path, file);
return Ok(file_resp);
diff --git a/tests/util/server/src/servers/npm_registry.rs b/tests/util/server/src/servers/npm_registry.rs
index f19fa5d92..acbd9cab4 100644
--- a/tests/util/server/src/servers/npm_registry.rs
+++ b/tests/util/server/src/servers/npm_registry.rs
@@ -150,7 +150,7 @@ async fn handle_req_for_registry(
// serve the registry package files
let uri_path = req.uri().path();
let mut file_path = root_dir.to_path_buf();
- file_path.push(&uri_path[1..].replace("%2f", "/").replace("%2F", "/"));
+ file_path.push(uri_path[1..].replace("%2f", "/").replace("%2F", "/"));
// serve if the filepath exists
if let Ok(file) = tokio::fs::read(&file_path).await {