Improve ineffective_unstable_trait_impl
error message.
This commit is contained in:
parent
1c1bfba84a
commit
14cc17759d
3 changed files with 7 additions and 6 deletions
|
@ -561,10 +561,10 @@ impl Visitor<'tcx> for Checker<'tcx> {
|
||||||
INEFFECTIVE_UNSTABLE_TRAIT_IMPL,
|
INEFFECTIVE_UNSTABLE_TRAIT_IMPL,
|
||||||
item.hir_id,
|
item.hir_id,
|
||||||
span,
|
span,
|
||||||
|lint| lint.build(
|
|lint| lint
|
||||||
"An `#[unstable]` annotation here has no effect. \
|
.build("an `#[unstable]` annotation here has no effect")
|
||||||
See issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information.",
|
.note("see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information")
|
||||||
).emit()
|
.emit()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ impl StableTrait for UnstableType {}
|
||||||
impl UnstableTrait for StableType {}
|
impl UnstableTrait for StableType {}
|
||||||
|
|
||||||
#[unstable(feature = "x", issue = "none")]
|
#[unstable(feature = "x", issue = "none")]
|
||||||
//~^ ERROR An `#[unstable]` annotation here has no effect.
|
//~^ ERROR an `#[unstable]` annotation here has no effect [rustc::ineffective_unstable_trait_impl]
|
||||||
impl StableTrait for StableType {}
|
impl StableTrait for StableType {}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
error: An `#[unstable]` annotation here has no effect. See issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information.
|
error: an `#[unstable]` annotation here has no effect
|
||||||
--> $DIR/stability-attribute-trait-impl.rs:24:1
|
--> $DIR/stability-attribute-trait-impl.rs:24:1
|
||||||
|
|
|
|
||||||
LL | #[unstable(feature = "x", issue = "none")]
|
LL | #[unstable(feature = "x", issue = "none")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: `#[deny(rustc::ineffective_unstable_trait_impl)]` on by default
|
= note: `#[deny(rustc::ineffective_unstable_trait_impl)]` on by default
|
||||||
|
= note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue