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

Nightly-2023-09-10 #1251

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified binaries/summary_store.tar
Binary file not shown.
8 changes: 8 additions & 0 deletions checker/src/abstract_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,14 @@ impl AbstractValueTrait for Rc<AbstractValue> {
return self.and(consequent);
}
if let Expression::Or { left: x, right: y } = &self.expression {
if alternate.as_bool_if_known().unwrap_or_default() {
if let Expression::LogicalNot { operand: x1 } = &x.expression {
if y.eq(&consequent) {
// [if (!x1 || y) { y } else { true } -> x1 || y
return x1.or(y.clone());
}
}
}
match &consequent.expression {
Expression::LogicalNot { operand } if x.eq(operand) => {
// [if x || y { !x } else { z }] -> [!x && y || !x && z] -> !x && (y || z)
Expand Down
8 changes: 4 additions & 4 deletions checker/tests/call_graph/fnptr_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ commit;
/* EXPECTED:CALL_SITES{
"files": [
"tests/call_graph/fnptr_fold.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/std/src/io/stdio.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/core/src/fmt/mod.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/core/src/slice/mod.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/core/src/ptr/metadata.rs"
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/std/src/io/stdio.rs",
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/core/src/fmt/mod.rs",
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/core/src/slice/mod.rs",
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/core/src/ptr/metadata.rs"
],
"callables": [
{
Expand Down
8 changes: 4 additions & 4 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/69e97df5ce571a777acd654ec3697ae8d25962ea/library/std/src/io/stdio.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/core/src/fmt/mod.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/core/src/slice/mod.rs",
"/rustc/69e97df5ce571a777acd654ec3697ae8d25962ea/library/core/src/ptr/metadata.rs"
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/std/src/io/stdio.rs",
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/core/src/fmt/mod.rs",
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/core/src/slice/mod.rs",
"/rustc/8ed4537d7c238eb77509d82445cf1cb861a3b5ff/library/core/src/ptr/metadata.rs"
],
"callables": [
{
Expand Down
7 changes: 5 additions & 2 deletions checker/tests/run-pass/read_to_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ 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
//verify!(v.len() == 0); // ~ possible false verification condition
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
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-08-27"
channel = "nightly-2023-09-10"
components = [ "clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview" ]
Loading