-
Notifications
You must be signed in to change notification settings - Fork 13.8k
WIP: stability annotations on generic parameters #65083
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
Changes from all commits
04243e3
109d416
1519c0a
20cfb59
4f27d22
f5edbe9
6233993
3c8f740
72e4a24
6452165
57cdd33
8bcf35d
5551143
074ef54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
//! Conversion from AST representation of types to the `ty.rs` representation. | ||
//! The main routine here is `ast_ty_to_ty()`; each use is parameterized by an | ||
//! instance of `AstConv`. | ||
// ignore-tidy-filelength | ||
varkor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
// ignore-tidy-filelength | ||
|
||
|
@@ -697,7 +698,17 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { | |
(GenericParamDefKind::Lifetime, GenericArg::Lifetime(lt)) => { | ||
self.ast_region_to_region(<, Some(param)).into() | ||
} | ||
(GenericParamDefKind::Type { .. }, GenericArg::Type(ty)) => { | ||
(GenericParamDefKind::Type { has_default, .. }, GenericArg::Type(ty)) => { | ||
if *has_default { | ||
tcx.check_stability_internal( | ||
param.def_id, | ||
Some(arg.id()), | ||
arg.span(), | ||
false, | ||
|
||
|_, _| (), | ||
|
||
); | ||
} | ||
|
||
self.ast_ty_to_ty(&ty).into() | ||
} | ||
(GenericParamDefKind::Const, GenericArg::Const(ct)) => { | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
!inherit_dep
condition can be lifted out of this entire block (and probably renamed tocheck_deprecation
).