Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
nightly-2023-10-08 (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanventer authored Jul 3, 2024
1 parent ba0244c commit 5b54506
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 38 deletions.
Binary file modified binaries/summary_store.tar
Binary file not shown.
5 changes: 5 additions & 0 deletions checker/src/block_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4000,6 +4000,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com
&[*elem],
);
}
mir::ProjectionElem::Subtype { .. } => continue,
mir::ProjectionElem::OpaqueCast(_) => {
continue;
}
Expand Down Expand Up @@ -4083,6 +4084,10 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com
};
PathSelector::Downcast(name_str, index.as_usize(), tag_value)
}
mir::ProjectionElem::Subtype(_) => {
// Dummy selector that will be ignored by caller.
PathSelector::Deref
}
mir::ProjectionElem::OpaqueCast(_) => {
// Dummy selector that will be ignored by caller.
PathSelector::Deref
Expand Down
1 change: 1 addition & 0 deletions checker/src/type_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ impl<'tcx> TypeVisitor<'tcx> {
}
}
}
mir::ProjectionElem::Subtype(ty) => *ty,
mir::ProjectionElem::OpaqueCast(ty) => *ty,
mir::ProjectionElem::Downcast(_, ordinal) => {
if let TyKind::Adt(def, args) = base_ty.kind() {
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ commit;
],
"callables": [
{
"name": "/fnptr/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[48a0]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[760c]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 9,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ commit;
],
"callables": [
{
"name": "/fnptr_clean/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[6833]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_clean/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[48ff]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 14,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_deduplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ commit;
],
"callables": [
{
"name": "/fnptr_deduplicate/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[474a]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_deduplicate/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[bc1f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 10,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_dom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ commit;
],
"callables": [
{
"name": "/fnptr_dom/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[5adb]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[5adb]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_dom/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[e523]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[e523]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 9,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_dom_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ commit;
],
"callables": [
{
"name": "/fnptr_dom_loop/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[e24a]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[e24a]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_dom_loop/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[0e64]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[0e64]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 9,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_dom_loop_souffle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ digraph {
],
"callables": [
{
"name": "/fnptr_dom_loop_souffle/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[f7b4]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[f7b4]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_dom_loop_souffle/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[ce9d]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[ce9d]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 10,
"local": true
Expand Down
26 changes: 13 additions & 13 deletions checker/tests/call_graph/fnptr_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ commit;
/* EXPECTED:CALL_SITES{
"files": [
"tests/call_graph/fnptr_fold.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/std/src/io/stdio.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/fmt/mod.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/slice/mod.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/ptr/metadata.rs"
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/std/src/io/stdio.rs",
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/core/src/fmt/mod.rs",
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/core/src/slice/mod.rs",
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/core/src/ptr/metadata.rs"
],
"callables": [
{
"name": "/fnptr_fold/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[3ab1]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_fold/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[d20e]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 10,
"local": true
Expand All @@ -99,25 +99,25 @@ commit;
"local": true
},
{
"name": "/std/std::io::_print(std::fmt::Arguments<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(1:12956 ~ std[f1cf]::io::stdio::_print::'_), '_) })>)->()",
"name": "/std/std::io::_print(std::fmt::Arguments<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(1:12967 ~ std[8993]::io::stdio::_print::'_), '_) })>)->()",
"file_index": 1,
"first_line": 1094,
"first_line": 1096,
"local": false
},
{
"name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyBound(DefId(2:9457 ~ core[480e]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments<ReEarlyBound(DefId(2:9457 ~ core[480e]::fmt::{impl#2}::'a), 0, 'a)>",
"name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyBound(DefId(2:9481 ~ core[a5f2]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments<ReEarlyBound(DefId(2:9481 ~ core[a5f2]::fmt::{impl#2}::'a), 0, 'a)>",
"file_index": 2,
"first_line": 317,
"first_line": 318,
"local": true
},
{
"name": "/core/core::slice::<impl [T]>::len(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:58132 ~ core[480e]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize",
"name": "/core/core::slice::<impl [T]>::len(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:58205 ~ core[a5f2]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize",
"file_index": 3,
"first_line": 141,
"local": true
},
{
"name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1737 ~ core[480e]::ptr::metadata::Pointee::Metadata) })",
"name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1738 ~ core[a5f2]::ptr::metadata::Pointee::Metadata) })",
"file_index": 4,
"first_line": 94,
"local": true
Expand Down Expand Up @@ -161,14 +161,14 @@ commit;
],
[
2,
318,
319,
12,
5,
6
],
[
2,
319,
320,
13,
5,
5
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ commit;
"local": true
},
{
"name": "/fnptr_loop/fn2(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[f96b]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_loop/fn2(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[a3de]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 12,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/fnptr_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ commit;
],
"callables": [
{
"name": "/fnptr_slice/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[2471]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"name": "/fnptr_slice/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[fde2]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32",
"file_index": 0,
"first_line": 10,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ commit;
"local": true
},
{
"name": "/generic/Gen::<T>::bar(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[bb92]::{impl#0}::bar::'_), '_) }) Gen<T/#0>,T/#0)->()",
"name": "/generic/Gen::<T>::bar(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[b33b]::{impl#0}::bar::'_), '_) }) Gen<T/#0>,T/#0)->()",
"file_index": 0,
"first_line": 14,
"local": true
Expand Down
6 changes: 3 additions & 3 deletions checker/tests/call_graph/static_deduplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ commit;
],
"callables": [
{
"name": "/static_deduplicate/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[ad45]::fn1::'_), '_) }) str)->(u32&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[ad45]::fn1::'_), '_) }) str))",
"name": "/static_deduplicate/fn1(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[974c]::fn1::'_), '_) }) str)->(u32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[974c]::fn1::'_), '_) }) str)",
"file_index": 0,
"first_line": 10,
"local": true
},
{
"name": "/static_deduplicate/fn2(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[ad45]::fn2::'_), '_) }) str)->(u32&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[ad45]::fn2::'_), '_) }) str))",
"name": "/static_deduplicate/fn2(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[974c]::fn2::'_), '_) }) str)->(u32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[974c]::fn2::'_), '_) }) str)",
"file_index": 0,
"first_line": 13,
"local": true
},
{
"name": "/static_deduplicate/fn3(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[ad45]::fn3::'_), '_) }) str)->(u32&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[ad45]::fn3::'_), '_) }) str))",
"name": "/static_deduplicate/fn3(u32,&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[974c]::fn3::'_), '_) }) str)->(u32, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[974c]::fn3::'_), '_) }) str)",
"file_index": 0,
"first_line": 16,
"local": true
Expand Down
20 changes: 10 additions & 10 deletions checker/tests/call_graph/static_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ commit;
/* EXPECTED:CALL_SITES{
"files": [
"tests/call_graph/static_fold.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/std/src/io/stdio.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/fmt/mod.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/slice/mod.rs",
"/rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/ptr/metadata.rs"
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/std/src/io/stdio.rs",
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/core/src/fmt/mod.rs",
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/core/src/slice/mod.rs",
"/rustc/97c81e1b537088f1881c8894ee8579812ed9b6d1/library/core/src/ptr/metadata.rs"
],
"callables": [
{
Expand Down Expand Up @@ -95,25 +95,25 @@ commit;
"local": true
},
{
"name": "/std/std::io::_print(std::fmt::Arguments<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(1:12956 ~ std[f1cf]::io::stdio::_print::'_), '_) })>)->()",
"name": "/std/std::io::_print(std::fmt::Arguments<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(1:12967 ~ std[8993]::io::stdio::_print::'_), '_) })>)->()",
"file_index": 1,
"first_line": 1094,
"first_line": 1096,
"local": false
},
{
"name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyBound(DefId(2:9457 ~ core[480e]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments<ReEarlyBound(DefId(2:9457 ~ core[480e]::fmt::{impl#2}::'a), 0, 'a)>",
"name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyBound(DefId(2:9481 ~ core[a5f2]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments<ReEarlyBound(DefId(2:9481 ~ core[a5f2]::fmt::{impl#2}::'a), 0, 'a)>",
"file_index": 2,
"first_line": 317,
"first_line": 318,
"local": false
},
{
"name": "/core/core::slice::<impl [T]>::len(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:58132 ~ core[480e]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize",
"name": "/core/core::slice::<impl [T]>::len(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:58205 ~ core[a5f2]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize",
"file_index": 3,
"first_line": 141,
"local": true
},
{
"name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1737 ~ core[480e]::ptr::metadata::Pointee::Metadata) })",
"name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1738 ~ core[a5f2]::ptr::metadata::Pointee::Metadata) })",
"file_index": 4,
"first_line": 94,
"local": true
Expand Down
2 changes: 1 addition & 1 deletion checker/tests/call_graph/trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ commit;
"local": true
},
{
"name": "/trait/<Bar as Tr>::bar(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[1f64]::{impl#0}::bar::'_), '_) }) Bar)->i32",
"name": "/trait/<Bar as Tr>::bar(&ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[1ce8]::{impl#0}::bar::'_), '_) }) Bar)->i32",
"file_index": 0,
"first_line": 14,
"local": true
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-09-24"
components = [ "clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview" ]
channel = "nightly-2023-10-08"
components = ["clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview"]

0 comments on commit 5b54506

Please sign in to comment.