Skip to content

Commit c1ae7d2

Browse files
committed
Add custom symbols for those removed upstream
1 parent cdb76dc commit c1ae7d2

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/preempt_count/annotation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
4242
&& data.len() == 3
4343
&& let DefPathData::TypeNs(crate::symbol::task) = data[0].data
4444
&& let DefPathData::TypeNs(crate::symbol::wake) = data[1].data
45-
&& let DefPathData::TypeNs(sym::Waker) = data[2].data
45+
&& let DefPathData::TypeNs(crate::symbol::Waker) = data[2].data
4646
{
4747
if fn_name == sym::clone
4848
|| fn_name == crate::symbol::wake
@@ -63,7 +63,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
6363

6464
if data.len() == 3
6565
&& let DefPathData::TypeNs(sym::any) = data[0].data
66-
&& let DefPathData::TypeNs(sym::Any) = data[1].data
66+
&& let DefPathData::TypeNs(crate::symbol::Any) = data[1].data
6767
&& let DefPathData::ValueNs(_any_fn) = data[2].data
6868
{
6969
// This is a `core::any::Any::_` function.
@@ -76,7 +76,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
7676

7777
if data.len() == 3
7878
&& let DefPathData::TypeNs(crate::symbol::error) = data[0].data
79-
&& let DefPathData::TypeNs(sym::Error) = data[1].data
79+
&& let DefPathData::TypeNs(crate::symbol::Error) = data[1].data
8080
&& let DefPathData::ValueNs(_any_fn) = data[2].data
8181
{
8282
// This is a `core::error::Error::_` function.

src/symbol.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ def! {
3232
dump_mir,
3333
adjust,
3434
unchecked,
35+
Any,
3536
error,
37+
Error,
3638
write,
3739
Write,
3840
task,
3941
wake,
4042
wake_by_ref,
43+
Waker,
4144
sort,
4245
quicksort,
4346
partition,

0 commit comments

Comments
 (0)