diff --git a/README.md b/README.md index 644fe8aa..40a06537 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,13 @@ repository and compiled from source or installed from of the nightly toolchain is supported at any given time. -It's recommended to use `nightly-2022-07-20` toolchain. -You can install it by using `rustup install nightly-2022-07-20` if you already have rustup. +It's recommended to use `nightly-2022-08-03` toolchain. +You can install it by using `rustup install nightly-2022-08-03` if you already have rustup. Then you can do: ```sh -$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-07-20 -$ cargo +nightly-2022-07-20 install --git https://github.com/rust-lang/rust-semverver +$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-08-03 +$ cargo +nightly-2022-08-03 install --git https://github.com/rust-lang/rust-semverver ``` You'd also need `cmake` for some dependencies, and a few common libraries (if you hit @@ -122,7 +122,7 @@ carried out correctly with regards to the current version of your crate on crate ```sh # install a current version of rust-semverver -cargo +nightly-2022-07-20 install --git https://github.com/rust-lang/rust-semverver +cargo +nightly-2022-08-03 install --git https://github.com/rust-lang/rust-semverver # fetch the version in the manifest of your crate (adapt this to your usecase if needed) eval "current_version=$(grep -e '^version = .*$' Cargo.toml | cut -d ' ' -f 3)" # run the semver checks and output them for convenience diff --git a/rust-toolchain b/rust-toolchain index c4d6894d..53630b95 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ # NOTE: Keep in sync with nightly date on README [toolchain] -channel = "nightly-2022-07-20" +channel = "nightly-2022-08-03" components = ["llvm-tools-preview", "rustc-dev"] diff --git a/src/traverse.rs b/src/traverse.rs index 4d5f8fb7..496db4fa 100644 --- a/src/traverse.rs +++ b/src/traverse.rs @@ -389,8 +389,8 @@ fn diff_method<'tcx>(changes: &mut ChangeSet, tcx: TyCtxt<'tcx>, old: AssocItem, ); } - let old_pub = old.vis == Public; - let new_pub = new.vis == Public; + let old_pub = old.visibility(tcx) == Public; + let new_pub = new.visibility(tcx) == Public; if old_pub && !new_pub { changes.add_change(ChangeType::ItemMadePrivate, old.def_id, None); @@ -655,14 +655,14 @@ fn diff_traits<'tcx>( } (Some(old_item), None) => { let change_type = ChangeType::TraitItemRemoved { - defaulted: old_item.defaultness.has_value(), + defaulted: old_item.defaultness(tcx).has_value(), }; changes.add_change(change_type, old, Some(tcx.def_span(old_item.def_id))); id_mapping.add_non_mapped(old_item.def_id); } (None, Some(new_item)) => { let change_type = ChangeType::TraitItemAdded { - defaulted: new_item.defaultness.has_value(), + defaulted: new_item.defaultness(tcx).has_value(), sealed_trait: old_sealed, }; changes.add_change(change_type, old, Some(tcx.def_span(new_item.def_id))); @@ -1061,7 +1061,7 @@ fn diff_inherent_impls<'tcx>( orig_item.name, item_span, item_span, - parent_output && orig_assoc_item.vis == Public, + parent_output && orig_assoc_item.visibility(tcx) == Public, ); // ... determine the set of target impls that serve as candidates @@ -1082,7 +1082,7 @@ fn diff_inherent_impls<'tcx>( .any(|&(target_impl_def_id, target_item_def_id)| { let target_assoc_item = tcx.associated_item(target_item_def_id); - if parent_output && target_assoc_item.vis == Public { + if parent_output && target_assoc_item.visibility(tcx) == Public { changes.set_output(orig_item.parent_def_id); }