blob: 22a7ccb463b6ce670bdbeee70d772d07469b5cca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
//! 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)]
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
//~| WARN this was previously accepted
}
trait Tr2 {
// 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() {}
|