Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Housekeeping #136

Merged
merged 5 commits into from
Nov 7, 2020
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
18 changes: 1 addition & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "semverver"
description = "Automatic verification of SemVer adhrence in rust library crates"
description = "Automatic verification of SemVer adherence in Rust library crates"
repository = "https://github.com/rust-dev-tools/rust-semverver"
readme = "README.md"
keywords = ["semver", "plugin"]
Expand All @@ -10,22 +10,6 @@ authors = ["Inokentiy Babushkin <[email protected]>"]
license-file = "LICENSE"
edition = "2018"

[badges]
travis-ci = { repository = "rust-dev-tools/rust-semverver" }
appveyor = { repository = "rust-dev-tools/rust-semverver" }

[[bin]]
name = "cargo-semver"
path = "src/bin/cargo_semver.rs"

[[bin]]
name = "rust-semverver"
path = "src/bin/rust_semverver.rs"

[[bin]]
name = "rust-semver-public"
path = "src/bin/rust_semver_public.rs"

[dependencies]
cargo = "0.44"
crates-io = "0.32"
Expand Down
5 changes: 1 addition & 4 deletions src/bin/cargo_semver.rs → src/bin/cargo-semver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
#![feature(set_stdio)]
#![allow(clippy::too_many_lines)]

extern crate curl;
#[macro_use]
extern crate serde;
extern crate rustc_session;
extern crate serde_json;

use cargo::core::{Package, PackageId, Source, SourceId, Workspace};
use cargo::sources::RegistrySource;
use curl::easy::Easy;
use log::debug;
use rand::Rng;
use rustc_session::getopts;
use serde::Deserialize;
use std::collections::HashSet;
use std::{
env,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate rustc_driver;
extern crate rustc_interface;
extern crate rustc_middle;
extern crate rustc_span;

use log::debug;
Expand Down
3 changes: 0 additions & 3 deletions src/bin/rust_semverver.rs → src/bin/rust-semverver.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#![feature(rustc_private)]

extern crate rustc_driver;
extern crate rustc_errors;
extern crate rustc_interface;
extern crate rustc_metadata;
extern crate rustc_middle;
extern crate rustc_span;

use log::debug;
Expand Down
1 change: 0 additions & 1 deletion src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,6 @@ impl<'a, 'tcx> Serialize for RChangeSet<'a, 'tcx> {
#[cfg(test)]
pub mod tests {
pub use super::*;
extern crate quickcheck;
use quickcheck::*;

use rustc_hir::def_id::DefId;
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
#![allow(clippy::single_match_else)]
#![allow(clippy::too_many_lines)]
#![deny(warnings)]
extern crate rustc_ast;

extern crate rustc_hir;
extern crate rustc_infer;
extern crate rustc_middle;
extern crate rustc_mir;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_trait_selection;
extern crate rustc_traits;

mod changes;
mod mapping;
Expand Down
4 changes: 2 additions & 2 deletions src/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub type InherentImplSet = BTreeSet<(DefId, DefId)>;
/// Definitions and simple `DefId` mappings are kept separate to record both kinds of
/// correspondence losslessly. The *access* to the stored data happens through the same API,
/// however. A reverse mapping is also included, but only for `DefId` lookup.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::module_name_repetitions))]
#[allow(clippy::module_name_repetitions)]
pub struct IdMapping {
/// The old crate.
old_crate: CrateNum,
Expand Down Expand Up @@ -337,7 +337,7 @@ type OptionalExport = Option<Export<HirId>>;
///
/// Both old and new exports can be missing. Allows for reuse of the `HashMap`s used for storage.
#[derive(Default)]
#[cfg_attr(feature = "cargo-clippy", allow(clippy::module_name_repetitions))]
#[allow(clippy::module_name_repetitions)]
pub struct NameMapping {
/// The exports in the type namespace.
type_map: HashMap<Symbol, (OptionalExport, OptionalExport)>,
Expand Down
2 changes: 1 addition & 1 deletion src/mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::collections::{HashMap, HashSet, VecDeque};
/// Keeps track of item pairs found that way that correspond to item matchings not yet known.
/// This allows to match up some items that aren't exported, and which possibly even differ in
/// their names across versions.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::module_name_repetitions))]
#[allow(clippy::module_name_repetitions)]
pub struct MismatchRelation<'a, 'tcx> {
/// The type context used.
tcx: TyCtxt<'tcx>,
Expand Down
2 changes: 1 addition & 1 deletion src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn run_traversal(tcx: TyCtxt, new: DefId) {
/// Traverse the two root modules in an interleaved manner, matching up pairs of modules
/// from the two crate versions and compare for changes. Matching children get processed
/// in the same fashion.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::cognitive_complexity))]
#[allow(clippy::cognitive_complexity)]
fn diff_structure<'tcx>(
changes: &mut ChangeSet,
id_mapping: &mut IdMapping,
Expand Down