Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ungate try_from because it has been stabilized #2010

Merged
merged 16 commits into from
Apr 16, 2019
Merged
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ matrix:
allow_failures:
- rust: nightly
include:
- rust: nightly-2018-11-27
- rust: nightly-2019-02-26
name: "Compile tests"
script:
- (cd diesel_compile_tests && cargo +$TRAVIS_RUST_VERSION test)
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
- template: _build/install-rust.yml
parameters:
platform: Linux
rust_version: nightly-2018-11-27
rust_version: nightly-2019-02-26
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated nightly version to pass test. Is this acceptable? To say more, what's the policy of supported nightly version?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's fine. This is only the compile tests. We don't officially support nightly, we just bump this periodically as needed to be able to run the compile tests (which require nightly)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

- bash: |
sudo apt-get update &&
sudo apt-get -y install libsqlite3-dev libpq-dev libmysqlclient-dev
Expand Down
2 changes: 1 addition & 1 deletion diesel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
//! You can come ask for help at
//! [gitter.im/diesel-rs/diesel](https://gitter.im/diesel-rs/diesel)

#![cfg_attr(feature = "unstable", feature(specialization, try_from))]
#![cfg_attr(feature = "unstable", feature(specialization))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove the gating on the uses of this feature as well (grep try_from)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try_from has been stabilized (ungated) at nightly but it is still nightly only API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the FIXME comment to specify which Rust version we can use it?

// Built-in Lints
#![deny(
warnings,
Expand Down
2 changes: 1 addition & 1 deletion diesel/src/pg/types/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ mod bigdecimal {

impl FromSql<Numeric, Pg> for BigDecimal {
fn from_sql(numeric: Option<&[u8]>) -> deserialize::Result<Self> {
// FIXME: Use the TryFrom impl when try_from is stable
// FIXME: Use the TryFrom impl after Rust 1.34 get released.
weiznich marked this conversation as resolved.
Show resolved Hide resolved
let numeric = PgNumeric::from_sql(numeric)?;
pg_decimal_to_bigdecimal(&numeric)
}
Expand Down
2 changes: 1 addition & 1 deletion diesel_compile_tests/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2018-11-27
nightly-2019-02-26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That changes the output of our compile tests, which means you need to go though that errors and adjust them. (There is a script for that)