From 6a91ee00efcd5eb0b8eab51fa51ab00f0f22eb13 Mon Sep 17 00:00:00 2001 From: Herman Venter Date: Fri, 12 Jul 2024 15:23:26 -0700 Subject: [PATCH] Nightly-2023-12-07 (#1269) --- Cargo.lock | 15 ++------------- binaries/summary_store.tar | Bin 3000832 -> 3000320 bytes checker/Cargo.toml | 1 - checker/src/lib.rs | 1 + checker/src/utils.rs | 10 ++++++---- checker/tests/call_graph/fnptr.rs | 2 +- checker/tests/call_graph/fnptr_clean.rs | 2 +- checker/tests/call_graph/fnptr_deduplicate.rs | 2 +- checker/tests/call_graph/fnptr_dom.rs | 2 +- checker/tests/call_graph/fnptr_dom_loop.rs | 2 +- .../call_graph/fnptr_dom_loop_souffle.rs | 2 +- checker/tests/call_graph/fnptr_fold.rs | 18 +++++++++--------- checker/tests/call_graph/fnptr_loop.rs | 2 +- checker/tests/call_graph/fnptr_slice.rs | 2 +- checker/tests/call_graph/generic.rs | 2 +- .../tests/call_graph/static_deduplicate.rs | 6 +++--- checker/tests/call_graph/static_fold.rs | 16 ++++++++-------- checker/tests/call_graph/trait.rs | 2 +- checker/tests/run-pass/alloc_zeroed.rs | 1 + checker/tests/run-pass/copy_from_slice.rs | 1 + checker/tests/run-pass/deallocate.rs | 1 + checker/tests/run-pass/discriminant.rs | 1 + checker/tests/run-pass/maybe_unreachable.rs | 1 + checker/tests/run-pass/offset.rs | 1 + checker/tests/run-pass/read_to_end.rs | 7 ++----- checker/tests/run-pass/slice_copy.rs | 1 + checker/tests/run-pass/transmute.rs | 1 + checker/tests/run-pass/unreachable.rs | 1 + rust-toolchain.toml | 2 +- standard_contracts/src/lib.rs | 1 + 30 files changed, 52 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 74c72e9c..99bc37a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -588,7 +588,6 @@ dependencies = [ "sled", "tar", "tempfile", - "triomphe", "walkdir", "z3-sys", ] @@ -918,12 +917,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -1038,13 +1031,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.9" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" -dependencies = [ - "serde", - "stable_deref_trait", -] +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" [[package]] name = "unicode-ident" diff --git a/binaries/summary_store.tar b/binaries/summary_store.tar index 907c0a13316ebe8aa4a1469c53837c75d6064d37..b36ea95a24a219fcc5e3e8bc77ef7afbff067052 100644 GIT binary patch delta 5163 zcmds5`CnAk`=5b(nS0MT3?RE81JgZcX21YhEJeW;L_yS2P*TYi7ZOZ!SFmzdP~=e% zTysk-<)bGv7g8(xkTyM8?KO#cE73MZsN*B7&>5+9lfm+1j;>YWEMDbAi@BI-*^) zDKa`XI{Hv=;f8QW zcpzFLJP}?9Z-fuR7vYESN3=o&AOaDs5ka68O^wDYmk;i4Y`oftpE;j(yv~g-roH)o zrxVZr?&2?)m{(WbDY`)3lDNi1~BS6#&S`EKZX6n<$;AMRy zTe4pgoCJ+Vvoe2&scL!nR)I&=nUXwRQ>LVSFFB+jK@c?>mzDX0*j}*SaN{%nGVM!| za_`(AQo|g9XN6iPI`hbc;5<*m(*v3NBzuYAqQiWUpP;pJXm8CB_@=jl54DlCj$@+a zaH$jc)pYA=BhM-bUh65%$XbyhHS7_pPHoxb%>OP4zTqwB?5!RyIW%JgzP`wsA@l2% z!QXhgJ{^ATiR3Vk6o_7<(Lqh1){kHN-1XNu#sQf`_HU_S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?2?nHL&6qwSa!SE9iZJU_R z=!!zZ{=fbPl{#=Y@gQBz6khq$PSrR#OPXe>sgoy+8kw3pa@6SIQzuN(i4-5pJr^1_ zaJwYow-FH&Y&qve`+NFl(fUi07<$!&|Fe6a zYA4Zkkmafu4Y}0lO6%rHJCd?=Ea>mf7uYOmlg0)MdRs!p(8-no2IIbEaa(D9spO!y zpV$kcw2DZ}G!G(T$6U)TFFES?uPtbU!&OPlUvK`QnJ6o>gc@k4zDuKM-43bh^oJXD z;=7F&qqp2P=i)4U-^-Ayw(cDyi(d{{zIJ!q_wL`C+an8T|KRzCqZVcwu49??AM8ifzK^I-t12K>h9?O{H~-lBlfmi`Iz?{?<5ex;uDw9<7@ziD36&h|F?oIQty3M5xIjYfvrc@6>Mivs^7otU@On%C6usMql* z+Q6qv?q>LLphG99IbyJhM<4swga}q@-RUiF?sW1gW_U=#ddr`Nim$d=hZr3*`+7a3 z4eCS5!$+eDgaxtA*&;Y7AfvtT{>pm9Th3Ydb^wlYm!R!IX{vC{3@8c_SI=9|Gx>R9 zNepcW3YTE{Qr!%(ac966;bPYf>o4Ape97T&aFna$?XJ;SVZjl@L~*h{pfE%%e{MB0 z$BGQug*I59NIu?n{>*ifC8l={oE$Dz)1a%~a(AW02`oKGfjkEbof6ftvQYW diff --git a/checker/Cargo.toml b/checker/Cargo.toml index c833070e..5410c7af 100644 --- a/checker/Cargo.toml +++ b/checker/Cargo.toml @@ -49,7 +49,6 @@ shellwords = "*" sled = "*" tar = "*" tempfile = "*" -triomphe = "=0.1.9" z3-sys = { version = "*", git = "https://github.com/prove-rs/z3.rs.git", optional = true } [dev-dependencies] diff --git a/checker/src/lib.rs b/checker/src/lib.rs index ab07ac25..7450a8c6 100644 --- a/checker/src/lib.rs +++ b/checker/src/lib.rs @@ -12,6 +12,7 @@ // In the current world, however, we have to use the following hacky feature to get access to a // private and not very stable set of APIs from whatever compiler is in the toolchain when we run Mirai. // While pretty bad, it is a lot less bad than having to write our own compiler, so here goes. +#![allow(internal_features)] #![feature(rustc_private)] #![feature(array_chunks)] #![feature(box_patterns)] diff --git a/checker/src/utils.rs b/checker/src/utils.rs index 60887ad2..69b3a428 100644 --- a/checker/src/utils.rs +++ b/checker/src/utils.rs @@ -126,8 +126,10 @@ pub fn is_public(def_id: DefId, tcx: TyCtxt<'_>) -> bool { .opt_def_id() .map_or_else( || { - tcx.sess - .delay_span_bug(tr.path.span, "trait without a def-id"); + tcx.sess.span_delayed_bug( + tr.path.span, + "trait without a def-id", + ); ty::Visibility::Public }, |def_id| tcx.visibility(def_id), @@ -425,10 +427,10 @@ fn push_component_name(component_data: DefPathData, target: &mut String) { ForeignMod => "foreign", Use => "use", GlobalAsm => "global_asm", - ClosureExpr => "closure", + Closure => "closure", Ctor => "ctor", AnonConst => "constant", - ImplTrait => "implement_trait", + OpaqueTy => "opaque", _ => assume_unreachable!(), }), }; diff --git a/checker/tests/call_graph/fnptr.rs b/checker/tests/call_graph/fnptr.rs index 1889e3ab..2b4778ef 100644 --- a/checker/tests/call_graph/fnptr.rs +++ b/checker/tests/call_graph/fnptr.rs @@ -69,7 +69,7 @@ commit; ], "callables": [ { - "name": "/fnptr/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[cc2d]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[26f3]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 9, "local": true diff --git a/checker/tests/call_graph/fnptr_clean.rs b/checker/tests/call_graph/fnptr_clean.rs index 44e68c29..7c572298 100644 --- a/checker/tests/call_graph/fnptr_clean.rs +++ b/checker/tests/call_graph/fnptr_clean.rs @@ -74,7 +74,7 @@ commit; ], "callables": [ { - "name": "/fnptr_clean/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[561d]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_clean/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[599c]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 14, "local": true diff --git a/checker/tests/call_graph/fnptr_deduplicate.rs b/checker/tests/call_graph/fnptr_deduplicate.rs index 2a78000d..fe52121c 100644 --- a/checker/tests/call_graph/fnptr_deduplicate.rs +++ b/checker/tests/call_graph/fnptr_deduplicate.rs @@ -66,7 +66,7 @@ commit; ], "callables": [ { - "name": "/fnptr_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[adf7]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[2d10]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true diff --git a/checker/tests/call_graph/fnptr_dom.rs b/checker/tests/call_graph/fnptr_dom.rs index 70fe48fe..eecd2a8e 100644 --- a/checker/tests/call_graph/fnptr_dom.rs +++ b/checker/tests/call_graph/fnptr_dom.rs @@ -71,7 +71,7 @@ commit; ], "callables": [ { - "name": "/fnptr_dom/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[aaca]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[aaca]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_dom/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[7782]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[7782]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 9, "local": true diff --git a/checker/tests/call_graph/fnptr_dom_loop.rs b/checker/tests/call_graph/fnptr_dom_loop.rs index 6db971ff..b4ceb952 100644 --- a/checker/tests/call_graph/fnptr_dom_loop.rs +++ b/checker/tests/call_graph/fnptr_dom_loop.rs @@ -85,7 +85,7 @@ commit; ], "callables": [ { - "name": "/fnptr_dom_loop/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[2dba]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[2dba]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_dom_loop/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[cf26]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[cf26]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 9, "local": true diff --git a/checker/tests/call_graph/fnptr_dom_loop_souffle.rs b/checker/tests/call_graph/fnptr_dom_loop_souffle.rs index e2b68f32..bba9bd3e 100644 --- a/checker/tests/call_graph/fnptr_dom_loop_souffle.rs +++ b/checker/tests/call_graph/fnptr_dom_loop_souffle.rs @@ -82,7 +82,7 @@ digraph { ], "callables": [ { - "name": "/fnptr_dom_loop_souffle/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[f3f8]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[f3f8]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_dom_loop_souffle/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[ce91]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[ce91]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true diff --git a/checker/tests/call_graph/fnptr_fold.rs b/checker/tests/call_graph/fnptr_fold.rs index 046f863d..1b0f2623 100644 --- a/checker/tests/call_graph/fnptr_fold.rs +++ b/checker/tests/call_graph/fnptr_fold.rs @@ -68,14 +68,14 @@ commit; /* EXPECTED:CALL_SITES{ "files": [ "tests/call_graph/fnptr_fold.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/std/src/io/stdio.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/core/src/fmt/mod.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/core/src/slice/mod.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/core/src/ptr/metadata.rs" + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/std/src/io/stdio.rs", + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/fmt/mod.rs", + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/slice/mod.rs", + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/ptr/metadata.rs" ], "callables": [ { - "name": "/fnptr_fold/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[6cb6]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_fold/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[8908]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true @@ -99,25 +99,25 @@ commit; "local": true }, { - "name": "/std/std::io::_print(std::fmt::Arguments)->()", + "name": "/std/std::io::_print(std::fmt::Arguments)->()", "file_index": 1, "first_line": 1096, "local": false }, { - "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9648 ~ core[499d]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", + "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9827 ~ core[408d]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", "file_index": 2, "first_line": 321, "local": true }, { - "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:58514 ~ core[499d]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", + "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59746 ~ core[408d]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", "file_index": 3, "first_line": 142, "local": true }, { - "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1750 ~ core[499d]::ptr::metadata::Pointee::Metadata) })", + "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1750 ~ core[408d]::ptr::metadata::Pointee::Metadata) })", "file_index": 4, "first_line": 94, "local": true diff --git a/checker/tests/call_graph/fnptr_loop.rs b/checker/tests/call_graph/fnptr_loop.rs index e3e5144e..2513dd01 100644 --- a/checker/tests/call_graph/fnptr_loop.rs +++ b/checker/tests/call_graph/fnptr_loop.rs @@ -82,7 +82,7 @@ commit; "local": true }, { - "name": "/fnptr_loop/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[11d0]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_loop/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[4126]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 12, "local": true diff --git a/checker/tests/call_graph/fnptr_slice.rs b/checker/tests/call_graph/fnptr_slice.rs index 5dea239a..dfd9661a 100644 --- a/checker/tests/call_graph/fnptr_slice.rs +++ b/checker/tests/call_graph/fnptr_slice.rs @@ -62,7 +62,7 @@ commit; ], "callables": [ { - "name": "/fnptr_slice/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[5571]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_slice/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[df6f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true diff --git a/checker/tests/call_graph/generic.rs b/checker/tests/call_graph/generic.rs index 5506b431..44a62a64 100644 --- a/checker/tests/call_graph/generic.rs +++ b/checker/tests/call_graph/generic.rs @@ -74,7 +74,7 @@ commit; "local": true }, { - "name": "/generic/Gen::::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[627e]::{impl#0}::bar::'_), '_) }) Gen,T/#0)->()", + "name": "/generic/Gen::::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[60ea]::{impl#0}::bar::'_), '_) }) Gen,T/#0)->()", "file_index": 0, "first_line": 14, "local": true diff --git a/checker/tests/call_graph/static_deduplicate.rs b/checker/tests/call_graph/static_deduplicate.rs index 83caa962..aaff64c4 100644 --- a/checker/tests/call_graph/static_deduplicate.rs +++ b/checker/tests/call_graph/static_deduplicate.rs @@ -66,19 +66,19 @@ commit; ], "callables": [ { - "name": "/static_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[34e1]::fn1::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[34e1]::fn1::'_), '_) }) str)", + "name": "/static_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[c483]::fn1::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[c483]::fn1::'_), '_) }) str)", "file_index": 0, "first_line": 10, "local": true }, { - "name": "/static_deduplicate/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[34e1]::fn2::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[34e1]::fn2::'_), '_) }) str)", + "name": "/static_deduplicate/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[c483]::fn2::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[c483]::fn2::'_), '_) }) str)", "file_index": 0, "first_line": 13, "local": true }, { - "name": "/static_deduplicate/fn3(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[34e1]::fn3::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[34e1]::fn3::'_), '_) }) str)", + "name": "/static_deduplicate/fn3(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[c483]::fn3::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[c483]::fn3::'_), '_) }) str)", "file_index": 0, "first_line": 16, "local": true diff --git a/checker/tests/call_graph/static_fold.rs b/checker/tests/call_graph/static_fold.rs index b92b3fe2..3a212d6f 100644 --- a/checker/tests/call_graph/static_fold.rs +++ b/checker/tests/call_graph/static_fold.rs @@ -64,10 +64,10 @@ commit; /* EXPECTED:CALL_SITES{ "files": [ "tests/call_graph/static_fold.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/std/src/io/stdio.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/core/src/fmt/mod.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/core/src/slice/mod.rs", - "/rustc/49b3924bd4a34d3cf9c37b74120fba78d9712ab8/library/core/src/ptr/metadata.rs" + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/std/src/io/stdio.rs", + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/fmt/mod.rs", + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/slice/mod.rs", + "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/ptr/metadata.rs" ], "callables": [ { @@ -95,25 +95,25 @@ commit; "local": true }, { - "name": "/std/std::io::_print(std::fmt::Arguments)->()", + "name": "/std/std::io::_print(std::fmt::Arguments)->()", "file_index": 1, "first_line": 1096, "local": false }, { - "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9648 ~ core[499d]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", + "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9827 ~ core[408d]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", "file_index": 2, "first_line": 321, "local": false }, { - "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:58514 ~ core[499d]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", + "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59746 ~ core[408d]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", "file_index": 3, "first_line": 142, "local": true }, { - "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1750 ~ core[499d]::ptr::metadata::Pointee::Metadata) })", + "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1750 ~ core[408d]::ptr::metadata::Pointee::Metadata) })", "file_index": 4, "first_line": 94, "local": true diff --git a/checker/tests/call_graph/trait.rs b/checker/tests/call_graph/trait.rs index 3fce1262..4e3f255d 100644 --- a/checker/tests/call_graph/trait.rs +++ b/checker/tests/call_graph/trait.rs @@ -73,7 +73,7 @@ commit; "local": true }, { - "name": "/trait/::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[e2b9]::{impl#0}::bar::'_), '_) }) Bar)->i32", + "name": "/trait/::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[6f4c]::{impl#0}::bar::'_), '_) }) Bar)->i32", "file_index": 0, "first_line": 14, "local": true diff --git a/checker/tests/run-pass/alloc_zeroed.rs b/checker/tests/run-pass/alloc_zeroed.rs index 76759ecd..3f47d7db 100644 --- a/checker/tests/run-pass/alloc_zeroed.rs +++ b/checker/tests/run-pass/alloc_zeroed.rs @@ -6,6 +6,7 @@ // A test that checks that dereferenced uninitialized pointers into zeroed heap blocks known to be zero. +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/copy_from_slice.rs b/checker/tests/run-pass/copy_from_slice.rs index bb1853fb..5d4e8b4f 100644 --- a/checker/tests/run-pass/copy_from_slice.rs +++ b/checker/tests/run-pass/copy_from_slice.rs @@ -3,6 +3,7 @@ // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/deallocate.rs b/checker/tests/run-pass/deallocate.rs index ce6ca29b..d9f7c9a2 100644 --- a/checker/tests/run-pass/deallocate.rs +++ b/checker/tests/run-pass/deallocate.rs @@ -7,6 +7,7 @@ // A test that checks that deallocations are valid and that further uses of deallocated // pointers will lead to verification errors. +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/discriminant.rs b/checker/tests/run-pass/discriminant.rs index e98a526c..56c6b5a4 100644 --- a/checker/tests/run-pass/discriminant.rs +++ b/checker/tests/run-pass/discriminant.rs @@ -6,6 +6,7 @@ // A test that checks that std::intrinsics::discriminant_value is properly implemented. +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/maybe_unreachable.rs b/checker/tests/run-pass/maybe_unreachable.rs index f6ce455f..eb40b953 100644 --- a/checker/tests/run-pass/maybe_unreachable.rs +++ b/checker/tests/run-pass/maybe_unreachable.rs @@ -6,6 +6,7 @@ // A test that calls std::intrinsics::unreachable conditionally. +#![allow(internal_features)] #![feature(core_intrinsics)] #![allow(unused)] diff --git a/checker/tests/run-pass/offset.rs b/checker/tests/run-pass/offset.rs index 2f171e1b..253f5d33 100644 --- a/checker/tests/run-pass/offset.rs +++ b/checker/tests/run-pass/offset.rs @@ -5,6 +5,7 @@ // // A test that creates and checks pointer offsets +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/read_to_end.rs b/checker/tests/run-pass/read_to_end.rs index 6a233ea9..590a1c46 100644 --- a/checker/tests/run-pass/read_to_end.rs +++ b/checker/tests/run-pass/read_to_end.rs @@ -13,12 +13,9 @@ use std::io::{Cursor, Read, Result}; pub fn t1(buf: &[u8]) -> Result<()> { let mut reader = Cursor::new(buf); let mut v = Vec::with_capacity(1); + reader.read_to_end(&mut v)?; // todo: fix this - reader.read_to_end(&mut v)?; //~ slice index starts at after slice end - //~ related location - //~ related location - // todo: fix this - //verify!(v.len() == 0); // ~ possible false verification condition + //verify!(v.len() == 0); // ~ possible false verification condition Ok(()) } diff --git a/checker/tests/run-pass/slice_copy.rs b/checker/tests/run-pass/slice_copy.rs index a78c3d88..81e93639 100644 --- a/checker/tests/run-pass/slice_copy.rs +++ b/checker/tests/run-pass/slice_copy.rs @@ -6,6 +6,7 @@ // A test that invokes std::intrinsics::copy_nonoverlapping; +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/transmute.rs b/checker/tests/run-pass/transmute.rs index 72fb9ebf..77b78d86 100644 --- a/checker/tests/run-pass/transmute.rs +++ b/checker/tests/run-pass/transmute.rs @@ -6,6 +6,7 @@ // A test that uses std::mem::transmute +#![allow(internal_features)] #![feature(core_intrinsics)] use mirai_annotations::*; diff --git a/checker/tests/run-pass/unreachable.rs b/checker/tests/run-pass/unreachable.rs index 5d32bb68..37d313cd 100644 --- a/checker/tests/run-pass/unreachable.rs +++ b/checker/tests/run-pass/unreachable.rs @@ -6,6 +6,7 @@ // A test that calls std::intrinsics::unreachable unconditionally. +#![allow(internal_features)] #![feature(core_intrinsics)] #![allow(unused)] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 6c5f8742..3e104c55 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2023-11-28" +channel = "nightly-2023-12-07" components = ["clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview"] diff --git a/standard_contracts/src/lib.rs b/standard_contracts/src/lib.rs index f3f644ed..ebce0236 100644 --- a/standard_contracts/src/lib.rs +++ b/standard_contracts/src/lib.rs @@ -4,6 +4,7 @@ // LICENSE file in the root directory of this source tree. // +#![allow(internal_features)] #![feature(allocator_api)] #![feature(core_intrinsics)] #![feature(discriminant_kind)]