mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
RFC 2383: Stabilize lint_reasons
🎉
This commit is contained in:
parent
d929a42a66
commit
8b14e23dce
@ -12,7 +12,7 @@
|
|||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(lint_reasons)]
|
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
||||||
#![feature(proc_macro_internals)]
|
#![feature(proc_macro_internals)]
|
||||||
#![feature(proc_macro_quote)]
|
#![feature(proc_macro_quote)]
|
||||||
#![feature(rustdoc_internals)]
|
#![feature(rustdoc_internals)]
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![allow(rustc::default_hash_types)]
|
#![allow(rustc::default_hash_types)]
|
||||||
#![allow(rustc::potential_query_instability)]
|
#![allow(rustc::potential_query_instability)]
|
||||||
|
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
||||||
#![cfg_attr(not(parallel_compiler), feature(cell_leak))]
|
#![cfg_attr(not(parallel_compiler), feature(cell_leak))]
|
||||||
#![deny(unsafe_op_in_unsafe_fn)]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
@ -24,7 +25,6 @@
|
|||||||
#![feature(extend_one)]
|
#![feature(extend_one)]
|
||||||
#![feature(hash_raw_entry)]
|
#![feature(hash_raw_entry)]
|
||||||
#![feature(hasher_prefixfree_extras)]
|
#![feature(hasher_prefixfree_extras)]
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![feature(macro_metavar_expr)]
|
#![feature(macro_metavar_expr)]
|
||||||
#![feature(map_try_insert)]
|
#![feature(map_try_insert)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
|
@ -232,6 +232,8 @@ declare_features! (
|
|||||||
(accepted, label_break_value, "1.65.0", Some(48594)),
|
(accepted, label_break_value, "1.65.0", Some(48594)),
|
||||||
/// Allows `let...else` statements.
|
/// Allows `let...else` statements.
|
||||||
(accepted, let_else, "1.65.0", Some(87335)),
|
(accepted, let_else, "1.65.0", Some(87335)),
|
||||||
|
/// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
|
||||||
|
(accepted, lint_reasons, "CURRENT_RUSTC_VERSION", Some(54503)),
|
||||||
/// Allows `break {expr}` with a value inside `loop`s.
|
/// Allows `break {expr}` with a value inside `loop`s.
|
||||||
(accepted, loop_break_value, "1.19.0", Some(37339)),
|
(accepted, loop_break_value, "1.19.0", Some(37339)),
|
||||||
/// Allows use of `?` as the Kleene "at most one" operator in macros.
|
/// Allows use of `?` as the Kleene "at most one" operator in macros.
|
||||||
|
@ -369,9 +369,9 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
allow, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
allow, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
||||||
DuplicatesOk, EncodeCrossCrate::No,
|
DuplicatesOk, EncodeCrossCrate::No,
|
||||||
),
|
),
|
||||||
gated!(
|
ungated!(
|
||||||
expect, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), DuplicatesOk,
|
expect, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
||||||
EncodeCrossCrate::No, lint_reasons, experimental!(expect)
|
DuplicatesOk, EncodeCrossCrate::No,
|
||||||
),
|
),
|
||||||
ungated!(
|
ungated!(
|
||||||
forbid, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
forbid, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
||||||
|
@ -512,8 +512,6 @@ declare_features! (
|
|||||||
/// Allows using `#[link(kind = "link-arg", name = "...")]`
|
/// Allows using `#[link(kind = "link-arg", name = "...")]`
|
||||||
/// to pass custom arguments to the linker.
|
/// to pass custom arguments to the linker.
|
||||||
(unstable, link_arg_attribute, "1.76.0", Some(99427)),
|
(unstable, link_arg_attribute, "1.76.0", Some(99427)),
|
||||||
/// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
|
|
||||||
(unstable, lint_reasons, "1.31.0", Some(54503)),
|
|
||||||
/// Give access to additional metadata about declarative macro meta-variables.
|
/// Give access to additional metadata about declarative macro meta-variables.
|
||||||
(unstable, macro_metavar_expr, "1.61.0", Some(83527)),
|
(unstable, macro_metavar_expr, "1.61.0", Some(83527)),
|
||||||
/// Provides a way to concatenate identifiers using metavariable expressions.
|
/// Provides a way to concatenate identifiers using metavariable expressions.
|
||||||
|
@ -3,7 +3,6 @@ use rustc_middle::query::Providers;
|
|||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
use rustc_session::lint::builtin::UNFULFILLED_LINT_EXPECTATIONS;
|
use rustc_session::lint::builtin::UNFULFILLED_LINT_EXPECTATIONS;
|
||||||
use rustc_session::lint::LintExpectationId;
|
use rustc_session::lint::LintExpectationId;
|
||||||
use rustc_span::symbol::sym;
|
|
||||||
use rustc_span::Symbol;
|
use rustc_span::Symbol;
|
||||||
|
|
||||||
pub(crate) fn provide(providers: &mut Providers) {
|
pub(crate) fn provide(providers: &mut Providers) {
|
||||||
@ -11,10 +10,6 @@ pub(crate) fn provide(providers: &mut Providers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn check_expectations(tcx: TyCtxt<'_>, tool_filter: Option<Symbol>) {
|
fn check_expectations(tcx: TyCtxt<'_>, tool_filter: Option<Symbol>) {
|
||||||
if !tcx.features().active(sym::lint_reasons) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let lint_expectations = tcx.lint_expectations(());
|
let lint_expectations = tcx.lint_expectations(());
|
||||||
let fulfilled_expectations = tcx.dcx().steal_fulfilled_expectation_ids();
|
let fulfilled_expectations = tcx.dcx().steal_fulfilled_expectation_ids();
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@ use rustc_session::lint::{
|
|||||||
},
|
},
|
||||||
Level, Lint, LintExpectationId, LintId,
|
Level, Lint, LintExpectationId, LintId,
|
||||||
};
|
};
|
||||||
use rustc_session::parse::feature_err;
|
|
||||||
use rustc_session::Session;
|
use rustc_session::Session;
|
||||||
use rustc_span::symbol::{sym, Symbol};
|
use rustc_span::symbol::{sym, Symbol};
|
||||||
use rustc_span::{Span, DUMMY_SP};
|
use rustc_span::{Span, DUMMY_SP};
|
||||||
@ -788,15 +787,6 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||||||
ast::MetaItemKind::NameValue(ref name_value) => {
|
ast::MetaItemKind::NameValue(ref name_value) => {
|
||||||
if item.path == sym::reason {
|
if item.path == sym::reason {
|
||||||
if let ast::LitKind::Str(rationale, _) = name_value.kind {
|
if let ast::LitKind::Str(rationale, _) = name_value.kind {
|
||||||
if !self.features.lint_reasons {
|
|
||||||
feature_err(
|
|
||||||
&self.sess,
|
|
||||||
sym::lint_reasons,
|
|
||||||
item.span,
|
|
||||||
"lint reasons are experimental",
|
|
||||||
)
|
|
||||||
.emit();
|
|
||||||
}
|
|
||||||
reason = Some(rationale);
|
reason = Some(rationale);
|
||||||
} else {
|
} else {
|
||||||
sess.dcx().emit_err(MalformedAttribute {
|
sess.dcx().emit_err(MalformedAttribute {
|
||||||
|
@ -608,13 +608,13 @@ declare_lint! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
/// The `unfulfilled_lint_expectations` lint detects lint trigger expectations
|
/// The `unfulfilled_lint_expectations` lint warns if a lint expectation is
|
||||||
/// that have not been fulfilled.
|
/// unfulfilled.
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// #![feature(lint_reasons)]
|
/// #![cfg_attr(bootstrap, feature(lint_reasons))]
|
||||||
///
|
///
|
||||||
/// #[expect(unused_variables)]
|
/// #[expect(unused_variables)]
|
||||||
/// let x = 10;
|
/// let x = 10;
|
||||||
@ -625,24 +625,14 @@ declare_lint! {
|
|||||||
///
|
///
|
||||||
/// ### Explanation
|
/// ### Explanation
|
||||||
///
|
///
|
||||||
/// It was expected that the marked code would emit a lint. This expectation
|
/// The `#[expect]` attribute can be used to create a lint expectation. The
|
||||||
/// has not been fulfilled.
|
/// expectation is fulfilled, if a `#[warn]` attribute at the same location
|
||||||
|
/// would result in a lint emission. If the expectation is unfulfilled,
|
||||||
|
/// because no lint was emitted, this lint will be emitted on the attribute.
|
||||||
///
|
///
|
||||||
/// The `expect` attribute can be removed if this is intended behavior otherwise
|
|
||||||
/// it should be investigated why the expected lint is no longer issued.
|
|
||||||
///
|
|
||||||
/// In rare cases, the expectation might be emitted at a different location than
|
|
||||||
/// shown in the shown code snippet. In most cases, the `#[expect]` attribute
|
|
||||||
/// works when added to the outer scope. A few lints can only be expected
|
|
||||||
/// on a crate level.
|
|
||||||
///
|
|
||||||
/// Part of RFC 2383. The progress is being tracked in [#54503]
|
|
||||||
///
|
|
||||||
/// [#54503]: https://github.com/rust-lang/rust/issues/54503
|
|
||||||
pub UNFULFILLED_LINT_EXPECTATIONS,
|
pub UNFULFILLED_LINT_EXPECTATIONS,
|
||||||
Warn,
|
Warn,
|
||||||
"unfulfilled lint expectation",
|
"unfulfilled lint expectation"
|
||||||
@feature_gate = rustc_span::sym::lint_reasons;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
|
@ -142,9 +142,9 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
allow, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
allow, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
||||||
DuplicatesOk, @only_local: true,
|
DuplicatesOk, @only_local: true,
|
||||||
),
|
),
|
||||||
gated!(
|
ungated!(
|
||||||
expect, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#), DuplicatesOk,
|
expect, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
||||||
lint_reasons, experimental!(expect)
|
DuplicatesOk, @only_local: true,
|
||||||
),
|
),
|
||||||
ungated!(
|
ungated!(
|
||||||
forbid, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
forbid, Normal, template!(List: r#"lint1, lint2, ..., /*opt*/ reason = "...""#),
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
//! This file tests the `#[expect]` attribute implementation for tool lints. The same
|
//! This file tests the `#[expect]` attribute implementation for tool lints. The same
|
||||||
//! file is used to test clippy and rustdoc. Any changes to this file should be synced
|
//! file is used to test clippy and rustdoc. Any changes to this file should be synced
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ edition: 2021
|
//@ edition: 2021
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::Poll;
|
use std::task::Poll;
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
pub mod inner {
|
pub mod inner {
|
||||||
#[expect(unexpected_cfgs)]
|
#[expect(unexpected_cfgs)]
|
||||||
pub fn i_am_here() {
|
pub fn i_am_here() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0425]: cannot find function `i_am_not` in module `inner`
|
error[E0425]: cannot find function `i_am_not` in module `inner`
|
||||||
--> $DIR/diagnostics-not-a-def.rs:14:12
|
--> $DIR/diagnostics-not-a-def.rs:12:12
|
||||||
|
|
|
|
||||||
LL | inner::i_am_not();
|
LL | inner::i_am_not();
|
||||||
| ^^^^^^^^ not found in `inner`
|
| ^^^^^^^^ not found in `inner`
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![deny(unused_attributes)]
|
#![deny(unused_attributes)]
|
||||||
#![allow()] //~ ERROR unused attribute
|
#![allow()] //~ ERROR unused attribute
|
||||||
#![expect()] //~ ERROR unused attribute
|
#![expect()] //~ ERROR unused attribute
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:11:1
|
--> $DIR/empty-attributes.rs:9:1
|
||||||
|
|
|
|
||||||
LL | #[repr()]
|
LL | #[repr()]
|
||||||
| ^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^ help: remove this attribute
|
||||||
|
|
|
|
||||||
= note: attribute `repr` with an empty list has no effect
|
= note: attribute `repr` with an empty list has no effect
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/empty-attributes.rs:3:9
|
--> $DIR/empty-attributes.rs:1:9
|
||||||
|
|
|
|
||||||
LL | #![deny(unused_attributes)]
|
LL | #![deny(unused_attributes)]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:14:1
|
--> $DIR/empty-attributes.rs:12:1
|
||||||
|
|
|
|
||||||
LL | #[target_feature()]
|
LL | #[target_feature()]
|
||||||
| ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -20,7 +20,7 @@ LL | #[target_feature()]
|
|||||||
= note: attribute `target_feature` with an empty list has no effect
|
= note: attribute `target_feature` with an empty list has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:4:1
|
--> $DIR/empty-attributes.rs:2:1
|
||||||
|
|
|
|
||||||
LL | #![allow()]
|
LL | #![allow()]
|
||||||
| ^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -28,7 +28,7 @@ LL | #![allow()]
|
|||||||
= note: attribute `allow` with an empty list has no effect
|
= note: attribute `allow` with an empty list has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:5:1
|
--> $DIR/empty-attributes.rs:3:1
|
||||||
|
|
|
|
||||||
LL | #![expect()]
|
LL | #![expect()]
|
||||||
| ^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -36,7 +36,7 @@ LL | #![expect()]
|
|||||||
= note: attribute `expect` with an empty list has no effect
|
= note: attribute `expect` with an empty list has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:6:1
|
--> $DIR/empty-attributes.rs:4:1
|
||||||
|
|
|
|
||||||
LL | #![warn()]
|
LL | #![warn()]
|
||||||
| ^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^ help: remove this attribute
|
||||||
@ -44,7 +44,7 @@ LL | #![warn()]
|
|||||||
= note: attribute `warn` with an empty list has no effect
|
= note: attribute `warn` with an empty list has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:7:1
|
--> $DIR/empty-attributes.rs:5:1
|
||||||
|
|
|
|
||||||
LL | #![deny()]
|
LL | #![deny()]
|
||||||
| ^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^ help: remove this attribute
|
||||||
@ -52,7 +52,7 @@ LL | #![deny()]
|
|||||||
= note: attribute `deny` with an empty list has no effect
|
= note: attribute `deny` with an empty list has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:8:1
|
--> $DIR/empty-attributes.rs:6:1
|
||||||
|
|
|
|
||||||
LL | #![forbid()]
|
LL | #![forbid()]
|
||||||
| ^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -60,7 +60,7 @@ LL | #![forbid()]
|
|||||||
= note: attribute `forbid` with an empty list has no effect
|
= note: attribute `forbid` with an empty list has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/empty-attributes.rs:9:1
|
--> $DIR/empty-attributes.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #![feature()]
|
LL | #![feature()]
|
||||||
| ^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^ help: remove this attribute
|
||||||
|
@ -13,6 +13,11 @@ warning[E0602]: unknown lint: `bogus`
|
|||||||
= note: requested on the command line with `-D bogus`
|
= note: requested on the command line with `-D bogus`
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
warning[E0602]: unknown lint: `bogus`
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-D bogus`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
warning: 4 warnings emitted
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0602`.
|
For more information about this error, try `rustc --explain E0602`.
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#![warn(nonstandard_style, reason = "the standard should be respected")]
|
|
||||||
//~^ ERROR lint reasons are experimental
|
|
||||||
//~| ERROR lint reasons are experimental
|
|
||||||
|
|
||||||
fn main() {}
|
|
@ -1,24 +0,0 @@
|
|||||||
error[E0658]: lint reasons are experimental
|
|
||||||
--> $DIR/feature-gate-lint-reasons.rs:1:28
|
|
||||||
|
|
|
||||||
LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
|
|
||||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
||||||
|
|
||||||
error[E0658]: lint reasons are experimental
|
|
||||||
--> $DIR/feature-gate-lint-reasons.rs:1:28
|
|
||||||
|
|
|
||||||
LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
|
|
||||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0658`.
|
|
@ -1,5 +1,3 @@
|
|||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
pub struct Wrapper<T>(T);
|
pub struct Wrapper<T>(T);
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
|
@ -5,7 +5,7 @@ LL | let _: &dyn rpitit::Foo = todo!();
|
|||||||
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
|
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
|
||||||
|
|
|
|
||||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||||
--> $DIR/auxiliary/rpitit.rs:6:21
|
--> $DIR/auxiliary/rpitit.rs:4:21
|
||||||
|
|
|
|
||||||
LL | fn bar(self) -> impl Deref<Target = impl Sized>;
|
LL | fn bar(self) -> impl Deref<Target = impl Sized>;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait cannot be made into an object because method `bar` references an `impl Trait` type in its return type
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait cannot be made into an object because method `bar` references an `impl Trait` type in its return type
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ aux-build: rpitit.rs
|
//@ aux-build: rpitit.rs
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
extern crate rpitit;
|
extern crate rpitit;
|
||||||
|
|
||||||
use rpitit::{Foo, Foreign};
|
use rpitit::{Foo, Foreign};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: impl trait in impl method signature does not match trait method signature
|
warning: impl trait in impl method signature does not match trait method signature
|
||||||
--> $DIR/foreign.rs:23:21
|
--> $DIR/foreign.rs:21:21
|
||||||
|
|
|
|
||||||
LL | fn bar(self) -> Arc<String> {
|
LL | fn bar(self) -> Arc<String> {
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -7,7 +7,7 @@ LL | fn bar(self) -> Arc<String> {
|
|||||||
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
|
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
|
||||||
= note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
|
= note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/foreign.rs:22:12
|
--> $DIR/foreign.rs:20:12
|
||||||
|
|
|
|
||||||
LL | #[warn(refining_impl_trait)]
|
LL | #[warn(refining_impl_trait)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
@ -18,7 +18,7 @@ LL | fn bar(self) -> impl Deref<Target = impl Sized> {
|
|||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
warning: impl trait in impl method signature does not match trait method signature
|
warning: impl trait in impl method signature does not match trait method signature
|
||||||
--> $DIR/foreign.rs:33:21
|
--> $DIR/foreign.rs:31:21
|
||||||
|
|
|
|
||||||
LL | fn bar(self) -> Arc<String> {
|
LL | fn bar(self) -> Arc<String> {
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -26,7 +26,7 @@ LL | fn bar(self) -> Arc<String> {
|
|||||||
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
|
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
|
||||||
= note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
|
= note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/foreign.rs:31:12
|
--> $DIR/foreign.rs:29:12
|
||||||
|
|
|
|
||||||
LL | #[warn(refining_impl_trait)]
|
LL | #[warn(refining_impl_trait)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
fn f() -> Box<impl Sized>;
|
fn f() -> Box<impl Sized>;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
// issue: 113903
|
// issue: 113903
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
pub trait Tr {
|
pub trait Tr {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0412]: cannot find type `Missing` in this scope
|
error[E0412]: cannot find type `Missing` in this scope
|
||||||
--> $DIR/rpitit-shadowed-by-missing-adt.rs:8:35
|
--> $DIR/rpitit-shadowed-by-missing-adt.rs:6:35
|
||||||
|
|
|
|
||||||
LL | fn w() -> impl Deref<Target = Missing<impl Sized>>;
|
LL | fn w() -> impl Deref<Target = Missing<impl Sized>>;
|
||||||
| ^^^^^^^ not found in this scope
|
| ^^^^^^^ not found in this scope
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/signature-mismatch.rs:79:10
|
--> $DIR/signature-mismatch.rs:77:10
|
||||||
|
|
|
|
||||||
LL | &'a self,
|
LL | &'a self,
|
||||||
| -------- this parameter and the return type are declared with different lifetimes...
|
| -------- this parameter and the return type are declared with different lifetimes...
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
//@ revisions: success failure
|
//@ revisions: success failure
|
||||||
//@[success] check-pass
|
//@[success] check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
|
||||||
pub trait Captures<'a> {}
|
pub trait Captures<'a> {}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(specialization)]
|
#![feature(specialization)]
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
|
@ -13,6 +13,11 @@ warning[E0602]: unknown lint: `foo_qux`
|
|||||||
= note: requested on the command line with `--force-warn foo_qux`
|
= note: requested on the command line with `--force-warn foo_qux`
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
warning[E0602]: unknown lint: `foo_qux`
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `--force-warn foo_qux`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
warning: 4 warnings emitted
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0602`.
|
For more information about this error, try `rustc --explain E0602`.
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
// it also checks that the `dead_code` lint is also *NOT* emited
|
// it also checks that the `dead_code` lint is also *NOT* emited
|
||||||
// for `bar` as it's suppresed by the `#[expect]` on `bar`
|
// for `bar` as it's suppresed by the `#[expect]` on `bar`
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(dead_code)] // to override compiletest
|
#![warn(dead_code)] // to override compiletest
|
||||||
|
|
||||||
fn bar() {}
|
fn bar() {}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/allow-or-expect-dead_code-114557-2.rs:15:10
|
--> $DIR/allow-or-expect-dead_code-114557-2.rs:14:10
|
||||||
|
|
|
|
||||||
LL | #[expect(dead_code)]
|
LL | #[expect(dead_code)]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
// this test makes sure that the `unfulfilled_lint_expectations` lint
|
// this test makes sure that the `unfulfilled_lint_expectations` lint
|
||||||
// is being emited for `foo` as foo is not dead code, it's pub
|
// is being emited for `foo` as foo is not dead code, it's pub
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(dead_code)] // to override compiletest
|
#![warn(dead_code)] // to override compiletest
|
||||||
|
|
||||||
#[expect(dead_code)]
|
#[expect(dead_code)]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/allow-or-expect-dead_code-114557-3.rs:9:10
|
--> $DIR/allow-or-expect-dead_code-114557-3.rs:8:10
|
||||||
|
|
|
|
||||||
LL | #[expect(dead_code)]
|
LL | #[expect(dead_code)]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
// this test checks that no matter if we put #[allow(dead_code)]
|
// this test checks that no matter if we put #[allow(dead_code)]
|
||||||
// or #[expect(dead_code)], no warning is being emited
|
// or #[expect(dead_code)], no warning is being emited
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(dead_code)] // to override compiletest
|
#![warn(dead_code)] // to override compiletest
|
||||||
|
|
||||||
fn f() {}
|
fn f() {}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
// Empty (and reason-only) lint attributes are legal—although we may want to
|
// Empty (and reason-only) lint attributes are legal—although we may want to
|
||||||
|
@ -26,5 +26,10 @@ LL | #[deny(warnings)]
|
|||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`
|
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-D raw_pointer_derive`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error: aborting due to 5 previous errors
|
||||||
|
|
||||||
|
@ -26,5 +26,10 @@ LL | #[deny(warnings)]
|
|||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`
|
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`
|
||||||
|
|
||||||
error: aborting due to 1 previous error; 3 warnings emitted
|
warning: lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-D raw_pointer_derive`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error: aborting due to 1 previous error; 4 warnings emitted
|
||||||
|
|
||||||
|
@ -29,5 +29,11 @@ LL | #[deny(unused)]
|
|||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
|
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: lint `bare_trait_object` has been renamed to `bare_trait_objects`
|
||||||
|
|
|
||||||
|
= help: use the new name `bare_trait_objects`
|
||||||
|
= note: requested on the command line with `-D bare_trait_object`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error: aborting due to 5 previous errors
|
||||||
|
|
||||||
|
@ -29,5 +29,11 @@ LL | #[deny(unused)]
|
|||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
|
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
|
||||||
|
|
||||||
error: aborting due to 1 previous error; 3 warnings emitted
|
warning: lint `bare_trait_object` has been renamed to `bare_trait_objects`
|
||||||
|
|
|
||||||
|
= help: use the new name `bare_trait_objects`
|
||||||
|
= note: requested on the command line with `-D bare_trait_object`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error: aborting due to 1 previous error; 4 warnings emitted
|
||||||
|
|
||||||
|
@ -45,5 +45,15 @@ LL | pub const PUB_FOO: u64 = 1;
|
|||||||
| |
|
| |
|
||||||
| help: try a static value: `pub static`
|
| help: try a static value: `pub static`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors; 6 warnings emitted
|
warning: lint `private_no_mangle_fns` has been removed: no longer a warning, `#[no_mangle]` functions always exported
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-F private_no_mangle_fns`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
warning: lint `private_no_mangle_statics` has been removed: no longer a warning, `#[no_mangle]` statics always exported
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-F private_no_mangle_statics`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors; 8 warnings emitted
|
||||||
|
|
||||||
|
@ -30,6 +30,17 @@ error[E0602]: unknown lint: `dead_cod`
|
|||||||
= note: requested on the command line with `-D dead_cod`
|
= note: requested on the command line with `-D dead_cod`
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error: aborting due to 6 previous errors
|
error[E0602]: unknown lint: `bogus`
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-D bogus`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error[E0602]: unknown lint: `dead_cod`
|
||||||
|
|
|
||||||
|
= help: did you mean: `dead_code`
|
||||||
|
= note: requested on the command line with `-D dead_cod`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
error: aborting due to 8 previous errors
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0602`.
|
For more information about this error, try `rustc --explain E0602`.
|
||||||
|
@ -30,6 +30,17 @@ warning[E0602]: unknown lint: `dead_cod`
|
|||||||
= note: requested on the command line with `-D dead_cod`
|
= note: requested on the command line with `-D dead_cod`
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
warning: 6 warnings emitted
|
warning[E0602]: unknown lint: `bogus`
|
||||||
|
|
|
||||||
|
= note: requested on the command line with `-D bogus`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
warning[E0602]: unknown lint: `dead_cod`
|
||||||
|
|
|
||||||
|
= help: did you mean: `dead_code`
|
||||||
|
= note: requested on the command line with `-D dead_cod`
|
||||||
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
|
warning: 8 warnings emitted
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0602`.
|
For more information about this error, try `rustc --explain E0602`.
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ compile-flags: -Zdeduplicate-diagnostics=yes
|
//@ compile-flags: -Zdeduplicate-diagnostics=yes
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
#![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||||
//~^ ERROR malformed lint attribute
|
//~^ ERROR malformed lint attribute
|
||||||
//~| NOTE reason must be a string literal
|
//~| NOTE reason must be a string literal
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:5:58
|
--> $DIR/reasons-erroneous.rs:3:58
|
||||||
|
|
|
|
||||||
LL | #![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
LL | #![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||||
| ^ reason must be a string literal
|
| ^ reason must be a string literal
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:8:40
|
--> $DIR/reasons-erroneous.rs:6:40
|
||||||
|
|
|
|
||||||
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:11:29
|
--> $DIR/reasons-erroneous.rs:9:29
|
||||||
|
|
|
|
||||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:14:23
|
--> $DIR/reasons-erroneous.rs:12:23
|
||||||
|
|
|
|
||||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:17:36
|
--> $DIR/reasons-erroneous.rs:15:36
|
||||||
|
|
|
|
||||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:20:44
|
--> $DIR/reasons-erroneous.rs:18:44
|
||||||
|
|
|
|
||||||
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error[E0452]: malformed lint attribute input
|
||||||
--> $DIR/reasons-erroneous.rs:23:25
|
--> $DIR/reasons-erroneous.rs:21:25
|
||||||
|
|
|
|
||||||
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||||
|
|
||||||
warning: unknown lint: `reason`
|
warning: unknown lint: `reason`
|
||||||
--> $DIR/reasons-erroneous.rs:26:39
|
--> $DIR/reasons-erroneous.rs:24:39
|
||||||
|
|
|
|
||||||
LL | #![warn(missing_copy_implementations, reason)]
|
LL | #![warn(missing_copy_implementations, reason)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
// If you turn off deduplicate diagnostics (which rustc turns on by default but
|
// If you turn off deduplicate diagnostics (which rustc turns on by default but
|
||||||
// compiletest turns off when it runs ui tests), then the errors are
|
// compiletest turns off when it runs ui tests), then the errors are
|
||||||
// (unfortunately) repeated here because the checking is done as we read in the
|
// (unfortunately) repeated here because the checking is done as we read in the
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0453]: allow(unsafe_code) incompatible with previous forbid
|
error[E0453]: allow(unsafe_code) incompatible with previous forbid
|
||||||
--> $DIR/reasons-forbidden.rs:25:13
|
--> $DIR/reasons-forbidden.rs:23:13
|
||||||
|
|
|
|
||||||
LL | unsafe_code,
|
LL | unsafe_code,
|
||||||
| ----------- `forbid` level set here
|
| ----------- `forbid` level set here
|
||||||
@ -10,7 +10,7 @@ LL | #[allow(unsafe_code)]
|
|||||||
= note: our errors & omissions insurance policy doesn't cover unsafe Rust
|
= note: our errors & omissions insurance policy doesn't cover unsafe Rust
|
||||||
|
|
||||||
error: usage of an `unsafe` block
|
error: usage of an `unsafe` block
|
||||||
--> $DIR/reasons-forbidden.rs:29:5
|
--> $DIR/reasons-forbidden.rs:27:5
|
||||||
|
|
|
|
||||||
LL | / unsafe {
|
LL | / unsafe {
|
||||||
LL | |
|
LL | |
|
||||||
@ -21,7 +21,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= note: our errors & omissions insurance policy doesn't cover unsafe Rust
|
= note: our errors & omissions insurance policy doesn't cover unsafe Rust
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/reasons-forbidden.rs:14:5
|
--> $DIR/reasons-forbidden.rs:12:5
|
||||||
|
|
|
|
||||||
LL | unsafe_code,
|
LL | unsafe_code,
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(elided_lifetimes_in_paths,
|
#![warn(elided_lifetimes_in_paths,
|
||||||
//~^ NOTE the lint level is defined here
|
//~^ NOTE the lint level is defined here
|
||||||
reason = "explicit anonymous lifetimes aid reasoning about ownership")]
|
reason = "explicit anonymous lifetimes aid reasoning about ownership")]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: hidden lifetime parameters in types are deprecated
|
warning: hidden lifetime parameters in types are deprecated
|
||||||
--> $DIR/reasons.rs:20:34
|
--> $DIR/reasons.rs:19:34
|
||||||
|
|
|
|
||||||
LL | fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
LL | fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||||
| -----^^^^^^^^^
|
| -----^^^^^^^^^
|
||||||
@ -8,7 +8,7 @@ LL | fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
|||||||
|
|
|
|
||||||
= note: explicit anonymous lifetimes aid reasoning about ownership
|
= note: explicit anonymous lifetimes aid reasoning about ownership
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/reasons.rs:4:9
|
--> $DIR/reasons.rs:3:9
|
||||||
|
|
|
|
||||||
LL | #![warn(elided_lifetimes_in_paths,
|
LL | #![warn(elided_lifetimes_in_paths,
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -18,7 +18,7 @@ LL | fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|||||||
| ++++
|
| ++++
|
||||||
|
|
||||||
warning: variable `Social_exchange_psychology` should have a snake case name
|
warning: variable `Social_exchange_psychology` should have a snake case name
|
||||||
--> $DIR/reasons.rs:30:9
|
--> $DIR/reasons.rs:29:9
|
||||||
|
|
|
|
||||||
LL | let Social_exchange_psychology = CheaterDetectionMechanism {};
|
LL | let Social_exchange_psychology = CheaterDetectionMechanism {};
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `social_exchange_psychology`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `social_exchange_psychology`
|
||||||
@ -26,7 +26,7 @@ LL | let Social_exchange_psychology = CheaterDetectionMechanism {};
|
|||||||
= note: people shouldn't have to change their usual style habits
|
= note: people shouldn't have to change their usual style habits
|
||||||
to contribute to our project
|
to contribute to our project
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/reasons.rs:8:5
|
--> $DIR/reasons.rs:7:5
|
||||||
|
|
|
|
||||||
LL | nonstandard_style,
|
LL | nonstandard_style,
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#[expect(drop_bounds)]
|
#[expect(drop_bounds)]
|
||||||
fn trigger_rustc_lints<T: Drop>() {
|
fn trigger_rustc_lints<T: Drop>() {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
// This expect attribute should catch all lint triggers
|
// This expect attribute should catch all lint triggers
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
#![expect(unused_mut)]
|
#![expect(unused_mut)]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/crate_level_expect.rs:7:11
|
--> $DIR/crate_level_expect.rs:5:11
|
||||||
|
|
|
|
||||||
LL | #![expect(unused_mut)]
|
LL | #![expect(unused_mut)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
macro_rules! expect_inside_macro {
|
macro_rules! expect_inside_macro {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![warn(unused_variables)]
|
#![warn(unused_variables)]
|
||||||
|
|
||||||
macro_rules! trigger_unused_variables_macro {
|
macro_rules! trigger_unused_variables_macro {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: unused variable: `x`
|
warning: unused variable: `x`
|
||||||
--> $DIR/expect_lint_from_macro.rs:9:13
|
--> $DIR/expect_lint_from_macro.rs:7:13
|
||||||
|
|
|
|
||||||
LL | let x = 0;
|
LL | let x = 0;
|
||||||
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
||||||
@ -8,14 +8,14 @@ LL | trigger_unused_variables_macro!();
|
|||||||
| --------------------------------- in this macro invocation
|
| --------------------------------- in this macro invocation
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/expect_lint_from_macro.rs:5:9
|
--> $DIR/expect_lint_from_macro.rs:3:9
|
||||||
|
|
|
|
||||||
LL | #![warn(unused_variables)]
|
LL | #![warn(unused_variables)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
= note: this warning originates in the macro `trigger_unused_variables_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this warning originates in the macro `trigger_unused_variables_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
warning: unused variable: `x`
|
warning: unused variable: `x`
|
||||||
--> $DIR/expect_lint_from_macro.rs:9:13
|
--> $DIR/expect_lint_from_macro.rs:7:13
|
||||||
|
|
|
|
||||||
LL | let x = 0;
|
LL | let x = 0;
|
||||||
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
// should error due to missing feature gate.
|
|
||||||
|
|
||||||
#![warn(unused)]
|
|
||||||
|
|
||||||
#[expect(unused)]
|
|
||||||
//~^ ERROR: the `#[expect]` attribute is an experimental feature [E0658]
|
|
||||||
fn main() {
|
|
||||||
let x = 1;
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
error[E0658]: the `#[expect]` attribute is an experimental feature
|
|
||||||
--> $DIR/expect_missing_feature_gate.rs:5:1
|
|
||||||
|
|
|
||||||
LL | #[expect(unused)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
|
|
||||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
||||||
|
|
||||||
error: aborting due to 1 previous error
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0658`.
|
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
// The warnings are not double triggers, they identify different unfulfilled lint
|
// The warnings are not double triggers, they identify different unfulfilled lint
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:10:28
|
--> $DIR/expect_multiple_lints.rs:8:28
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, unused_mut, while_true)]
|
LL | #[expect(unused_variables, unused_mut, while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
@ -7,43 +7,43 @@ LL | #[expect(unused_variables, unused_mut, while_true)]
|
|||||||
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:10:40
|
--> $DIR/expect_multiple_lints.rs:8:40
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, unused_mut, while_true)]
|
LL | #[expect(unused_variables, unused_mut, while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:19:10
|
--> $DIR/expect_multiple_lints.rs:17:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, unused_mut, while_true)]
|
LL | #[expect(unused_variables, unused_mut, while_true)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:19:40
|
--> $DIR/expect_multiple_lints.rs:17:40
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, unused_mut, while_true)]
|
LL | #[expect(unused_variables, unused_mut, while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:28:10
|
--> $DIR/expect_multiple_lints.rs:26:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, unused_mut, while_true)]
|
LL | #[expect(unused_variables, unused_mut, while_true)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:28:28
|
--> $DIR/expect_multiple_lints.rs:26:28
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, unused_mut, while_true)]
|
LL | #[expect(unused_variables, unused_mut, while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:36:18
|
--> $DIR/expect_multiple_lints.rs:34:18
|
||||||
|
|
|
|
||||||
LL | #[expect(unused, while_true)]
|
LL | #[expect(unused, while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_multiple_lints.rs:45:10
|
--> $DIR/expect_multiple_lints.rs:43:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused, while_true)]
|
LL | #[expect(unused, while_true)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(unused_mut)]
|
#![warn(unused_mut)]
|
||||||
|
|
||||||
#[expect(
|
#[expect(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: variable does not need to be mutable
|
warning: variable does not need to be mutable
|
||||||
--> $DIR/expect_nested_lint_levels.rs:36:13
|
--> $DIR/expect_nested_lint_levels.rs:35:13
|
||||||
|
|
|
|
||||||
LL | let mut v = 0;
|
LL | let mut v = 0;
|
||||||
| ----^
|
| ----^
|
||||||
@ -8,25 +8,25 @@ LL | let mut v = 0;
|
|||||||
|
|
|
|
||||||
= note: this overrides the previous `expect` lint level and warns about the `unused_mut` lint here
|
= note: this overrides the previous `expect` lint level and warns about the `unused_mut` lint here
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/expect_nested_lint_levels.rs:31:9
|
--> $DIR/expect_nested_lint_levels.rs:30:9
|
||||||
|
|
|
|
||||||
LL | unused_mut,
|
LL | unused_mut,
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: unused variable: `this_is_my_function`
|
error: unused variable: `this_is_my_function`
|
||||||
--> $DIR/expect_nested_lint_levels.rs:48:9
|
--> $DIR/expect_nested_lint_levels.rs:47:9
|
||||||
|
|
|
|
||||||
LL | let this_is_my_function = 3;
|
LL | let this_is_my_function = 3;
|
||||||
| ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_is_my_function`
|
| ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_is_my_function`
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/expect_nested_lint_levels.rs:45:10
|
--> $DIR/expect_nested_lint_levels.rs:44:10
|
||||||
|
|
|
|
||||||
LL | #[forbid(unused_variables)]
|
LL | #[forbid(unused_variables)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_nested_lint_levels.rs:7:5
|
--> $DIR/expect_nested_lint_levels.rs:6:5
|
||||||
|
|
|
|
||||||
LL | unused_mut,
|
LL | unused_mut,
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
@ -35,7 +35,7 @@ LL | unused_mut,
|
|||||||
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_nested_lint_levels.rs:24:5
|
--> $DIR/expect_nested_lint_levels.rs:23:5
|
||||||
|
|
|
|
||||||
LL | unused_mut,
|
LL | unused_mut,
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
@ -43,7 +43,7 @@ LL | unused_mut,
|
|||||||
= note: this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered
|
= note: this `expect` is overridden by a `warn` attribute before the `unused_mut` lint is triggered
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_nested_lint_levels.rs:43:10
|
--> $DIR/expect_nested_lint_levels.rs:42:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables)]
|
LL | #[expect(unused_variables)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#[warn(unused_variables)]
|
#[warn(unused_variables)]
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_on_fn_params.rs:9:43
|
--> $DIR/expect_on_fn_params.rs:8:43
|
||||||
|
|
|
|
||||||
LL | fn check_unfulfilled_expectation(#[expect(unused_variables)] used_value: u32) {
|
LL | fn check_unfulfilled_expectation(#[expect(unused_variables)] used_value: u32) {
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
//! This file tests the `#[expect]` attribute implementation for tool lints. The same
|
//! This file tests the `#[expect]` attribute implementation for tool lints. The same
|
||||||
//! file is used to test clippy and rustdoc. Any changes to this file should be synced
|
//! file is used to test clippy and rustdoc. Any changes to this file should be synced
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_tool_lint_rfc_2383.rs:33:14
|
--> $DIR/expect_tool_lint_rfc_2383.rs:32:14
|
||||||
|
|
|
|
||||||
LL | #[expect(dead_code)]
|
LL | #[expect(dead_code)]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
@ -7,7 +7,7 @@ LL | #[expect(dead_code)]
|
|||||||
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_tool_lint_rfc_2383.rs:39:18
|
--> $DIR/expect_tool_lint_rfc_2383.rs:38:18
|
||||||
|
|
|
|
||||||
LL | #[expect(invalid_nan_comparisons)]
|
LL | #[expect(invalid_nan_comparisons)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(unused_mut)]
|
#![warn(unused_mut)]
|
||||||
|
|
||||||
#![expect(unfulfilled_lint_expectations, reason = "idk why you would expect this")]
|
#![expect(unfulfilled_lint_expectations, reason = "idk why you would expect this")]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_unfulfilled_expectation.rs:7:11
|
--> $DIR/expect_unfulfilled_expectation.rs:6:11
|
||||||
|
|
|
|
||||||
LL | #![expect(unfulfilled_lint_expectations, reason = "idk why you would expect this")]
|
LL | #![expect(unfulfilled_lint_expectations, reason = "idk why you would expect this")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -9,7 +9,7 @@ LL | #![expect(unfulfilled_lint_expectations, reason = "idk why you would expect
|
|||||||
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_unfulfilled_expectation.rs:13:10
|
--> $DIR/expect_unfulfilled_expectation.rs:12:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unfulfilled_lint_expectations, reason = "a local: idk why you would expect this")]
|
LL | #[expect(unfulfilled_lint_expectations, reason = "a local: idk why you would expect this")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -18,7 +18,7 @@ LL | #[expect(unfulfilled_lint_expectations, reason = "a local: idk why you woul
|
|||||||
= note: the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
|
= note: the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_unfulfilled_expectation.rs:18:14
|
--> $DIR/expect_unfulfilled_expectation.rs:17:14
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_mut, reason = "this expectation will create a diagnostic with the default lint level")]
|
LL | #[expect(unused_mut, reason = "this expectation will create a diagnostic with the default lint level")]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
@ -26,7 +26,7 @@ LL | #[expect(unused_mut, reason = "this expectation will create a diagnosti
|
|||||||
= note: this expectation will create a diagnostic with the default lint level
|
= note: this expectation will create a diagnostic with the default lint level
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_unfulfilled_expectation.rs:25:22
|
--> $DIR/expect_unfulfilled_expectation.rs:24:22
|
||||||
|
|
|
|
||||||
LL | #[expect(unused, unfulfilled_lint_expectations, reason = "the expectation for `unused` should be fulfilled")]
|
LL | #[expect(unused, unfulfilled_lint_expectations, reason = "the expectation for `unused` should be fulfilled")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ incremental
|
//@ incremental
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
struct OneUnused;
|
struct OneUnused;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ compile-flags: -Zdeduplicate-diagnostics=yes
|
//@ compile-flags: -Zdeduplicate-diagnostics=yes
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#[forbid(unused_variables)]
|
#[forbid(unused_variables)]
|
||||||
//~^ NOTE `forbid` level set here
|
//~^ NOTE `forbid` level set here
|
||||||
#[expect(unused_variables)]
|
#[expect(unused_variables)]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0453]: expect(unused_variables) incompatible with previous forbid
|
error[E0453]: expect(unused_variables) incompatible with previous forbid
|
||||||
--> $DIR/expect_with_forbid.rs:7:10
|
--> $DIR/expect_with_forbid.rs:5:10
|
||||||
|
|
|
|
||||||
LL | #[forbid(unused_variables)]
|
LL | #[forbid(unused_variables)]
|
||||||
| ---------------- `forbid` level set here
|
| ---------------- `forbid` level set here
|
||||||
@ -8,7 +8,7 @@ LL | #[expect(unused_variables)]
|
|||||||
| ^^^^^^^^^^^^^^^^ overruled by previous forbid
|
| ^^^^^^^^^^^^^^^^ overruled by previous forbid
|
||||||
|
|
||||||
error[E0453]: expect(while_true) incompatible with previous forbid
|
error[E0453]: expect(while_true) incompatible with previous forbid
|
||||||
--> $DIR/expect_with_forbid.rs:15:10
|
--> $DIR/expect_with_forbid.rs:13:10
|
||||||
|
|
|
|
||||||
LL | #[forbid(while_true)]
|
LL | #[forbid(while_true)]
|
||||||
| ---------- `forbid` level set here
|
| ---------- `forbid` level set here
|
||||||
@ -17,13 +17,13 @@ LL | #[expect(while_true)]
|
|||||||
| ^^^^^^^^^^ overruled by previous forbid
|
| ^^^^^^^^^^ overruled by previous forbid
|
||||||
|
|
||||||
error: denote infinite loops with `loop { ... }`
|
error: denote infinite loops with `loop { ... }`
|
||||||
--> $DIR/expect_with_forbid.rs:22:5
|
--> $DIR/expect_with_forbid.rs:20:5
|
||||||
|
|
|
|
||||||
LL | while true {}
|
LL | while true {}
|
||||||
| ^^^^^^^^^^ help: use `loop`
|
| ^^^^^^^^^^ help: use `loop`
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/expect_with_forbid.rs:12:10
|
--> $DIR/expect_with_forbid.rs:10:10
|
||||||
|
|
|
|
||||||
LL | #[forbid(while_true)]
|
LL | #[forbid(while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
#![expect(unused_variables, reason = "<This should fail and display this reason>")]
|
#![expect(unused_variables, reason = "<This should fail and display this reason>")]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/expect_with_reason.rs:6:11
|
--> $DIR/expect_with_reason.rs:5:11
|
||||||
|
|
|
|
||||||
LL | #![expect(unused_variables, reason = "<This should fail and display this reason>")]
|
LL | #![expect(unused_variables, reason = "<This should fail and display this reason>")]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
//@ compile-flags: --force-warn unused_mut
|
//@ compile-flags: --force-warn unused_mut
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
fn expect_early_pass_lint() {
|
fn expect_early_pass_lint() {
|
||||||
#[expect(while_true)]
|
#[expect(while_true)]
|
||||||
while true {
|
while true {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: unused variable: `x`
|
warning: unused variable: `x`
|
||||||
--> $DIR/force_warn_expected_lints_fulfilled.rs:20:9
|
--> $DIR/force_warn_expected_lints_fulfilled.rs:18:9
|
||||||
|
|
|
|
||||||
LL | let x = 2;
|
LL | let x = 2;
|
||||||
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
||||||
@ -7,13 +7,13 @@ LL | let x = 2;
|
|||||||
= note: requested on the command line with `--force-warn unused-variables`
|
= note: requested on the command line with `--force-warn unused-variables`
|
||||||
|
|
||||||
warning: unused variable: `fox_name`
|
warning: unused variable: `fox_name`
|
||||||
--> $DIR/force_warn_expected_lints_fulfilled.rs:28:9
|
--> $DIR/force_warn_expected_lints_fulfilled.rs:26:9
|
||||||
|
|
|
|
||||||
LL | let fox_name = "Sir Nibbles";
|
LL | let fox_name = "Sir Nibbles";
|
||||||
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fox_name`
|
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fox_name`
|
||||||
|
|
||||||
warning: variable does not need to be mutable
|
warning: variable does not need to be mutable
|
||||||
--> $DIR/force_warn_expected_lints_fulfilled.rs:32:9
|
--> $DIR/force_warn_expected_lints_fulfilled.rs:30:9
|
||||||
|
|
|
|
||||||
LL | let mut what_does_the_fox_say = "*ding* *deng* *dung*";
|
LL | let mut what_does_the_fox_say = "*ding* *deng* *dung*";
|
||||||
| ----^^^^^^^^^^^^^^^^^^^^^
|
| ----^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -23,13 +23,13 @@ LL | let mut what_does_the_fox_say = "*ding* *deng* *dung*";
|
|||||||
= note: requested on the command line with `--force-warn unused-mut`
|
= note: requested on the command line with `--force-warn unused-mut`
|
||||||
|
|
||||||
warning: unused variable: `this_should_fulfill_the_expectation`
|
warning: unused variable: `this_should_fulfill_the_expectation`
|
||||||
--> $DIR/force_warn_expected_lints_fulfilled.rs:43:9
|
--> $DIR/force_warn_expected_lints_fulfilled.rs:41:9
|
||||||
|
|
|
|
||||||
LL | let this_should_fulfill_the_expectation = "The `#[allow]` has no power here";
|
LL | let this_should_fulfill_the_expectation = "The `#[allow]` has no power here";
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_should_fulfill_the_expectation`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_should_fulfill_the_expectation`
|
||||||
|
|
||||||
warning: denote infinite loops with `loop { ... }`
|
warning: denote infinite loops with `loop { ... }`
|
||||||
--> $DIR/force_warn_expected_lints_fulfilled.rs:10:5
|
--> $DIR/force_warn_expected_lints_fulfilled.rs:8:5
|
||||||
|
|
|
|
||||||
LL | while true {
|
LL | while true {
|
||||||
| ^^^^^^^^^^ help: use `loop`
|
| ^^^^^^^^^^ help: use `loop`
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
//@ compile-flags: --force-warn unused_mut
|
//@ compile-flags: --force-warn unused_mut
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
fn expect_early_pass_lint(terminate: bool) {
|
fn expect_early_pass_lint(terminate: bool) {
|
||||||
#[expect(while_true)]
|
#[expect(while_true)]
|
||||||
//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
|
//~^ WARNING this lint expectation is unfulfilled [unfulfilled_lint_expectations]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: unused variable: `this_should_not_fulfill_the_expectation`
|
warning: unused variable: `this_should_not_fulfill_the_expectation`
|
||||||
--> $DIR/force_warn_expected_lints_unfulfilled.rs:40:9
|
--> $DIR/force_warn_expected_lints_unfulfilled.rs:38:9
|
||||||
|
|
|
|
||||||
LL | let this_should_not_fulfill_the_expectation = "maybe";
|
LL | let this_should_not_fulfill_the_expectation = "maybe";
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_should_not_fulfill_the_expectation`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_should_not_fulfill_the_expectation`
|
||||||
@ -7,7 +7,7 @@ LL | let this_should_not_fulfill_the_expectation = "maybe";
|
|||||||
= note: requested on the command line with `--force-warn unused-variables`
|
= note: requested on the command line with `--force-warn unused-variables`
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/force_warn_expected_lints_unfulfilled.rs:9:14
|
--> $DIR/force_warn_expected_lints_unfulfilled.rs:7:14
|
||||||
|
|
|
|
||||||
LL | #[expect(while_true)]
|
LL | #[expect(while_true)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
@ -15,7 +15,7 @@ LL | #[expect(while_true)]
|
|||||||
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
= note: `#[warn(unfulfilled_lint_expectations)]` on by default
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/force_warn_expected_lints_unfulfilled.rs:17:10
|
--> $DIR/force_warn_expected_lints_unfulfilled.rs:15:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables, reason="<this should fail and display this reason>")]
|
LL | #[expect(unused_variables, reason="<this should fail and display this reason>")]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
@ -23,13 +23,13 @@ LL | #[expect(unused_variables, reason="<this should fail and display this reaso
|
|||||||
= note: <this should fail and display this reason>
|
= note: <this should fail and display this reason>
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/force_warn_expected_lints_unfulfilled.rs:24:10
|
--> $DIR/force_warn_expected_lints_unfulfilled.rs:22:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused)]
|
LL | #[expect(unused)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/force_warn_expected_lints_unfulfilled.rs:36:10
|
--> $DIR/force_warn_expected_lints_unfulfilled.rs:34:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused)]
|
LL | #[expect(unused)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
fn expect_early_pass_lints() {
|
fn expect_early_pass_lints() {
|
||||||
#[expect(while_true)]
|
#[expect(while_true)]
|
||||||
while true {
|
while true {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
#[expect(unused_variables)]
|
#[expect(unused_variables)]
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
#![deny(unused_attributes)]
|
#![deny(unused_attributes)]
|
||||||
|
|
||||||
#[allow(reason = "I want to allow something")]//~ ERROR unused attribute
|
#[allow(reason = "I want to allow something")]//~ ERROR unused attribute
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/lint-attribute-only-with-reason.rs:5:1
|
--> $DIR/lint-attribute-only-with-reason.rs:3:1
|
||||||
|
|
|
|
||||||
LL | #[allow(reason = "I want to allow something")]
|
LL | #[allow(reason = "I want to allow something")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
|
|
|
|
||||||
= note: attribute `allow` without any lints has no effect
|
= note: attribute `allow` without any lints has no effect
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/lint-attribute-only-with-reason.rs:3:9
|
--> $DIR/lint-attribute-only-with-reason.rs:1:9
|
||||||
|
|
|
|
||||||
LL | #![deny(unused_attributes)]
|
LL | #![deny(unused_attributes)]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/lint-attribute-only-with-reason.rs:6:1
|
--> $DIR/lint-attribute-only-with-reason.rs:4:1
|
||||||
|
|
|
|
||||||
LL | #[expect(reason = "I don't know what I'm waiting for")]
|
LL | #[expect(reason = "I don't know what I'm waiting for")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -20,7 +20,7 @@ LL | #[expect(reason = "I don't know what I'm waiting for")]
|
|||||||
= note: attribute `expect` without any lints has no effect
|
= note: attribute `expect` without any lints has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/lint-attribute-only-with-reason.rs:7:1
|
--> $DIR/lint-attribute-only-with-reason.rs:5:1
|
||||||
|
|
|
|
||||||
LL | #[warn(reason = "This should be warn by default")]
|
LL | #[warn(reason = "This should be warn by default")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -28,7 +28,7 @@ LL | #[warn(reason = "This should be warn by default")]
|
|||||||
= note: attribute `warn` without any lints has no effect
|
= note: attribute `warn` without any lints has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/lint-attribute-only-with-reason.rs:8:1
|
--> $DIR/lint-attribute-only-with-reason.rs:6:1
|
||||||
|
|
|
|
||||||
LL | #[deny(reason = "All listed lints are denied")]
|
LL | #[deny(reason = "All listed lints are denied")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
@ -36,7 +36,7 @@ LL | #[deny(reason = "All listed lints are denied")]
|
|||||||
= note: attribute `deny` without any lints has no effect
|
= note: attribute `deny` without any lints has no effect
|
||||||
|
|
||||||
error: unused attribute
|
error: unused attribute
|
||||||
--> $DIR/lint-attribute-only-with-reason.rs:9:1
|
--> $DIR/lint-attribute-only-with-reason.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #[forbid(reason = "Just some reason")]
|
LL | #[forbid(reason = "Just some reason")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
#[warn(unused_variables)]
|
#[warn(unused_variables)]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: this lint expectation is unfulfilled
|
warning: this lint expectation is unfulfilled
|
||||||
--> $DIR/multiple_expect_attrs.rs:7:10
|
--> $DIR/multiple_expect_attrs.rs:6:10
|
||||||
|
|
|
|
||||||
LL | #[expect(unused_variables)]
|
LL | #[expect(unused_variables)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ compile-flags: -Z unpretty=expanded
|
//@ compile-flags: -Z unpretty=expanded
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
// This `expect` will create an expectation with an unstable expectation id
|
// This `expect` will create an expectation with an unstable expectation id
|
||||||
#[expect(while_true)]
|
#[expect(while_true)]
|
||||||
fn create_early_lint_pass_expectation() {
|
fn create_early_lint_pass_expectation() {
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
#![feature(prelude_import)]
|
#![feature(prelude_import)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
// This ensures that ICEs like rust#94953 don't happen
|
|
||||||
//@ check-pass
|
|
||||||
//@ compile-flags: -Z unpretty=expanded
|
|
||||||
|
|
||||||
#![feature(lint_reasons)]
|
|
||||||
#[prelude_import]
|
#[prelude_import]
|
||||||
use ::std::prelude::rust_2015::*;
|
use ::std::prelude::rust_2015::*;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate std;
|
extern crate std;
|
||||||
|
// This ensures that ICEs like rust#94953 don't happen
|
||||||
|
//@ check-pass
|
||||||
|
//@ compile-flags: -Z unpretty=expanded
|
||||||
|
|
||||||
// This `expect` will create an expectation with an unstable expectation id
|
// This `expect` will create an expectation with an unstable expectation id
|
||||||
#[expect(while_true)]
|
#[expect(while_true)]
|
||||||
|
@ -2,6 +2,5 @@
|
|||||||
//@ compile-flags: -Dunused_attributes
|
//@ compile-flags: -Dunused_attributes
|
||||||
|
|
||||||
#![deny(unused_crate_dependencies)]
|
#![deny(unused_crate_dependencies)]
|
||||||
#![feature(lint_reasons)]
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//@ build-pass
|
//@ build-pass
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
#![feature(intrinsics, rustc_attrs, no_core, lang_items, staged_api, lint_reasons)]
|
#![feature(intrinsics, rustc_attrs, no_core, lang_items, staged_api)]
|
||||||
#![stable(feature = "test", since = "1.0.0")]
|
#![stable(feature = "test", since = "1.0.0")]
|
||||||
|
|
||||||
// Supporting minimal rust core code
|
// Supporting minimal rust core code
|
||||||
|
Loading…
Reference in New Issue
Block a user