Skip to content

Commit 3e0183e

Browse files
authored
Release 0.20.0 (#1203)
Following as much from [c2rust/wiki/Release-Process](https://github.com/immunant/c2rust/wiki/Release-Process) as still works/applies, plus some extra additions, I ... * [ ] `cargo outdated -R`: doesn't work due to unknown print request `split-debuginfo` * [ ] `cargo update`: doesn't work because of old nightly * [ ] `cargo clippy`: * [x] `cargo clippy --fix` * [x] Other trivial `cargo clippy` fixes * [x] `cargo fmt --check` * [x] Updated versions from `0.19.0` to `0.20.0`. * [x] Specified missing versions for relative dependencies. * [x] `cargo build` * [x] `cargo +stable build -p c2rust` * [x] Set `publish = false` in crates that are unstable due to `#![feature(rustc_private)]`. Then I will publish the crates in this order with `cargo +stable -p $package`: * `c2rust-asm-casts` * `c2rust-ast-builder` * `c2rust-ast-printer` * `c2rust-build-paths` * `c2rust-ast-exporter` * `c2rust-bitfields-derive` * `c2rust-bitfields` * `c2rust-transpile` * `c2rust` or if this works, then I'll use this: ``` cargo +nightly publish --workspace --dry-run -Z package-workspace --exclude c2rust-analysis-rt --exclude c2rust-instrument --exclude c2rust-pdg --exclude c2rust-analyze ``` I need to use `cargo +stable` for this because the pinned nightly does not correctly resolve the `Cargo.lock` for a workspace, and thus tries to incompatibly update it.
2 parents 1b80823 + 0f47a86 commit 3e0183e

File tree

34 files changed

+82
-82
lines changed

34 files changed

+82
-82
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.19.0"
27+
version = "0.20.0"
2828
authors = ["The C2Rust Project Developers <[email protected]>"]
2929
edition = "2021"
3030
rust-version = "1.65"

analysis/runtime/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ repository.workspace = true
1010
license.workspace = true
1111
keywords.workspace = true
1212
categories.workspace = true
13+
publish = false
1314

1415
[dependencies]
1516
serde = { version = "1.0", features = ["derive"] }

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.19.0" }
8+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.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.19.0" }
8+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.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.19.0" }
9+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.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.19.0" }
10+
c2rust-analysis-rt = { path = "../../runtime", optional = true, version = "0.20.0" }
1111

1212
[features]
1313
miri = []

c2rust-analyze/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ repository.workspace = true
1010
license.workspace = true
1111
keywords.workspace = true
1212
categories.workspace = true
13+
publish = false
1314

1415
[dependencies]
1516
polonius-engine = "0.13.0"
1617
rustc-hash = "1.1.0"
1718
bitflags = "1.3.2"
18-
c2rust-pdg = { path = "../pdg" }
19+
c2rust-pdg = { path = "../pdg", version = "0.20.0"}
1920
bincode = "1.0"
2021
serde = "1.0"
2122
assert_matches = "1.5.0"
@@ -32,11 +33,11 @@ toml_edit = "0.19.8"
3233
sha2 = "0.10.8"
3334

3435
[build-dependencies]
35-
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.19.0" }
36+
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.20.0" }
3637
print_bytes = "1.1"
3738

3839
[dev-dependencies]
39-
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.19.0" }
40+
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.20.0" }
4041
clap = { version = "4.1.9", features = ["derive"] }
4142
shlex = "1.3.0"
4243

c2rust-analyze/src/analyze.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ fn parse_def_id(s: &str) -> Result<DefId, String> {
426426
};
427427

428428
let rendered = format!("{:?}", def_id);
429-
if &rendered != orig_s {
429+
if rendered != orig_s {
430430
return Err(format!(
431431
"path mismatch: after parsing input {}, obtained a different path {:?}",
432432
orig_s, def_id
@@ -915,7 +915,7 @@ fn run(tcx: TyCtxt) {
915915
borrowck::borrowck_mir(
916916
&acx,
917917
&info.dataflow,
918-
&mut asn.perms_mut(),
918+
asn.perms_mut(),
919919
&updates_forbidden,
920920
name.as_str(),
921921
&mir,
@@ -964,7 +964,7 @@ fn run(tcx: TyCtxt) {
964964
loop_count, num_changed
965965
);
966966

967-
if &asn.perms.as_slice()[..gacx.num_global_pointers()] == &old_gasn {
967+
if asn.perms.as_slice()[..gacx.num_global_pointers()] == old_gasn {
968968
break;
969969
}
970970
}
@@ -1117,13 +1117,13 @@ fn run(tcx: TyCtxt) {
11171117
continue;
11181118
}
11191119
ann.emit(span, format_args!("typeof({:?}) = {}", local, ty_str));
1120-
if static_non_null_ptrs.len() > 0 {
1120+
if !static_non_null_ptrs.is_empty() {
11211121
ann.emit(
11221122
span,
11231123
format_args!(" static NON_NULL: {:?}", static_non_null_ptrs),
11241124
);
11251125
}
1126-
if dynamic_non_null_ptrs.len() > 0 {
1126+
if !dynamic_non_null_ptrs.is_empty() {
11271127
ann.emit(
11281128
span,
11291129
format_args!(" dynamic NON_NULL: {:?}", dynamic_non_null_ptrs),

c2rust-analyze/src/borrowck/type_check.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,17 @@ impl<'tcx> TypeChecker<'tcx, '_> {
126126
{
127127
let field_lifetime_param = OriginParam::try_from(field_lifetime_arg).ok();
128128

129-
field_lifetime_param.and_then(|field_lifetime_param| {
129+
if let Some((base_lifetime_param, og)) = field_lifetime_param.and_then(|field_lifetime_param| {
130130
base_origin_param_map.get_key_value(&field_lifetime_param)
131-
}).map(|(base_lifetime_param, og)| {
131+
}) {
132132
debug!(
133133
"mapping {base_adt_def:?} lifetime parameter {base_lifetime_param:?} to \
134134
{base_adt_def:?}.{:} struct definition lifetime parameter {field_struct_lifetime_param:?}, \
135135
corresponding to its lifetime parameter {field_lifetime_param:?} within {base_adt_def:?}",
136136
field_def.name
137137
);
138-
field_origin_param_map.push((*field_struct_lifetime_param, *og));
139-
});
138+
field_origin_param_map.push((*field_struct_lifetime_param, *og));
139+
}
140140
}
141141

142142
let origin_params= self.ltcx.arena().alloc_from_iter(field_origin_param_map.into_iter());

0 commit comments

Comments
 (0)