2025-06-09 02:16:25 +05:00
|
|
|
//! Test that future_incompatible lint group only includes edition-independent lints
|
|
|
|
|
|
|
|
|
|
// Ensure that the future_incompatible lint group only includes
|
|
|
|
|
// lints for changes that are not tied to an edition
|
|
|
|
|
#![deny(future_incompatible)]
|
|
|
|
|
|
2024-07-30 23:04:23 -04:00
|
|
|
enum E { V }
|
|
|
|
|
|
|
|
|
|
trait Tr1 {
|
|
|
|
|
type V;
|
|
|
|
|
fn foo() -> Self::V;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Tr1 for E {
|
|
|
|
|
type V = u8;
|
|
|
|
|
|
|
|
|
|
// Error since this is a `future_incompatible` lint
|
|
|
|
|
fn foo() -> Self::V { 0 }
|
|
|
|
|
//~^ ERROR ambiguous associated item
|
2025-06-09 02:16:25 +05:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-30 23:04:23 -04:00
|
|
|
trait Tr2 {
|
2025-06-09 02:16:25 +05:00
|
|
|
// Warn only since this is not a `future_incompatible` lint
|
|
|
|
|
fn f(u8) {}
|
|
|
|
|
//~^ WARN anonymous parameters are deprecated
|
|
|
|
|
//~| WARN this is accepted in the current edition
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|