From 3ef8d2d6075bcac4975b271684ebc6e67c20c83e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 21 Mar 2023 16:44:06 +0100 Subject: [PATCH] Update tests for rustc_doc_primitive --- .../impls/local_for_local_primitive.rs | 4 ++-- tests/rustdoc-json/primitives/local_primitive.rs | 2 +- tests/rustdoc-json/primitives/primitive_impls.rs | 2 +- .../primitives/primitive_overloading.rs | 4 ++-- tests/rustdoc-json/primitives/use_primitive.rs | 4 ++-- tests/rustdoc-ui/coverage/exotic.rs | 3 ++- tests/rustdoc/auto-impl-primitive.rs | 4 ++-- tests/rustdoc/auxiliary/issue-15318.rs | 3 ++- tests/rustdoc/auxiliary/primitive-doc.rs | 3 ++- tests/rustdoc/check-source-code-urls-to-def.rs | 4 ++-- tests/rustdoc/intra-doc/auxiliary/my-core.rs | 2 +- tests/rustdoc/intra-doc/no-doc-primitive.rs | 2 +- tests/rustdoc/intra-doc/prim-methods-local.rs | 2 +- tests/rustdoc/intra-doc/prim-self.rs | 2 +- tests/rustdoc/issue-15318-3.rs | 4 ++-- tests/rustdoc/issue-23511.rs | 2 +- .../doc-notable_trait-mut_t_is_not_an_iterator.rs | 4 ++-- .../doc-notable_trait-mut_t_is_not_ref_t.rs | 4 ++-- tests/rustdoc/primitive-reference.rs | 4 ++-- tests/rustdoc/primitive-slice-auto-trait.rs | 4 ++-- tests/rustdoc/primitive-tuple-auto-trait.rs | 4 ++-- tests/rustdoc/primitive-unit-auto-trait.rs | 4 ++-- tests/rustdoc/primitive/primitive-generic-impl.rs | 4 ++-- tests/rustdoc/primitive/primitive.rs | 6 +++--- tests/rustdoc/sidebar-all-page.rs | 4 ++-- tests/rustdoc/tab_title.rs | 3 ++- tests/rustdoc/titles.rs | 4 ++-- tests/ui/rustdoc/feature-gate-doc_primitive.rs | 6 ++---- .../ui/rustdoc/feature-gate-doc_primitive.stderr | 15 +++++++-------- 29 files changed, 57 insertions(+), 56 deletions(-) diff --git a/tests/rustdoc-json/impls/local_for_local_primitive.rs b/tests/rustdoc-json/impls/local_for_local_primitive.rs index 38e7e2658df..8383dcc0482 100644 --- a/tests/rustdoc-json/impls/local_for_local_primitive.rs +++ b/tests/rustdoc-json/impls/local_for_local_primitive.rs @@ -1,5 +1,5 @@ #![feature(no_core)] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![no_core] // @set Local = "$.index[*][?(@.name=='Local')].id" @@ -16,6 +16,6 @@ impl Local for bool {} // FIXME(#101695): Test bool's `impls` include "Local for bool" // @has "$.index[*][?(@.name=='bool')]" -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] /// Boolean docs mod prim_bool {} diff --git a/tests/rustdoc-json/primitives/local_primitive.rs b/tests/rustdoc-json/primitives/local_primitive.rs index f27e6a2adec..0cf479faf29 100644 --- a/tests/rustdoc-json/primitives/local_primitive.rs +++ b/tests/rustdoc-json/primitives/local_primitive.rs @@ -8,7 +8,7 @@ //! Link to [i32][prim@i32] [i64][prim@i64] -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] mod prim_i32 {} // @set local_i32 = "$.index[*][?(@.name=='i32')].id" diff --git a/tests/rustdoc-json/primitives/primitive_impls.rs b/tests/rustdoc-json/primitives/primitive_impls.rs index 1fc9374065f..85d179ee45f 100644 --- a/tests/rustdoc-json/primitives/primitive_impls.rs +++ b/tests/rustdoc-json/primitives/primitive_impls.rs @@ -25,7 +25,7 @@ pub trait Trait {} impl Trait for i32 {} /// i32 -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] mod prim_i32 {} // @set i32 = "$.index[*][?(@.docs=='i32')].id" diff --git a/tests/rustdoc-json/primitives/primitive_overloading.rs b/tests/rustdoc-json/primitives/primitive_overloading.rs index 56b35cd14c0..81e0acdc6e9 100644 --- a/tests/rustdoc-json/primitives/primitive_overloading.rs +++ b/tests/rustdoc-json/primitives/primitive_overloading.rs @@ -2,7 +2,7 @@ // Regression test for . -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![feature(no_core)] #![no_core] @@ -10,7 +10,7 @@ // @has "$.index[*][?(@.name=='usize')]" // @has "$.index[*][?(@.name=='prim')]" -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] /// This is the built-in type `usize`. mod prim { } diff --git a/tests/rustdoc-json/primitives/use_primitive.rs b/tests/rustdoc-json/primitives/use_primitive.rs index e2292737462..5180a804f07 100644 --- a/tests/rustdoc-json/primitives/use_primitive.rs +++ b/tests/rustdoc-json/primitives/use_primitive.rs @@ -1,8 +1,8 @@ // edition:2018 -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] mod usize {} // @set local_crate_id = "$.index[*][?(@.name=='use_primitive')].crate_id" diff --git a/tests/rustdoc-ui/coverage/exotic.rs b/tests/rustdoc-ui/coverage/exotic.rs index 72b70d6980b..f45405fbf5d 100644 --- a/tests/rustdoc-ui/coverage/exotic.rs +++ b/tests/rustdoc-ui/coverage/exotic.rs @@ -2,12 +2,13 @@ // check-pass #![feature(rustdoc_internals)] +#![feature(rustc_attrs)] //! the features only used in std also have entries in the table, so make sure those get pulled out //! properly as well /// woo, check it out, we can write our own primitive docs lol -#[doc(primitive="unit")] +#[rustc_doc_primitive = "unit"] mod prim_unit {} /// keywords? sure, pile them on diff --git a/tests/rustdoc/auto-impl-primitive.rs b/tests/rustdoc/auto-impl-primitive.rs index 172333d445d..a6db93dbc33 100644 --- a/tests/rustdoc/auto-impl-primitive.rs +++ b/tests/rustdoc/auto-impl-primitive.rs @@ -1,10 +1,10 @@ -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![crate_name = "foo"] pub use std::fs::File; // @has 'foo/primitive.i16.html' '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementation' -#[doc(primitive = "i16")] +#[rustc_doc_primitive = "i16"] /// I love poneys! mod prim {} diff --git a/tests/rustdoc/auxiliary/issue-15318.rs b/tests/rustdoc/auxiliary/issue-15318.rs index 695fa58ef1d..a2f426c6352 100644 --- a/tests/rustdoc/auxiliary/issue-15318.rs +++ b/tests/rustdoc/auxiliary/issue-15318.rs @@ -2,6 +2,7 @@ // compile-flags: -Cmetadata=aux #![crate_type = "rlib"] #![doc(html_root_url = "http://example.com/")] +#![feature(rustc_attrs)] #![feature(lang_items)] #![no_std] @@ -12,5 +13,5 @@ fn foo() {} fn bar(_: &core::panic::PanicInfo) -> ! { loop {} } /// dox -#[doc(primitive = "pointer")] +#[rustc_doc_primitive = "pointer"] pub mod ptr {} diff --git a/tests/rustdoc/auxiliary/primitive-doc.rs b/tests/rustdoc/auxiliary/primitive-doc.rs index e8da852a57e..d1785e42391 100644 --- a/tests/rustdoc/auxiliary/primitive-doc.rs +++ b/tests/rustdoc/auxiliary/primitive-doc.rs @@ -1,9 +1,10 @@ // compile-flags: --crate-type lib --edition 2018 +#![feature(rustc_attrs)] #![feature(no_core)] #![no_core] -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] /// This is the built-in type `usize`. mod usize { } diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/check-source-code-urls-to-def.rs index 5959f9c7c59..41b9d41fa44 100644 --- a/tests/rustdoc/check-source-code-urls-to-def.rs +++ b/tests/rustdoc/check-source-code-urls-to-def.rs @@ -2,7 +2,7 @@ // aux-build:source_code.rs // build-aux-docs -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![crate_name = "foo"] @@ -65,5 +65,5 @@ pub fn foo4() { } // @has - '//pre[@class="rust"]//a[@href="../../foo/primitive.bool.html"]' 'bool' -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] mod whatever {} diff --git a/tests/rustdoc/intra-doc/auxiliary/my-core.rs b/tests/rustdoc/intra-doc/auxiliary/my-core.rs index e22feb03ae6..c050929db96 100644 --- a/tests/rustdoc/intra-doc/auxiliary/my-core.rs +++ b/tests/rustdoc/intra-doc/auxiliary/my-core.rs @@ -3,7 +3,7 @@ #![rustc_coherence_is_core] #![crate_type="rlib"] -#[doc(primitive = "char")] +#[rustc_doc_primitive = "char"] /// Some char docs mod char {} diff --git a/tests/rustdoc/intra-doc/no-doc-primitive.rs b/tests/rustdoc/intra-doc/no-doc-primitive.rs index e5eba1d8d48..711ac09ba9a 100644 --- a/tests/rustdoc/intra-doc/no-doc-primitive.rs +++ b/tests/rustdoc/intra-doc/no-doc-primitive.rs @@ -1,4 +1,4 @@ -// Crate tree without a `doc(primitive)` module for primitive type linked to by a doc link. +// Crate tree without a `rustc_doc_primitive` module for primitive type linked to by a doc link. #![deny(rustdoc::broken_intra_doc_links)] #![feature(no_core, lang_items, rustc_attrs)] diff --git a/tests/rustdoc/intra-doc/prim-methods-local.rs b/tests/rustdoc/intra-doc/prim-methods-local.rs index 79d8df04515..6de4ec1802f 100644 --- a/tests/rustdoc/intra-doc/prim-methods-local.rs +++ b/tests/rustdoc/intra-doc/prim-methods-local.rs @@ -10,7 +10,7 @@ //! A [prim@`char`] and its [`char::len_utf8`]. -#[doc(primitive = "char")] +#[rustc_doc_primitive = "char"] mod char {} impl char { diff --git a/tests/rustdoc/intra-doc/prim-self.rs b/tests/rustdoc/intra-doc/prim-self.rs index c7ce71b15f3..d13858a53cf 100644 --- a/tests/rustdoc/intra-doc/prim-self.rs +++ b/tests/rustdoc/intra-doc/prim-self.rs @@ -25,7 +25,7 @@ impl usize { pub type ME = usize; } -#[doc(primitive = "usize")] +#[rustc_doc_primitive = "usize"] /// This has some docs. mod usize {} diff --git a/tests/rustdoc/issue-15318-3.rs b/tests/rustdoc/issue-15318-3.rs index 2fadc26b006..2dab8f94883 100644 --- a/tests/rustdoc/issue-15318-3.rs +++ b/tests/rustdoc/issue-15318-3.rs @@ -1,7 +1,7 @@ -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has issue_15318_3/primitive.pointer.html /// dox -#[doc(primitive = "pointer")] +#[rustc_doc_primitive = "pointer"] pub mod ptr {} diff --git a/tests/rustdoc/issue-23511.rs b/tests/rustdoc/issue-23511.rs index 7576ebb0305..21d02842431 100644 --- a/tests/rustdoc/issue-23511.rs +++ b/tests/rustdoc/issue-23511.rs @@ -3,7 +3,7 @@ #![no_std] pub mod str { - #![doc(primitive = "str")] + #![rustc_doc_primitive = "str"] impl str { // @hasraw search-index.js foo diff --git a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs index bfce46cf444..5af5f7616b5 100644 --- a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs +++ b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_an_iterator.rs @@ -6,10 +6,10 @@ //! //! [#80737]: https://github.com/rust-lang/rust/issues/80737 -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![no_std] -#[doc(primitive = "reference")] +#[rustc_doc_primitive = "reference"] /// Some useless docs, wouhou! /// /// We need to put this in here, because notable traits diff --git a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs index b359dcea0ff..6c980aaa2b1 100644 --- a/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs +++ b/tests/rustdoc/notable-trait/doc-notable_trait-mut_t_is_not_ref_t.rs @@ -5,9 +5,9 @@ //! //! [#78160]: https://github.com/rust-lang/rust/issues/78160 -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] -#[doc(primitive = "reference")] +#[rustc_doc_primitive = "reference"] /// Some useless docs, wouhou! /// /// We need to put this in here, because notable traits diff --git a/tests/rustdoc/primitive-reference.rs b/tests/rustdoc/primitive-reference.rs index 10efbefd2b1..6f034224df5 100644 --- a/tests/rustdoc/primitive-reference.rs +++ b/tests/rustdoc/primitive-reference.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/index.html // @has - '//h2[@id="primitives"]' 'Primitive Types' @@ -16,7 +16,7 @@ // @count - '//*[@class="impl"]' 1 // @has - '//*[@id="impl-Foo%3C%26A%3E-for-%26B"]/*[@class="code-header"]' \ // 'impl Foo<&A> for &B' -#[doc(primitive = "reference")] +#[rustc_doc_primitive = "reference"] /// this is a test! mod reference {} diff --git a/tests/rustdoc/primitive-slice-auto-trait.rs b/tests/rustdoc/primitive-slice-auto-trait.rs index 77922414676..ba15a73ca1d 100644 --- a/tests/rustdoc/primitive-slice-auto-trait.rs +++ b/tests/rustdoc/primitive-slice-auto-trait.rs @@ -1,7 +1,7 @@ // compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/primitive.slice.html '//a[@class="primitive"]' 'slice' // @has - '//h1' 'Primitive Type slice' @@ -9,6 +9,6 @@ // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Send for [T]where T: Send' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Sync for [T]where T: Sync' -#[doc(primitive = "slice")] +#[rustc_doc_primitive = "slice"] /// this is a test! mod slice_prim {} diff --git a/tests/rustdoc/primitive-tuple-auto-trait.rs b/tests/rustdoc/primitive-tuple-auto-trait.rs index 4344d24f986..2b407b586a3 100644 --- a/tests/rustdoc/primitive-tuple-auto-trait.rs +++ b/tests/rustdoc/primitive-tuple-auto-trait.rs @@ -1,7 +1,7 @@ // compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/primitive.tuple.html '//a[@class="primitive"]' 'tuple' // @has - '//h1' 'Primitive Type tuple' @@ -9,7 +9,7 @@ // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Send' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Sync' -#[doc(primitive = "tuple")] +#[rustc_doc_primitive = "tuple"] /// this is a test! /// // Hardcoded anchor to header written in library/core/src/primitive_docs.rs diff --git a/tests/rustdoc/primitive-unit-auto-trait.rs b/tests/rustdoc/primitive-unit-auto-trait.rs index 61850e2462d..5a56f1fd83b 100644 --- a/tests/rustdoc/primitive-unit-auto-trait.rs +++ b/tests/rustdoc/primitive-unit-auto-trait.rs @@ -1,7 +1,7 @@ // compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/primitive.unit.html '//a[@class="primitive"]' 'unit' // @has - '//h1' 'Primitive Type unit' @@ -9,6 +9,6 @@ // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Send for ()' // @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl Sync for ()' -#[doc(primitive = "unit")] +#[rustc_doc_primitive = "unit"] /// this is a test! mod unit_prim {} diff --git a/tests/rustdoc/primitive/primitive-generic-impl.rs b/tests/rustdoc/primitive/primitive-generic-impl.rs index 7b336b39810..2da8ae6ff38 100644 --- a/tests/rustdoc/primitive/primitive-generic-impl.rs +++ b/tests/rustdoc/primitive/primitive-generic-impl.rs @@ -1,8 +1,8 @@ -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] #![crate_name = "foo"] // @has foo/primitive.i32.html '//*[@id="impl-ToString-for-i32"]//h3[@class="code-header"]' 'impl ToString for T' -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] /// Some useless docs, wouhou! mod i32 {} diff --git a/tests/rustdoc/primitive/primitive.rs b/tests/rustdoc/primitive/primitive.rs index 516c7c0c6fe..32af2636c18 100644 --- a/tests/rustdoc/primitive/primitive.rs +++ b/tests/rustdoc/primitive/primitive.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has foo/index.html '//h2[@id="primitives"]' 'Primitive Types' // @has foo/index.html '//a[@href="primitive.i32.html"]' 'i32' @@ -11,11 +11,11 @@ // @has foo/primitive.i32.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!' // @has foo/index.html '//a/@href' '../foo/index.html' // @!has foo/index.html '//span' '🔒' -#[doc(primitive = "i32")] +#[rustc_doc_primitive = "i32"] /// this is a test! mod i32{} // @has foo/primitive.bool.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello' -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] /// hello mod bool {} diff --git a/tests/rustdoc/sidebar-all-page.rs b/tests/rustdoc/sidebar-all-page.rs index e74b981de64..45a6ba8ed2e 100644 --- a/tests/rustdoc/sidebar-all-page.rs +++ b/tests/rustdoc/sidebar-all-page.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @has 'foo/all.html' // @has - '//*[@class="sidebar-elems"]//li' 'Structs' @@ -31,5 +31,5 @@ macro_rules! foo { pub type Type = u8; pub const FOO: u8 = 0; pub static BAR: u8 = 0; -#[doc(primitive = "u8")] +#[rustc_doc_primitive = "u8"] mod u8 {} diff --git a/tests/rustdoc/tab_title.rs b/tests/rustdoc/tab_title.rs index 0cc4f147e1c..8d781b40e46 100644 --- a/tests/rustdoc/tab_title.rs +++ b/tests/rustdoc/tab_title.rs @@ -1,4 +1,5 @@ #![crate_name = "foo"] +#![feature(rustc_attrs)] #![feature(rustdoc_internals)] // tests for the html element @@ -39,6 +40,6 @@ mod continue_keyword {} // @has foo/primitive.u8.html '//head/title' 'u8 - Rust' // @!has - '//head/title' 'foo' -#[doc(primitive = "u8")] +#[rustc_doc_primitive = "u8"] /// `u8` docs mod u8 {} diff --git a/tests/rustdoc/titles.rs b/tests/rustdoc/titles.rs index 69e8b856b0a..e1feb1cd64f 100644 --- a/tests/rustdoc/titles.rs +++ b/tests/rustdoc/titles.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -#![feature(rustdoc_internals)] +#![feature(rustc_attrs)] // @matches 'foo/index.html' '//h1' 'Crate foo' // @matches 'foo/index.html' '//h2[@class="location"]' 'Crate foo' @@ -41,7 +41,7 @@ macro_rules! foo_macro { } // @matches 'foo/primitive.bool.html' '//h1' 'Primitive Type bool' -#[doc(primitive = "bool")] +#[rustc_doc_primitive = "bool"] mod bool {} // @matches 'foo/static.FOO_STATIC.html' '//h1' 'Static foo::FOO_STATIC' diff --git a/tests/ui/rustdoc/feature-gate-doc_primitive.rs b/tests/ui/rustdoc/feature-gate-doc_primitive.rs index 18e99e72f8b..78fcd90752e 100644 --- a/tests/ui/rustdoc/feature-gate-doc_primitive.rs +++ b/tests/ui/rustdoc/feature-gate-doc_primitive.rs @@ -1,7 +1,5 @@ -// check-pass -#[doc(primitive = "usize")] -//~^ WARNING `doc(primitive)` should never have been stable -//~| WARNING hard error in a future release +#[rustc_doc_primitive = "usize"] +//~^ ERROR `rustc_doc_primitive` is a rustc internal attribute /// Some docs mod usize {} diff --git a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr index 194b2d87db2..5920880675d 100644 --- a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr +++ b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr @@ -1,12 +1,11 @@ -warning: `doc(primitive)` should never have been stable - --> $DIR/feature-gate-doc_primitive.rs:2:7 +error[E0658]: `rustc_doc_primitive` is a rustc internal attribute + --> $DIR/feature-gate-doc_primitive.rs:1:1 | -LL | #[doc(primitive = "usize")] - | ^^^^^^^^^^^^^^^^^^^ +LL | #[rustc_doc_primitive = "usize"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730> - = note: `#[warn(invalid_doc_attributes)]` on by default + = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable -warning: 1 warning emitted +error: aborting due to previous error +For more information about this error, try `rustc --explain E0658`.