Skip to content

Commit 279ea91

Browse files
authoredJul 23, 2024··
build: Update rustc to nightly-2024-07-21 (#9319)
1 parent c49ad11 commit 279ea91

File tree

38 files changed

+302
-290
lines changed

38 files changed

+302
-290
lines changed
 

‎.changeset/small-lobsters-happen.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
binding_macros: patch
3+
dbg-swc: patch
4+
swc: patch
5+
swc_bundler: patch
6+
swc_common: patch
7+
swc_core: patch
8+
swc_css_codegen: patch
9+
swc_css_compat: patch
10+
swc_css_minifier: patch
11+
swc_ecma_ast: patch
12+
swc_ecma_codegen: patch
13+
swc_ecma_codegen_macros: patch
14+
swc_ecma_lints: patch
15+
swc_ecma_minifier: patch
16+
swc_ecma_transforms_base: patch
17+
swc_ecma_transforms_module: patch
18+
swc_ecma_transforms_testing: patch
19+
swc_ecma_transforms_typescript: patch
20+
swc_ecma_usage_analyzer: patch
21+
swc_fast_graph: patch
22+
swc_html_codegen: patch
23+
swc_html_minifier: patch
24+
swc_html_parser: patch
25+
swc_macros_common: patch
26+
swc_visit: patch
27+
testing: patch
28+
---
29+
30+
build: Update `rustc` to `nightly-2024-07-21`

‎Cargo.lock

+150-95
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/binding_macros/build.rs

-8
This file was deleted.

‎crates/dbg-swc/src/es/minifier/next/check_size.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl CheckSizeCommand {
7474
println!(
7575
"{}: {} bytes (swc) vs {} bytes (terser)",
7676
file.path
77-
.strip_prefix(&self.workspace.join("inputs"))
77+
.strip_prefix(self.workspace.join("inputs"))
7878
.unwrap()
7979
.display(),
8080
file.swc,
@@ -92,7 +92,7 @@ impl CheckSizeCommand {
9292
format!(
9393
"{}: Diff: {} bytes; {} bytes (swc) vs {} bytes (terser)",
9494
f.path
95-
.strip_prefix(&self.workspace.join("inputs"))
95+
.strip_prefix(self.workspace.join("inputs"))
9696
.unwrap()
9797
.display(),
9898
f.swc as i32 - f.terser as i32,

‎crates/swc/benches/minify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn files_group(c: &mut Criterion) {
6262
group.sample_size(10);
6363

6464
let mut bench_file = |name: &str| {
65-
group.bench_function(&format!("es/full/minify/libraries/{name}"), |b| {
65+
group.bench_function(format!("es/full/minify/libraries/{name}"), |b| {
6666
bench_minify(b, &format!("{}.js", name));
6767
});
6868
};

‎crates/swc_bundler/src/bundler/chunk/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ mod computed_key;
1515
mod merge;
1616
mod plan;
1717

18-
#[derive(Debug, Default)]
19-
struct State {}
20-
2118
impl<L, R> Bundler<'_, L, R>
2219
where
2320
L: Load,

‎crates/swc_common/benches/serde.rs

+1-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg_attr(not(feature = "serde-impl"), allow(unused))]
2-
31
use ast_node::ast_node;
42
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Criterion};
53
use serde::{Deserialize, Serialize};
@@ -65,32 +63,5 @@ fn bench_serde(c: &mut Criterion) {
6563
});
6664
}
6765

68-
fn bench_ast_node(c: &mut Criterion) {
69-
#[cfg(feature = "serde-impl")]
70-
c.bench_function("serialization of ast node", |b| {
71-
let src = AstNode::String(Str {
72-
span: DUMMY_SP,
73-
value: String::from("perf-diff"),
74-
});
75-
76-
b.iter(|| black_box(serde_json::to_string(&src).unwrap()));
77-
});
78-
#[cfg(feature = "serde-impl")]
79-
c.bench_function("deserialization of ast node", |b| {
80-
let src = serde_json::to_string(&AstNode::String(Str {
81-
span: DUMMY_SP,
82-
value: String::from("perf-diff"),
83-
}))
84-
.unwrap();
85-
println!("{}", src);
86-
87-
b.iter(|| {
88-
let t: AstNode = serde_json::from_str(&src).unwrap();
89-
90-
black_box(t);
91-
});
92-
});
93-
}
94-
95-
criterion_group!(benches, bench_ast_node, bench_serde);
66+
criterion_group!(benches, bench_serde);
9667
criterion_main!(benches);

‎crates/swc_core/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -390,4 +390,5 @@ swc_plugin_runner = { optional = true, version = "0.111.0", path = "../swc_plugi
390390
vergen = { workspace = true, features = ["cargo"] }
391391

392392
[dev-dependencies]
393-
anyhow = { workspace = true }
393+
anyhow = { workspace = true }
394+
testing = { version = "0.38.0", path = "../testing" }

‎crates/swc_core/build.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use vergen::EmitBuilder;
99

1010
// Validate conflict between host / plugin features
1111
#[cfg(all(
12-
feature = "plugin_transform",
12+
feature = "ecma_plugin_transform",
1313
any(
1414
feature = "plugin_transform_host_native",
1515
feature = "plugin_transform_host_js"
@@ -21,15 +21,6 @@ compile_error!(
2121
run plugin, use 'plugin_transform_host_*' instead."
2222
);
2323

24-
#[cfg(all(feature = "__plugin_transform", feature = "common_concurrent"))]
25-
compile_error!("plugin transform cannot enable concurrent mode.");
26-
27-
#[cfg(all(feature = "transforms", feature = "transforms_concurrent"))]
28-
compile_error!(
29-
"'transforms' and 'transforms_concurrent' features are mutually exclusive. Please choose only \
30-
one feature."
31-
);
32-
3324
fn main() {
3425
// Creates a static compile time constants for the version of swc_core.
3526
let pkg_version = env::var("CARGO_PKG_VERSION").unwrap();

‎crates/swc_core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub extern crate swc_ecma_quote_macros;
3232
)]
3333
pub mod plugin;
3434

35-
#[cfg(feature = "preset_env")]
35+
#[cfg(feature = "ecma_preset_env")]
3636
#[cfg_attr(docsrs, doc(cfg(feature = "preset_env")))]
3737
pub mod preset_env {
3838
pub use preset_env_base::*;

‎crates/swc_core/tests/quote.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#[cfg(feature = "quote")]
2-
use swc_core::{ast::Ident, common::DUMMY_SP, quote, quote_expr, utils::private_ident};
1+
#[cfg(feature = "ecma_quote")]
2+
use swc_core::{common::DUMMY_SP, ecma::ast::Ident, ecma::utils::private_ident, quote, quote_expr};
33

4-
#[cfg(feature = "quote")]
4+
#[cfg(feature = "ecma_quote")]
55
#[test]
66
fn quote_expr_call_1() {
77
let _expr = quote_expr!("call(arg1, typeof arg2, arg3)");
88
}
99

10-
#[cfg(feature = "quote")]
10+
#[cfg(feature = "ecma_quote")]
1111
#[test]
1212
fn quote_expr_var_cloned() {
1313
testing::run_test2(false, |_cm, _handler| {
@@ -20,31 +20,31 @@ fn quote_expr_var_cloned() {
2020
.unwrap();
2121
}
2222

23-
#[cfg(feature = "quote")]
23+
#[cfg(feature = "ecma_quote")]
2424
#[test]
2525
fn quote_example() {
2626
let _stmt = quote!(
2727
"const $name = 4;" as Stmt,
28-
name = Ident::new("ref".into(), DUMMY_SP)
28+
name = Ident::new("ref".into(), DUMMY_SP, Default::default())
2929
);
3030
}
3131

32-
#[cfg(feature = "quote")]
32+
#[cfg(feature = "ecma_quote")]
3333
#[test]
3434
fn quote_var_type_expr() {
3535
let _stmt = quote!(
3636
"const $name = $val;" as Stmt,
37-
name = Ident::new("ref".into(), DUMMY_SP),
37+
name = Ident::new("ref".into(), DUMMY_SP, Default::default()),
3838
val: Expr = 4.into(),
3939
);
4040
}
4141

42-
#[cfg(feature = "quote")]
42+
#[cfg(feature = "ecma_quote")]
4343
#[test]
4444
fn quote_var_type_pat() {
4545
let _stmt = quote!(
4646
"const $name = $val;" as Stmt,
47-
name: Pat = Ident::new("ref".into(), DUMMY_SP).into(),
48-
val: Ident = Ident::new("val".into(), DUMMY_SP),
47+
name: Pat = Ident::new("ref".into(), DUMMY_SP, Default::default()).into(),
48+
val: Ident = Ident::new("val".into(), DUMMY_SP, Default::default()),
4949
);
5050
}

‎crates/swc_css_codegen/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ fn serialize_dimension_unit(value: &str) -> Cow<'_, str> {
27922792
// Fast-path
27932793
let need_escape =
27942794
(value.len() >= 2 && value.as_bytes()[0] == b'e' && value.as_bytes()[1].is_ascii_digit())
2795-
|| value.contains(|c| c == char::REPLACEMENT_CHARACTER);
2795+
|| value.contains(char::REPLACEMENT_CHARACTER);
27962796

27972797
if !need_escape {
27982798
return Cow::Borrowed(value);

‎crates/swc_css_compat/src/compiler/custom_media.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl CustomMediaHandler {
255255
Some((query.modifier.clone(), query.media_type.clone()));
256256
}
257257

258-
for condition in &query.condition {
258+
if let Some(condition) = &query.condition {
259259
match &**condition {
260260
MediaConditionType::All(media_condition) => {
261261
if new_media_condition.conditions.is_empty() {

‎crates/swc_css_minifier/src/compressor/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,5 +489,5 @@ impl VisitMut for Compressor {
489489
}
490490

491491
fn contains_only_ascii_characters(string: &str) -> bool {
492-
string.chars().all(|c: char| c.is_ascii())
492+
string.is_ascii()
493493
}

‎crates/swc_ecma_ast/src/class.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct Class {
2222

2323
pub ctxt: SyntaxContext,
2424

25-
#[cfg_attr(c, serde(default))]
25+
#[cfg_attr(feature = "serde-impl", serde(default))]
2626
pub decorators: Vec<Decorator>,
2727

2828
#[cfg_attr(feature = "serde-impl", serde(default))]

‎crates/swc_ecma_codegen/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3908,7 +3908,7 @@ fn get_template_element_from_raw(s: &str, ascii_only: bool) -> String {
39083908
}
39093909

39103910
fn get_ascii_only_ident(sym: &str, may_need_quote: bool, target: EsVersion) -> Cow<str> {
3911-
if sym.chars().all(|c| c.is_ascii()) {
3911+
if sym.is_ascii() {
39123912
return Cow::Borrowed(sym);
39133913
}
39143914

‎crates/swc_ecma_codegen_macros/src/fold.rs

-17
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,6 @@ pub(crate) struct InjectSelf {
1212
pub parser: Option<Ident>,
1313
}
1414

15-
#[cfg(procmacro2_semver_exempt)]
16-
fn get_joined_span(t: &dyn ToTokens) -> Span {
17-
let tts: TokenStream = t.dump().into();
18-
let (mut first, mut last) = (None, None);
19-
for tt in tts {
20-
match first {
21-
None => first = Some(tt.span()),
22-
_ => {}
23-
}
24-
25-
last = Some(tt.span());
26-
}
27-
let cs = Span::call_site();
28-
first.unwrap_or(cs).join(last.unwrap_or(cs)).unwrap_or(cs)
29-
}
30-
31-
#[cfg(not(procmacro2_semver_exempt))]
3215
fn get_joined_span(t: &dyn ToTokens) -> Span {
3316
let tts: TokenStream = t.into_token_stream();
3417
let mut first = None;

‎crates/swc_ecma_lints/src/rules/duplicate_bindings.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,8 @@ fn emit_error(name: &str, span: Span, prev_span: Span) {
420420
span,
421421
&format!("the name `{}` is defined multiple times", name),
422422
)
423-
.span_label(
424-
prev_span,
425-
&format!("previous definition of `{}` here", name),
426-
)
427-
.span_label(span, &format!("`{}` redefined here", name))
423+
.span_label(prev_span, format!("previous definition of `{}` here", name))
424+
.span_label(span, format!("`{}` redefined here", name))
428425
.emit();
429426
});
430427
}

‎crates/swc_ecma_lints/src/rules/no_dupe_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn error(first: &BindingIdent, second: &BindingIdent) {
2525
),
2626
)
2727
.span_label(first.span, "previous definition here".to_string())
28-
.span_label(second.span, &"used as parameter more than once".to_string())
28+
.span_label(second.span, "used as parameter more than once".to_string())
2929
.emit();
3030
});
3131
}

‎crates/swc_ecma_minifier/benches/full.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn bench_files(c: &mut Criterion) {
2323
let mut bench_file = |name: &str| {
2424
let src = read_to_string(format!("benches/full/{}.js", name)).unwrap();
2525

26-
group.bench_function(&format!("es/minifier/libs/{}", name), |b| {
26+
group.bench_function(format!("es/minifier/libs/{}", name), |b| {
2727
b.iter(|| {
2828
// We benchmark full time, including time for creating cm, handler
2929
let allocator = Allocator::default();

‎crates/swc_ecma_minifier/src/compress/pure/properties.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ impl Pure<'_> {
1313
if !self.options.props {
1414
return None;
1515
}
16-
if let Some(obj) = obj {
17-
match obj {
18-
Expr::Array(..) | Expr::Await(..) | Expr::Yield(..) | Expr::Lit(..) => return None,
19-
_ => {}
20-
}
16+
if let Some(Expr::Array(..) | Expr::Await(..) | Expr::Yield(..) | Expr::Lit(..)) = obj {
17+
return None;
2118
}
2219

2320
match &*c.expr {

‎crates/swc_ecma_minifier/src/pass/precompress.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::HEAVY_TASK_PARALLELS;
99
/// Optimizer invoked before invoking compressor.
1010
///
1111
/// - Remove parens.
12+
///
1213
/// TODO: remove completely after #8333
1314
pub(crate) fn precompress_optimizer<'a>() -> impl 'a + VisitMut {
1415
PrecompressOptimizer {}

‎crates/swc_ecma_transforms_base/src/resolver/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ const LOG: bool = false && cfg!(debug_assertions);
6060
/// 3. Defined `a` with syntax context of the block statement.
6161
///
6262
/// 4. Found usage of `a`, and determines that it's reference to `a` in the
63-
/// block. So the reference to `a` will have same syntax context as `a` in the
64-
/// block.
63+
/// block. So the reference to `a` will have same syntax context as `a` in
64+
/// the block.
6565
///
66-
/// 5. Found usage of `a` (last line), and determines that it's a
67-
/// reference to top-level `a`, and change syntax context of `a` on last line to
68-
/// top-level syntax context.
66+
/// 5. Found usage of `a` (last line), and determines that it's a reference to
67+
/// top-level `a`, and change syntax context of `a` on last line to top-level
68+
/// syntax context.
6969
///
7070
///
7171
/// # Parameters

‎crates/swc_ecma_transforms_base/tests/par.rs

+6
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ impl Parallel for ExampleFold {
3030

3131
#[parallel]
3232
impl Fold for ExampleFold {}
33+
34+
#[test]
35+
fn test() {
36+
let _ = ExampleFold;
37+
let _ = ExampleVisitMut;
38+
}

‎crates/swc_ecma_transforms_base/tests/par_explode.rs

+7
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,10 @@ impl ParExplode for ExampleFold {
4242

4343
#[parallel(explode)]
4444
impl Fold for ExampleFold {}
45+
46+
#[test]
47+
fn test_1() {
48+
let _ = ExampleFold;
49+
50+
let _ = ExampleVisitMut;
51+
}

‎crates/swc_ecma_transforms_module/src/util.rs

-9
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,6 @@ pub(super) fn use_strict() -> Stmt {
232232
Lit::Str(quote_str!("use strict")).into_stmt()
233233
}
234234

235-
/// Private `_exports` ident.
236-
pub(super) struct Exports(#[allow(dead_code)] pub Ident);
237-
238-
impl Default for Exports {
239-
fn default() -> Self {
240-
Exports(private_ident!("_exports"))
241-
}
242-
}
243-
244235
pub(crate) fn object_define_enumerable(
245236
target: ExprOrSpread,
246237
prop_name: ExprOrSpread,

‎crates/swc_ecma_transforms_testing/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ fn exec_with_node_test_runner(src: &str) -> Result<(), ()> {
659659
};
660660

661661
let output = base_cmd
662-
.arg(&format!("{}", path.display()))
662+
.arg(format!("{}", path.display()))
663663
.arg("--color")
664664
.current_dir(root)
665665
.output()

‎crates/swc_ecma_transforms_typescript/src/config.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ pub struct TsxConfig {
4242

4343
#[derive(Default, Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
4444
pub enum TsImportExportAssignConfig {
45-
/// - Rewrite `import foo = require("foo")` to `var foo = require("foo")`
46-
/// - Rewrite `export =` to `module.exports = `
45+
/// - Rewrite `import foo = require("foo")` to `var foo = require("foo")`
46+
/// - Rewrite `export =` to `module.exports = `
47+
///
4748
/// Note: This option is deprecated as all CJS/AMD/UMD can handle it
4849
/// themselves.
4950
#[default]

‎crates/swc_ecma_usage_analyzer/Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ bench = false
1818

1919
[features]
2020
# This enables global concurrent mode
21-
concurrent = ["swc_common/concurrent", "indexmap/rayon"]
22-
trace-ast = []
21+
concurrent = ["swc_common/concurrent", "indexmap/rayon"]
22+
trace-ast = []
23+
tracing-spans = []
2324

2425
[dependencies]
2526
indexmap = { workspace = true }

‎crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs

+52-52
Large diffs are not rendered by default.

‎crates/swc_fast_graph/src/digraph.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ pub type FastDiGraphMap<N, E> = FastGraphMap<N, E, Directed>;
4747
///
4848
/// - Associated data `N` for nodes and `E` for edges, called *weights*.
4949
/// - The node weight `N` must implement `Copy` and will be used as node
50-
/// identifier, duplicated into several places in the data structure.
51-
/// It must be suitable as a hash table key (implementing `Eq + Hash`).
52-
/// The node type must also implement `Ord` so that the implementation can
53-
/// order the pair (`a`, `b`) for an edge connecting any two nodes `a` and `b`.
50+
/// identifier, duplicated into several places in the data structure. It must
51+
/// be suitable as a hash table key (implementing `Eq + Hash`). The node type
52+
/// must also implement `Ord` so that the implementation can order the pair
53+
/// (`a`, `b`) for an edge connecting any two nodes `a` and `b`.
5454
/// - `E` can be of arbitrary type.
5555
/// - Edge type `Ty` that determines whether the graph edges are directed or
56-
/// undirected.
56+
/// undirected.
5757
///
5858
/// You can use the type aliases `UnGraphMap` and `DiGraphMap` for convenience.
5959
///
@@ -418,7 +418,7 @@ where
418418
///
419419
/// 1. Note that node and edge indices in the `Graph` have nothing in common
420420
/// with the `GraphMap`s node weights `N`. The node weights `N` are used
421-
/// as node weights in the resulting `Graph`, too.
421+
/// as node weights in the resulting `Graph`, too.
422422
/// 2. Note that the index type is user-chosen.
423423
///
424424
/// Computes in **O(|V| + |E|)** time (average).

‎crates/swc_html_codegen/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,9 @@ where
620620
None => true,
621621
_ => false,
622622
},
623-
// The closing tag can be omitted if it is immediately followed by a <rb>, <rtc>
624-
// or <rt> element opening tag or by its parent closing tag.
623+
// The closing tag can be omitted if it is immediately followed by a <rb>,
624+
// <rtc> or <rt> element opening tag or by its parent
625+
// closing tag.
625626
"rtc" => match next {
626627
Some(Child::Element(Element {
627628
namespace,

‎crates/swc_html_minifier/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ impl Minifier<'_> {
21082108

21092109
fn minify_sizes(&self, value: &str) -> Option<String> {
21102110
let values = value
2111-
.rsplitn(2, |c| matches!(c, '\t' | '\n' | '\x0C' | '\r' | ' '))
2111+
.rsplitn(2, ['\t', '\n', '\x0C', '\r', ' '])
21122112
.collect::<Vec<&str>>();
21132113

21142114
if values.len() != 2 {

‎crates/swc_html_parser/tests/html5lib_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn html5lib_test_tokenizer(input: PathBuf) {
6363
let filename = input.to_str().expect("failed to parse path");
6464
let contents = fs::read_to_string(filename).expect("Something went wrong reading the file");
6565
let obj: Value = serde_json::from_str(&contents).expect("json parse error");
66-
let tests = match obj.get(&"tests".to_string()) {
66+
let tests = match obj.get("tests".to_string()) {
6767
Some(Value::Array(tests)) => tests,
6868
_ => return,
6969
};

‎crates/swc_macros_common/src/lib.rs

-10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
33
extern crate proc_macro;
44

5-
#[cfg(procmacro2_semver_exempt)]
6-
use pmutil::SpanExt;
75
use proc_macro2::{Span, TokenStream};
86
use quote::ToTokens;
97
use syn::{punctuated::Pair, *};
@@ -17,18 +15,10 @@ pub fn call_site() -> Span {
1715
Span::call_site()
1816
}
1917

20-
/// `Span::def_site().located_at(Span::call_site())`
21-
#[cfg(not(procmacro2_semver_exempt))]
2218
pub fn def_site() -> Span {
2319
call_site()
2420
}
2521

26-
/// `Span::def_site().located_at(Span::call_site())`
27-
#[cfg(procmacro2_semver_exempt)]
28-
pub fn def_site() -> Span {
29-
Span::def_site().located_at(Span::call_site())
30-
}
31-
3222
/// `attr` - tokens inside `#[]`. e.g. `derive(EqIgnoreSpan)`, ast_node
3323
pub fn print(attr: &'static str, tokens: proc_macro2::TokenStream) -> proc_macro::TokenStream {
3424
use std::env;

‎crates/swc_visit/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! # `Fold`
1919
//!
2020
//! > WARNING: `Fold` is slow, and it's recommended to use VisitMut if you are
21-
//! experienced.
21+
//! > experienced.
2222
//!
2323
//!
2424
//! `Fold` takes ownership of value, which means you have to return the new

‎crates/testing/src/output.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub struct Diff {
3535
///
3636
/// - The `CARGO_MANIFEST_DIR` directory is replaced with `$DIR`.
3737
/// - All backslashes (\) within same line as `$DIR` are converted to forward
38-
/// slashes (/) (for Windows) - All CR LF newlines are converted to LF
38+
/// slashes (/) (for Windows) - All CR LF newlines are converted to LF
3939
///
4040
/// - `normalize-stdout` is not implemented (yet?).
4141
#[derive(Clone, Ord, PartialOrd, PartialEq, Eq, Default, Hash)]

‎rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2024-04-16
1+
nightly-2024-07-21

0 commit comments

Comments
 (0)
Please sign in to comment.