Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
700593f1
Commit
700593f1
authored
Jul 08, 2025
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check notes, but do not link them
parent
be6b69e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
6 deletions
+29
-6
event.rs
turbopack/crates/turbo-tasks/src/event.rs
+29
-6
No files found.
turbopack/crates/turbo-tasks/src/event.rs
View file @
700593f1
...
@@ -211,28 +211,51 @@ pub fn no_note() -> String {
...
@@ -211,28 +211,51 @@ pub fn no_note() -> String {
String
::
new
()
String
::
new
()
}
}
pub
fn
ignore_note
(
_note
:
impl
Fn
()
->
String
+
Sync
+
Send
+
'static
)
{
// This function must be removed by DCE.
// This code triggers a build error when it's not removed.
unsafe
{
unsafe
extern
"C"
{
fn
trigger_link_error
()
->
!
;
}
trigger_link_error
();
}
}
#[cfg(not(feature
=
"hanging_detection"
))]
#[cfg(not(feature
=
"hanging_detection"
))]
#[macro_export]
#[macro_export]
macro_rules!
listen_event
{
macro_rules!
listen_event
{
(
$self:expr
,
$note:expr
)
=>
{
(
$self:expr
,
$note:expr
)
=>
{{
// This makes sure the code is checked, but not included in the final result.
if
false
{
$crate
::
event
::
ignore_note
(
$note
);
}
$self
.listen
()
$self
.listen
()
};
}
}
;
}
}
#[cfg(not(feature
=
"hanging_detection"
))]
#[cfg(not(feature
=
"hanging_detection"
))]
#[macro_export]
#[macro_export]
macro_rules!
new_event
{
macro_rules!
new_event
{
(
$description:expr
)
=>
{
(
$description:expr
)
=>
{{
// This makes sure the code is checked, but not included in the final result.
if
false
{
$crate
::
event
::
ignore_note
(
$description
);
}
$crate
::
event
::
Event
::
new
()
$crate
::
event
::
Event
::
new
()
};
}
}
;
}
}
#[cfg(not(feature
=
"hanging_detection"
))]
#[cfg(not(feature
=
"hanging_detection"
))]
#[macro_export]
#[macro_export]
macro_rules!
event_note
{
macro_rules!
event_note
{
(
$note:expr
)
=>
{
(
$note:expr
)
=>
{{
// This makes sure the code is checked, but not included in the final result.
if
false
{
$crate
::
event
::
ignore_note
(
$note
);
}
$crate
::
event
::
no_note
$crate
::
event
::
no_note
};
}
}
;
}
}
#[cfg(feature
=
"hanging_detection"
)]
#[cfg(feature
=
"hanging_detection"
)]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment