Skip to content

Commit 93471e6

Browse files
authored
Prepare for 0.21.0 release (#1402)
This follows the applicable pre-release steps from https://github.com/immunant/c2rust/wiki/Release-Process. Much of those don't apply due to our outdated nightly. I also fixed the backwards compatible `cargo +stable clippy` warnings, too.
2 parents b0efa55 + 26e6117 commit 93471e6

File tree

32 files changed

+108
-126
lines changed

32 files changed

+108
-126
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exclude = [
2424
]
2525

2626
[workspace.package]
27-
version = "0.20.0"
27+
version = "0.21.0"
2828
authors = ["The C2Rust Project Developers <[email protected]>"]
2929
edition = "2021"
3030
rust-version = "1.65"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The manual is still a work-in-progress, so if you can't find something please le
4444
### Prerequisites
4545

4646
C2Rust requires LLVM 7 or later with its corresponding clang compiler and libraries.
47-
Python 3.6 or later, CMake 3.4.3 or later, and openssl (1.0) are also required. These prerequisites may be installed with the following commands, depending on your platform:
47+
Python 3.6 or later, CMake 3.5 or later, and openssl (1.0) are also required. These prerequisites may be installed with the following commands, depending on your platform:
4848

4949
- **Ubuntu 18.04, Debian 10, and later:**
5050

analysis/tests/lighttpd-minimal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
libc = "0.2"
8-
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.0" }
8+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.21.0" }
99

1010
[features]
1111
miri = []

analysis/tests/lighttpd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
libc = "0.2"
8-
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.0" }
8+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.21.0" }
99

1010
[features]
1111
miri = []

analysis/tests/minimal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66

77
[dependencies]
88
libc = "0.2"
9-
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.0" }
9+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.21.0" }
1010

1111
[features]
1212
miri = []

analysis/tests/misc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
libc = "0.2"
10-
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.0" }
10+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.21.0" }
1111

1212
[features]
1313
miri = []

c2rust-analyze/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish = false
1616
polonius-engine = "0.13.0"
1717
rustc-hash = "1.1.0"
1818
bitflags = "1.3.2"
19-
c2rust-pdg = { path = "../pdg", version = "0.20.0"}
19+
c2rust-pdg = { path = "../pdg", version = "0.21.0"}
2020
bincode = "1.0"
2121
serde = "1.0"
2222
assert_matches = "1.5.0"
@@ -33,11 +33,11 @@ toml_edit = "0.19.8"
3333
sha2 = "0.10.8"
3434

3535
[build-dependencies]
36-
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.20.0" }
36+
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.21.0" }
3737
print_bytes = "1.1"
3838

3939
[dev-dependencies]
40-
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.20.0" }
40+
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.21.0" }
4141
clap = { version = "4.1.9", features = ["derive"] }
4242
shlex = "1.3.0"
4343

c2rust-analyze/src/analyze.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ fn run(tcx: TyCtxt) {
11791179
}
11801180
}
11811181

1182+
#[allow(clippy::too_many_arguments)]
11821183
fn run2<'tcx>(
11831184
pointwise_fn_ldid: Option<LocalDefId>,
11841185
tcx: TyCtxt<'tcx>,

c2rust-analyze/src/borrowck/mod.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -244,19 +244,16 @@ fn run_polonius<'tcx>(
244244
for constraint in tcx.predicates_of(mir.source.def_id()).predicates {
245245
// FIXME: there should be a subset relation generated for function arguments
246246
// such as `arg: &'a &'b &'c`, i.e. 'c: 'b, 'b: 'a, and 'c: 'a
247-
match &constraint.0.kind().skip_binder() {
248-
PredicateKind::RegionOutlives(OutlivesPredicate(a, b)) => match (a.kind(), b.kind()) {
249-
(ReEarlyBound(eba), ReEarlyBound(ebb)) => {
250-
match (origin_map.get(&eba.def_id), origin_map.get(&ebb.def_id)) {
251-
(Some(origin_a), Some(origin_b)) => {
252-
facts.known_placeholder_subset.push((*origin_a, *origin_b));
253-
}
254-
_ => (),
255-
}
247+
if let PredicateKind::RegionOutlives(OutlivesPredicate(a, b)) =
248+
&constraint.0.kind().skip_binder()
249+
{
250+
if let (ReEarlyBound(eba), ReEarlyBound(ebb)) = (a.kind(), b.kind()) {
251+
if let (Some(origin_a), Some(origin_b)) =
252+
(origin_map.get(&eba.def_id), origin_map.get(&ebb.def_id))
253+
{
254+
facts.known_placeholder_subset.push((*origin_a, *origin_b));
256255
}
257-
_ => (),
258-
},
259-
_ => (),
256+
}
260257
}
261258
}
262259

0 commit comments

Comments
 (0)