Skip to content

delete mentions of type ascription from lint descriptions #105614

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

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,7 @@ declare_lint! {

declare_lint! {
/// The `trivial_casts` lint detects trivial casts which could be replaced
/// with coercion, which may require [type ascription] or a temporary
/// variable.
/// with coercion, which may require a temporary variable.
///
/// ### Example
///
Expand All @@ -934,12 +933,14 @@ declare_lint! {
/// with FFI interfaces or complex type aliases, where it triggers
/// incorrectly, or in situations where it will be more difficult to
/// clearly express the intent. It may be possible that this will become a
/// warning in the future, possibly with [type ascription] providing a
/// convenient way to work around the current issues. See [RFC 401] for
/// historical context.
///
/// [type ascription]: https://github.com/rust-lang/rust/issues/23416
/// [RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
/// warning in the future, possibly with an explicit syntax for coercions
/// providing a convenient way to work around the current issues.
/// See [RFC 401 (coercions)][rfc-401], [RFC 803 (type ascription)][rfc-803] and
/// [RFC 3307 (remove type ascription)][rfc-3307] for historical context.
///
/// [rfc-401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
/// [rfc-803]: https://github.com/rust-lang/rfcs/blob/master/text/0803-type-ascription.md
/// [rfc-3307]: https://github.com/rust-lang/rfcs/blob/master/text/3307-de-rfc-type-ascription.md
pub TRIVIAL_CASTS,
Allow,
"detects trivial casts which could be removed"
Expand Down Expand Up @@ -967,12 +968,14 @@ declare_lint! {
/// with FFI interfaces or complex type aliases, where it triggers
/// incorrectly, or in situations where it will be more difficult to
/// clearly express the intent. It may be possible that this will become a
/// warning in the future, possibly with [type ascription] providing a
/// convenient way to work around the current issues. See [RFC 401] for
/// historical context.
///
/// [type ascription]: https://github.com/rust-lang/rust/issues/23416
/// [RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
/// warning in the future, possibly with an explicit syntax for coercions
/// providing a convenient way to work around the current issues.
/// See [RFC 401 (coercions)][rfc-401], [RFC 803 (type ascription)][rfc-803] and
/// [RFC 3307 (remove type ascription)][rfc-3307] for historical context.
///
/// [rfc-401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
/// [rfc-803]: https://github.com/rust-lang/rfcs/blob/master/text/0803-type-ascription.md
/// [rfc-3307]: https://github.com/rust-lang/rfcs/blob/master/text/3307-de-rfc-type-ascription.md
pub TRIVIAL_NUMERIC_CASTS,
Allow,
"detects trivial casts of numeric types which could be removed"
Expand Down