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

Deprecate Error::description for real #66919

Merged
merged 1 commit into from
Dec 26, 2019
Merged

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Dec 1, 2019

description has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it.

This PR:

  • adds #[rustc_deprecated(since = "1.41.0")] to Error::description;
  • moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait;
  • reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description;
  • removes the description function of all currently unstable Error impls in the standard library;
  • marks #[allow(deprecated)] the description function of all stable Error impls in the standard library;
  • replaces miscellaneous uses of description in example code and the compiler.

description

@dtolnay dtolnay added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 1, 2019
@dtolnay
Copy link
Member Author

dtolnay commented Dec 1, 2019

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Dec 1, 2019

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Dec 1, 2019
@SimonSapin
Copy link
Contributor

@nox Any thoughts on this? If I remember correctly you recently argued for defining description in a new impl Error for Foo in a library, despite soft-deprecation.

@nox
Copy link
Contributor

nox commented Dec 1, 2019

I don't care enough to argue about that stuff, but I certainly hope this won't land without a crater run, and without an adequate amount of certainty that this won't trigger an important amount of deprecation warnings.

All things said, I don't think this hard-deprecation is useful.

@Mark-Simulacrum
Copy link
Member

@bors try for a crater run

@bors
Copy link
Contributor

bors commented Dec 1, 2019

⌛ Trying commit b6194ab with merge bcff76b...

bors added a commit that referenced this pull request Dec 1, 2019
Deprecate Error::description for real

`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it.

This PR:

- adds `#[rustc_deprecated(since = "1.41.0")]` to `Error::description`;
- moves `description` (and `cause`, which is also deprecated) below the `source` and `backtrace` methods in the Error trait;
- reduces documentation of `description` and `cause` to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call `description`;
- removes the description function of all *currently unstable* Error impls in the standard library;
- marks `#[allow(deprecated)]` the description function of all *stable* Error impls in the standard library;
- replaces miscellaneous uses of `description` in example code and the compiler.

---

![description](https://user-images.githubusercontent.com/1940490/69910369-3bbaca80-13bf-11ea-94f7-2fe27a7ea333.png)
@bors
Copy link
Contributor

bors commented Dec 1, 2019

☀️ Try build successful - checks-azure
Build commit: bcff76b (bcff76bad586cfb6874f179a4b66448e6b8a832c)

@Mark-Simulacrum
Copy link
Member

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-66919 created and queued.
🤖 Automatically detected try build bcff76b
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🚧 Experiment pr-66919 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added the S-waiting-on-crater Status: Waiting on a crater run to be completed. label Dec 1, 2019
@dtolnay
Copy link
Member Author

dtolnay commented Dec 1, 2019

I don't care enough to argue about that stuff, but I certainly hope this won't land without a crater run, and without an adequate amount of certainty that this won't trigger an important amount of deprecation warnings.

All things said, I don't think this hard-deprecation is useful.

I am still seeing description functions pop up in my work codebase. New developers see it in the trait, and obviously errors need a description so they write one. The error idioms in Rust are confusing enough and we don't need to keep around this part of the confusion. As such, I'm set on either real-deprecating it or hiding it from rustdoc (#66859).

@craterbot
Copy link
Collaborator

🎉 Experiment pr-66919 is completed!
📊 50 regressed and 0 fixed (81904 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Dec 4, 2019
@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Dec 6, 2019
@rfcbot
Copy link

rfcbot commented Dec 6, 2019

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Dec 6, 2019
@Mark-Simulacrum
Copy link
Member

All regressions look genuine and the breakage scale is very low; it looks like we are in FCP already as well. I don't know if we want to wait for FCP to expire or not.

@dtolnay dtolnay added the relnotes Marks issues that should be documented in the release notes of the next release. label Dec 11, 2019
@dtolnay
Copy link
Member Author

dtolnay commented Dec 11, 2019

Rebased and amended with the fix that @goodmanjonathan suggested.

I think we can go ahead and get this reviewed and landed ahead of the full FCP window, though of course anyone is welcome to voice objections. This isn't a new API being stabilized so in the worst case we end up reverting the deprecation.

@KodrAus
Copy link
Contributor

KodrAus commented Dec 11, 2019

@bors r+

@@ -286,7 +286,7 @@ fn main() {
let (format, dst) = parse_args();
let result = syntax::with_default_globals(move || main_with_result(format, &dst));
if let Err(e) = result {
panic!("{}", e.description());
panic!("{}", e.to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

Just looking at this from TWIR, but couldn't this leave out the .to_string() to avoid double-allocation of the message?

Copy link
Contributor

Choose a reason for hiding this comment

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

If e impl Display, does it turn to

Suggested change
panic!("{}", e.to_string());
panic!("{}", e);

bors bot added a commit to nix-rust/nix that referenced this pull request Jan 10, 2020
1175: Remove deprecated Error::description r=asomers a=AnderEnder

`Error::description` has been documented as soft-deprecated since 1.27.0 (17 months ago). It is going to be hard-deprecated soon.

This PR:
- Removes all implementations of `description` in all error types

Related PR: rust-lang/rust#66919

Co-authored-by: Radyk Andrii <ander.ender@gmail.com>
@dtolnay dtolnay deleted the description branch January 18, 2020 23:39
@briansmith
Copy link
Contributor

description has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it.

If you want to maintain backward compatibility with anybody that relied on the output of description(), then you have to continue implementing it. For this reason, I'm planning to make this change to ring in the next major version bump, but not in the next minor release.

est31 added a commit to RustAudio/lewton that referenced this pull request Mar 6, 2020
Error descriptions are soft-deprecated
since 1.27.0, and hard-deprecated since
1.42.0.

Our MSRV is 1.36.0 so well above the
1.27.0 bound.

See also rust-lang/rust#66919
est31 added a commit to est31/glium that referenced this pull request Mar 6, 2020
Error descriptions are soft-deprecated
since 1.27.0, and hard-deprecated since
1.42.0.

See rust-lang/rust#66919
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 13, 2020
Version 1.42.0 (2020-03-12)
==========================

Language
--------
- [You can now use the slice pattern syntax with subslices.][67712] e.g.
  ```rust
  fn foo(words: &[&str]) {
      match words {
          ["Hello", "World", "!", ..] => println!("Hello World!"),
          ["Foo", "Bar", ..] => println!("Baz"),
          rest => println!("{:?}", rest),
      }
  }
  ```
- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
  that you can create an enum that has the exact layout and ABI of the type
  it contains.
- [There are some *syntax-only* changes:][67131]
   - `default` is syntactically allowed before items in `trait` definitions.
   - Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically
     leave out their bodies in favor of `;`.
   - Bounds on associated types in `impl`s are now syntactically allowed
     (e.g. `type Foo: Ord;`).
   - `...` (the C-variadic type) may occur syntactically directly as the type of
      any function parameter.

  These are still rejected *semantically*, so you will likely receive an error
  but these changes can be seen and parsed by procedural macros and
  conditional compilation.

Compiler
--------
- [Added tier 2* support for `armv7a-none-eabi`.][68253]
- [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339]
- [`Option::{expect,unwrap}` and
   `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages
   pointing to the location where they were called, rather than
   `core`'s internals. ][67887]

* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.

Libraries
---------
- [`iter::Empty<T>` now implements `Send` and `Sync` for any `T`.][68348]
- [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type
   to implement `Sized`.][67935]
- [`io::Cursor` now derives `PartialEq` and `Eq`.][67233]
- [`Layout::new` is now `const`.][66254]
- [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899]


Stabilized APIs
---------------
- [`CondVar::wait_while`]
- [`CondVar::wait_timeout_while`]
- [`DebugMap::key`]
- [`DebugMap::value`]
- [`ManuallyDrop::take`]
- [`matches!`]
- [`ptr::slice_from_raw_parts_mut`]
- [`ptr::slice_from_raw_parts`]

Cargo
-----
- [You no longer need to include `extern crate proc_macro;` to be able to
  `use proc_macro;` in the `2018` edition.][cargo/7700]

Compatibility Notes
-------------------
- [`Error::description` has been deprecated, and its use will now produce a
  warning.][66919] It's recommended to use `Display`/`to_string` instead.
- [`use $crate;` inside macros is now a hard error.][37390] The compiler
  emitted forward compatibility warnings since Rust 1.14.0.
- [As previously announced, this release reduces the level of support for
  32-bit Apple targets to tier 3.][apple-32bit-drop]. This means that the
  source code is still available to build, but the targets are no longer tested
  and no release binary is distributed by the Rust project. Please refer to the
  linked blog post for more information.

[37390]: rust-lang/rust#37390
[68253]: rust-lang/rust#68253
[68348]: rust-lang/rust#68348
[67935]: rust-lang/rust#67935
[68339]: rust-lang/rust#68339
[68122]: rust-lang/rust#68122
[67712]: rust-lang/rust#67712
[67887]: rust-lang/rust#67887
[67131]: rust-lang/rust#67131
[67233]: rust-lang/rust#67233
[66899]: rust-lang/rust#66899
[66919]: rust-lang/rust#66919
[66254]: rust-lang/rust#66254
[cargo/7700]: rust-lang/cargo#7700
[`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key
[`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value
[`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take
[`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html
[`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html
[`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html
[`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while
[`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while
est31 added a commit to est31/ggez that referenced this pull request Mar 17, 2020
Error descriptions are soft-deprecated
since 1.27.0, and hard-deprecated since
1.42.0.

MSRV is 1.36.0 so well above the
1.27.0 bound.

See also rust-lang/rust#66919
robyoung added a commit to robyoung/dicom-rs that referenced this pull request May 21, 2020
Error::description is fully deprecated now.
See: rust-lang/rust#66919
est31 added a commit to RustAudio/ogg that referenced this pull request Jun 30, 2020
Error descriptions are soft-deprecated
since 1.27.0, and hard-deprecated since
1.42.0.

See also rust-lang/rust#66919
shr-project added a commit to shr-project/meta-iotedge that referenced this pull request Jan 21, 2021
* when newer rust is used, iotedge-* fails with:

with 1.47.0 and 1.46.0 rust_2018_idioms, triggers unused_attributes warning
because rust_2018_idioms is for crate level only since:
rust-lang/rust#73300
which is then an error because warnings are denied as well:

| ''+v8+v8' is not a recognized feature for this target' is not a recognized feature for this target (ignoring feature)
|  (ignoring feature)
| '+v8' is not a recognized feature for this target' (ignoring feature)
| +v8' is not a recognized feature for this target (ignoring feature)
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/authentication.rs:3:9
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|   |
| note: the lint level is defined here
|  --> edgelet-http/src/authentication.rs:3:27
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |                           ^^^^^^^^
|   = note: `#[deny(unused_attributes)]` implied by `#[deny(warnings)]`
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/certificate_manager.rs:1:9
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|   |
| note: the lint level is defined here
|  --> edgelet-http/src/certificate_manager.rs:1:27
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |                           ^^^^^^^^
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/authentication.rs:3:9
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/certificate_manager.rs:1:9
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|
| ''+v8+v8' is not a recognized feature for this target' is not a recognized feature for this target (ignoring feature)
|  (ignoring feature)
| '+v8' is not a recognized feature for this target (ignoring feature)
| '+v8' is not a recognized feature for this target (ignoring feature)

with 1.43.0 it still fails due to use of deprecated description
(since 1.42.0 with rust-lang/rust#66919)

| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:248:54
|     |
| 248 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|     |
| note: the lint level is defined here
|    --> iotedge/src/lib.rs:3:27
|     |
| 3   | #![deny(rust_2018_idioms, warnings)]
|     |                           ^^^^^^^^
|     = note: `#[deny(deprecated)]` implied by `#[deny(warnings)]`
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:302:54
|     |
| 302 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:375:54
|     |
| 375 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:457:54
|     |
| 457 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^

  you can either work around it by allowing warnings (deprecated and unused_attributes):
  find ${WORKDIR}/iotedge-${PV} -name "*.rs" -exec sed -i 's/idioms, warnings)/idioms)/g' {} \;
  or fix it properly in next iotedge release, or just select older rust version
  which doesn't trigger fatal error for this with:

  RUST_VERSION = "1.41.0"
  PREFERRED_VERSION_rust-native ?= "${RUST_VERSION}"
  PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUST_VERSION}"
  PREFERRED_VERSION_rust-llvm-native ?= "${RUST_VERSION}"
  PREFERRED_VERSION_libstd-rs ?= "${RUST_VERSION}"
  PREFERRED_VERSION_cargo-native ?= "${RUST_VERSION}"

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
shr-project added a commit to shr-project/meta-iotedge that referenced this pull request Jan 21, 2021
* when newer rust is used, iotedge-* fails with:

with 1.47.0 and 1.46.0 rust_2018_idioms, triggers unused_attributes warning
because rust_2018_idioms is for crate level only since:
rust-lang/rust#73300
which is then an error because warnings are denied as well:

| ''+v8+v8' is not a recognized feature for this target' is not a recognized feature for this target (ignoring feature)
|  (ignoring feature)
| '+v8' is not a recognized feature for this target' (ignoring feature)
| +v8' is not a recognized feature for this target (ignoring feature)
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/authentication.rs:3:9
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|   |
| note: the lint level is defined here
|  --> edgelet-http/src/authentication.rs:3:27
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |                           ^^^^^^^^
|   = note: `#[deny(unused_attributes)]` implied by `#[deny(warnings)]`
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/certificate_manager.rs:1:9
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|   |
| note: the lint level is defined here
|  --> edgelet-http/src/certificate_manager.rs:1:27
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |                           ^^^^^^^^
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/authentication.rs:3:9
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/certificate_manager.rs:1:9
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|
| ''+v8+v8' is not a recognized feature for this target' is not a recognized feature for this target (ignoring feature)
|  (ignoring feature)
| '+v8' is not a recognized feature for this target (ignoring feature)
| '+v8' is not a recognized feature for this target (ignoring feature)

with 1.43.0 it still fails due to use of deprecated description
(since 1.42.0 with rust-lang/rust#66919)

| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:248:54
|     |
| 248 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|     |
| note: the lint level is defined here
|    --> iotedge/src/lib.rs:3:27
|     |
| 3   | #![deny(rust_2018_idioms, warnings)]
|     |                           ^^^^^^^^
|     = note: `#[deny(deprecated)]` implied by `#[deny(warnings)]`
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:302:54
|     |
| 302 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:375:54
|     |
| 375 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:457:54
|     |
| 457 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^

  you can either work around it by allowing warnings (deprecated and unused_attributes):
  find ${WORKDIR}/iotedge-${PV} -name "*.rs" -exec sed -i 's/idioms, warnings)/idioms)/g' {} \;
  or fix it properly in next iotedge release, or just select older rust version
  which doesn't trigger fatal error for this with:

  RUST_VERSION = "1.41.0"
  PREFERRED_VERSION_rust-native ?= "${RUST_VERSION}"
  PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUST_VERSION}"
  PREFERRED_VERSION_rust-llvm-native ?= "${RUST_VERSION}"
  PREFERRED_VERSION_libstd-rs ?= "${RUST_VERSION}"
  PREFERRED_VERSION_cargo-native ?= "${RUST_VERSION}"

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
shr-project added a commit to shr-project/meta-iotedge that referenced this pull request Jan 21, 2021
* when newer rust is used, iotedge-* fails with:

with 1.47.0 and 1.46.0 rust_2018_idioms, triggers unused_attributes warning
because rust_2018_idioms is for crate level only since:
rust-lang/rust#73300
which is then an error because warnings are denied as well:

| ''+v8+v8' is not a recognized feature for this target' is not a recognized feature for this target (ignoring feature)
|  (ignoring feature)
| '+v8' is not a recognized feature for this target' (ignoring feature)
| +v8' is not a recognized feature for this target (ignoring feature)
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/authentication.rs:3:9
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|   |
| note: the lint level is defined here
|  --> edgelet-http/src/authentication.rs:3:27
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |                           ^^^^^^^^
|   = note: `#[deny(unused_attributes)]` implied by `#[deny(warnings)]`
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/certificate_manager.rs:1:9
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|   |
| note: the lint level is defined here
|  --> edgelet-http/src/certificate_manager.rs:1:27
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |                           ^^^^^^^^
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/authentication.rs:3:9
|   |
| 3 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|
| error: deny(rust_2018_idioms) is ignored unless specified at crate level
|  --> edgelet-http/src/certificate_manager.rs:1:9
|   |
| 1 | #![deny(rust_2018_idioms, warnings)]
|   |         ^^^^^^^^^^^^^^^^
|
| ''+v8+v8' is not a recognized feature for this target' is not a recognized feature for this target (ignoring feature)
|  (ignoring feature)
| '+v8' is not a recognized feature for this target (ignoring feature)
| '+v8' is not a recognized feature for this target (ignoring feature)

with 1.43.0 it still fails due to use of deprecated description
(since 1.42.0 with rust-lang/rust#66919)

| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:248:54
|     |
| 248 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|     |
| note: the lint level is defined here
|    --> iotedge/src/lib.rs:3:27
|     |
| 3   | #![deny(rust_2018_idioms, warnings)]
|     |                           ^^^^^^^^
|     = note: `#[deny(deprecated)]` implied by `#[deny(warnings)]`
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:302:54
|     |
| 302 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:375:54
|     |
| 375 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^
|
| error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
|    --> iotedge/src/support_bundle.rs:457:54
|     |
| 457 |             let err_message = inspect.err().unwrap().description().to_owned();
|     |                                                      ^^^^^^^^^^^

  you can either work around it by allowing warnings (deprecated and unused_attributes):
  find ${WORKDIR}/iotedge-${PV} -name "*.rs" -exec sed -i 's/idioms, warnings)/idioms)/g' {} \;
  or fix it properly in next iotedge release, or just select older rust version
  which doesn't trigger fatal error for this with:

  RUST_VERSION = "1.41.0"
  PREFERRED_VERSION_rust-native ?= "${RUST_VERSION}"
  PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUST_VERSION}"
  PREFERRED_VERSION_rust-llvm-native ?= "${RUST_VERSION}"
  PREFERRED_VERSION_libstd-rs ?= "${RUST_VERSION}"
  PREFERRED_VERSION_cargo-native ?= "${RUST_VERSION}"

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.