-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Milestone
Description
The following code compiles on stable but fails to compile on beta and nightly with the warning "use of deprecated item Deprecated
":
#![deny(warnings)]
#[deprecated]
trait Deprecated {}
#[deprecated]
struct DeprecatedTy;
#[allow(deprecated)]
impl Deprecated for DeprecatedTy {}
#[allow(deprecated)]
fn foo() -> impl Deprecated { DeprecatedTy }
fn main() {
foo();
}
Error:
error: use of deprecated item 'Deprecated'
--> src/main.rs:13:18
|
13 | fn foo() -> impl Deprecated { DeprecatedTy }
| ^^^^^^^^^^
|
note: lint level defined here
--> src/main.rs:1:9
|
1 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(deprecated)] implied by #[deny(warnings)]
error: aborting due to previous error
Possibly related to @oli-obk 's refactoring of impl Trait
?
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.