Skip to content

Commit 765b782

Browse files
authored
Merge pull request diesel-rs#1789 from diesel-rs/sg-bump-nightly
Update to nightly-2018-07-17
2 parents 68d0b9e + 55e3894 commit 765b782

67 files changed

Lines changed: 358 additions & 438 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ matrix:
3838
allow_failures:
3939
- rust: nightly
4040
include:
41-
- rust: nightly-2018-04-19
41+
- rust: nightly-2018-07-17
4242
env: CLIPPY_AND_COMPILE_TESTS=YESPLEASE
4343
script:
44-
- (cd diesel && cargo rustc --no-default-features --features "lint sqlite postgres mysql extras" -- -Zno-trans)
45-
- (cd diesel_cli && cargo rustc --no-default-features --features "lint sqlite postgres mysql" -- -Zno-trans)
46-
- (cd diesel_derives && cargo rustc --no-default-features --features "lint" -- -Zno-trans)
47-
- (cd diesel_migrations && cargo rustc --no-default-features --features "lint dotenv sqlite postgres mysql" -- -Zno-trans)
44+
- rustup component add clippy-preview
45+
- cargo clippy
4846
- (cd diesel_compile_tests && travis-cargo test)
4947
- rust: 1.26.1
5048
env: RUSTFMT=YESPLEASE

bin/check

Lines changed: 0 additions & 24 deletions
This file was deleted.

bin/test

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
CLIPPY="lint"
5-
64
if [ "$1" = "integration" ]; then
75
if [ "$2" ]; then
86
BACKEND="$2"
@@ -14,32 +12,32 @@ if [ "$1" = "integration" ]; then
1412
if [ "$BACKEND" = "mysql" ]; then
1513
export RUST_TEST_THREADS=1
1614
fi
17-
(cd diesel_tests && cargo test --features "$CLIPPY $BACKEND" --no-default-features $*)
15+
(cd diesel_tests && cargo test --features "$BACKEND" --no-default-features $*)
1816
elif [ "$1" = "compile" ]; then
1917
shift
2018
(cd diesel_compile_tests && cargo test $*)
2119
else
22-
(cd diesel && cargo test --no-default-features --features "$CLIPPY extras sqlite postgres mysql" $*)
20+
(cd diesel && cargo test --no-default-features --features "extras sqlite postgres mysql" $*)
2321

24-
(cd diesel_cli && cargo test --features "$CLIPPY sqlite" --no-default-features $*)
25-
(cd diesel_migrations && cargo test --features "$CLIPPY sqlite" $*)
26-
(cd diesel_derives && cargo test --features "$CLIPPY diesel/sqlite" $*)
27-
(cd diesel_tests && cargo test --features "$CLIPPY sqlite" --no-default-features $*)
22+
(cd diesel_cli && cargo test --features "sqlite" --no-default-features $*)
23+
(cd diesel_migrations && cargo test --features "sqlite" $*)
24+
(cd diesel_derives && cargo test --features "diesel/sqlite" $*)
25+
(cd diesel_tests && cargo test --features "sqlite" --no-default-features $*)
2826

29-
(cd diesel_migrations && cargo test --features "$CLIPPY postgres" $*)
30-
(cd diesel_derives && cargo test --features "$CLIPPY diesel/postgres" $*)
31-
(cd diesel_cli && cargo test --features "$CLIPPY postgres" --no-default-features $*)
32-
(cd diesel_tests && cargo test --features "$CLIPPY postgres" --no-default-features $*)
27+
(cd diesel_migrations && cargo test --features "postgres" $*)
28+
(cd diesel_derives && cargo test --features "diesel/postgres" $*)
29+
(cd diesel_cli && cargo test --features "postgres" --no-default-features $*)
30+
(cd diesel_tests && cargo test --features "postgres" --no-default-features $*)
3331

3432
export RUST_TEST_THREADS=1
35-
(cd diesel_migrations && cargo test --features "$CLIPPY mysql" $*)
36-
(cd diesel_derives && cargo test --features "$CLIPPY diesel/mysql" $*)
37-
(cd diesel_cli && cargo test --features "$CLIPPY mysql" --no-default-features $*)
38-
(cd diesel_tests && cargo test --features "$CLIPPY mysql" --no-default-features $*)
33+
(cd diesel_migrations && cargo test --features "mysql" $*)
34+
(cd diesel_derives && cargo test --features "diesel/mysql" $*)
35+
(cd diesel_cli && cargo test --features "mysql" --no-default-features $*)
36+
(cd diesel_tests && cargo test --features "mysql" --no-default-features $*)
3937
unset RUST_TEST_THREADS
4038

4139
(cd diesel_compile_tests && cargo test $*)
42-
(cd diesel_migrations/migrations_internals && cargo test --features "$CLIPPY" $*)
43-
(cd diesel_migrations/migrations_macros && cargo test --features "$CLIPPY" $*)
40+
(cd diesel_migrations/migrations_internals && cargo test $*)
41+
(cd diesel_migrations/migrations_macros && cargo test $*)
4442
(cd examples && ./test_all $*)
4543
fi;

diesel/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ categories = ["database"]
1515
byteorder = "1.0"
1616
diesel_derives = "~1.3.0"
1717
chrono = { version = "0.4", optional = true }
18-
clippy = { optional = true, version = "=0.0.195" }
1918
libc = { version = "0.2.0", optional = true }
2019
libsqlite3-sys = { version = ">=0.8.0, <0.10.0", optional = true, features = ["min_sqlite_version_3_7_16"] }
2120
mysqlclient-sys = { version = ">=0.1.0, <0.3.0", optional = true }
@@ -43,7 +42,6 @@ tempdir = "^0.3.4"
4342
default = ["with-deprecated", "32-column-tables"]
4443
extras = ["chrono", "serde_json", "uuid", "deprecated-time", "network-address", "numeric", "r2d2"]
4544
unstable = ["diesel_derives/nightly"]
46-
lint = ["clippy"]
4745
large-tables = ["32-column-tables"]
4846
huge-tables = ["64-column-tables"]
4947
x32-column-tables = ["32-column-tables"]

diesel/src/connection/statement_cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub struct StatementCache<DB: Backend, Statement> {
108108
pub cache: RefCell<HashMap<StatementCacheKey<DB>, Statement>>,
109109
}
110110

111-
#[cfg_attr(feature = "clippy", allow(len_without_is_empty, new_without_default_derive))]
111+
#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty, new_without_default_derive))]
112112
impl<DB, Statement> StatementCache<DB, Statement>
113113
where
114114
DB: Backend,
@@ -250,7 +250,7 @@ where
250250
Ok(x) => x,
251251
Err(e) => {
252252
error = Some(e);
253-
#[cfg_attr(feature = "clippy", allow(invalid_ref))]
253+
#[cfg_attr(feature = "cargo-clippy", allow(invalid_ref))]
254254
unsafe {
255255
mem::uninitialized()
256256
}

diesel/src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,32 +130,29 @@
130130
// Built-in Lints
131131
#![deny(warnings, missing_debug_implementations, missing_copy_implementations, missing_docs)]
132132
// Clippy lints
133-
#![cfg_attr(feature = "clippy", allow(unstable_features))]
134-
#![cfg_attr(feature = "clippy", feature(plugin))]
135-
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
136133
#![cfg_attr(
137-
feature = "clippy",
134+
feature = "cargo-clippy",
138135
allow(
139136
option_map_unwrap_or_else, option_map_unwrap_or, match_same_arms, type_complexity,
140137
redundant_field_names
141138
)
142139
)]
143140
#![cfg_attr(
144-
feature = "clippy",
141+
feature = "cargo-clippy",
145142
warn(
146143
option_unwrap_used, result_unwrap_used, print_stdout, wrong_pub_self_convention, mut_mut,
147144
non_ascii_literal, similar_names, unicode_not_nfc, enum_glob_use, if_not_else,
148145
items_after_statements, used_underscore_binding
149146
)
150147
)]
151-
#![cfg_attr(all(test, feature = "clippy"), allow(option_unwrap_used, result_unwrap_used))]
148+
#![cfg_attr(all(test, feature = "cargo-clippy"), allow(option_unwrap_used, result_unwrap_used))]
152149

153150
#[cfg(feature = "postgres")]
154151
#[macro_use]
155152
extern crate bitflags;
156153
extern crate byteorder;
157-
// This is required to make `diesel_derives` re-export, but clippy thinks its unused
158-
#[cfg_attr(feature = "clippy", allow(useless_attribute))]
154+
// This is required to make `diesel_derives` re-export, but cargo-clippy thinks its unused
155+
#[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))]
159156
#[allow(unused_imports)]
160157
#[macro_use]
161158
extern crate diesel_derives;

diesel/src/migration/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl From<io::Error> for MigrationError {
7979

8080
/// Errors that occur while running migrations
8181
#[derive(Debug, PartialEq)]
82-
#[cfg_attr(feature = "clippy", allow(enum_variant_names))]
82+
#[cfg_attr(feature = "cargo-clippy", allow(enum_variant_names))]
8383
pub enum RunMigrationsError {
8484
/// A general migration error occured
8585
MigrationError(MigrationError),

diesel/src/mysql/connection/stmt/iterator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct StatementIterator<'a> {
1111
output_binds: Binds,
1212
}
1313

14-
#[cfg_attr(feature = "clippy", allow(should_implement_trait))] // don't neet `Iterator` here
14+
#[cfg_attr(feature = "cargo-clippy", allow(should_implement_trait))] // don't neet `Iterator` here
1515
impl<'a> StatementIterator<'a> {
1616
pub fn new(stmt: &'a mut Statement, types: Vec<(MysqlType, IsSigned)>) -> QueryResult<Self> {
1717
let mut output_binds = Binds::from_output_types(types);
@@ -70,7 +70,7 @@ pub struct NamedStatementIterator<'a> {
7070
metadata: StatementMetadata,
7171
}
7272

73-
#[cfg_attr(feature = "clippy", allow(should_implement_trait))] // don't need `Iterator` here
73+
#[cfg_attr(feature = "cargo-clippy", allow(should_implement_trait))] // don't need `Iterator` here
7474
impl<'a> NamedStatementIterator<'a> {
7575
pub fn new(stmt: &'a mut Statement) -> QueryResult<Self> {
7676
let metadata = stmt.metadata()?;

diesel/src/mysql/types/date_and_time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ macro_rules! mysql_time_impls {
2626

2727
impl FromSql<$ty, Mysql> for ffi::MYSQL_TIME {
2828
// ptr::copy_nonoverlapping does not require aligned pointers
29-
#[cfg_attr(feature = "clippy", allow(cast_ptr_alignment))]
29+
#[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
3030
fn from_sql(bytes: Option<&[u8]>) -> deserialize::Result<Self> {
3131
let bytes = not_none!(bytes);
3232
let bytes_ptr = bytes.as_ptr() as *const ffi::MYSQL_TIME;

diesel/src/pg/connection/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl PgConnection {
136136
TransactionBuilder::new(self)
137137
}
138138

139-
#[cfg_attr(feature = "clippy", allow(type_complexity))]
139+
#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
140140
fn prepare_query<T: QueryFragment<Pg> + QueryId>(
141141
&self,
142142
source: &T,

0 commit comments

Comments
 (0)