Vadim Petrochenkov
b25d3ba781
ast/hir: Rename field-related structures
...
StructField -> FieldDef ("field definition")
Field -> ExprField ("expression field", not "field expression")
FieldPat -> PatField ("pattern field", not "field pattern")
Also rename visiting and other methods working on them.
2021-03-16 11:41:24 +03:00
Camille GILLOT
c701872a6c
Remove hir::Item::attrs.
2021-03-09 19:27:50 +01:00
Camille GILLOT
f8514aaa56
Access attrs directly from HirId in rustc_passes::stability.
2021-03-09 19:09:06 +01:00
bors
a0d66b54fb
Auto merge of #71481 - estebank:inherit-stability, r=nikomatsakis
...
Inherit `#[stable(..)]` annotations in enum variants and fields from its item
Lint changes for #65515 . The stdlib will have to be updated once this lands in beta and that version is promoted in master.
2021-03-05 05:28:07 +00:00
Camille GILLOT
c4e7427081
Only store a LocalDefId in hir::MacroDef.
2021-02-15 19:35:55 +01:00
Camille GILLOT
996dc8d5c5
Only store a LocalDefId in hir::ForeignItem.
2021-02-15 19:32:29 +01:00
Camille GILLOT
786a80e9ea
Only store a LocalDefId in hir::ImplItem.
2021-02-15 19:32:29 +01:00
Camille GILLOT
a871a0f111
Only store a LocalDefId in hir::TraitItem.
2021-02-15 19:32:28 +01:00
Camille GILLOT
cebbba081e
Only store a LocalDefId in hir::Item.
...
Items are guaranteed to be HIR owner.
2021-02-15 19:32:10 +01:00
Esteban Küber
19806e4514
Tweak stability attribute diagnostic output
2021-02-10 21:35:27 -08:00
Esteban Küber
4cb089bb54
Inherit #[stable(..)]
annotations in enum variants and fields from its item
2021-02-10 19:10:14 -08:00
Mark Rousskov
d5b760ba62
Bump rustfmt version
...
Also switches on formatting of the mir build module
2021-02-02 09:09:52 -05:00
oli
5bac1c9229
Only inherit const stability for methods of impl const Trait
blocks
2021-01-18 11:07:35 +00:00
Joshua Nelson
a8ff647deb
Separate out a hir::Impl
struct
...
This makes it possible to pass the `Impl` directly to functions, instead
of having to pass each of the many fields one at a time. It also
simplifies matches in many cases.
2021-01-12 20:32:33 -05:00
Rémy Rakic
1fc3c4c16d
adjust const generics defaults FIXMEs to the new feature gate
2021-01-01 11:01:01 +01:00
bstrie
1e1ca28f39
Allow since="TBD"
for rustc_deprecated
2020-12-16 13:21:24 -05:00
Camille GILLOT
60c3bbd844
Formatting.
2020-11-26 21:32:29 +01:00
Camille GILLOT
032f68d625
Remove ForeignMod struct.
2020-11-26 21:32:27 +01:00
Mara Bos
9c647d1021
Improve deprecation attribute diagnostic messages.
...
(From the PR feedback.)
Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
2020-11-02 13:21:18 +01:00
Mara Bos
6f1992a7d6
Turn 'useless #[deprecated]' error into a lint.
2020-11-01 20:48:58 +01:00
Mara Bos
706bc33651
Use the right span for errors about #[deprecated] attributes.
2020-11-01 20:48:58 +01:00
Mara Bos
0e2337a5d6
Deny #[deprecated] on trait impl blocks.
...
They have no effect there, but were silently accepted.
2020-11-01 20:48:58 +01:00
Ralf Jung
6a32e794c2
stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union'
2020-10-16 11:33:33 +02:00
Jonas Schievink
9f086fcb00
Rollup merge of #77203 - ecstatic-morse:const-stability-attr-checks, r=oli-obk
...
Check for missing const-stability attributes in `rustc_passes`
Currently, this happens as a side effect of `is_min_const_fn`, which is non-obvious. Also adds a test for this case, since we didn't seem to have one before.
2020-09-27 18:37:21 +02:00
Dylan MacKenzie
61d86fa06c
Check for missing const-stability attributes in stability
...
This used to happen as a side-effect of `is_min_const_fn`, which was
subtle.
2020-09-25 14:31:32 -07:00
Jacob Hughes
3f1b4b39e3
Fix compilation & test failures
2020-09-22 22:54:52 -04:00
Avi Dessauer
2793da3f39
Update src/librustc_passes/stability.rs
...
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:38 -04:00
Avi Dessauer
41eec9065a
Update src/librustc_passes/stability.rs
...
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:29 -04:00
Avi Dessauer
19e90843a4
Add documentation
2020-09-22 21:55:23 -04:00
Avi Dessauer
a7a2086053
Stability annotations on generic trait parameters
2020-09-22 21:53:48 -04:00
Mara Bos
14cc17759d
Improve ineffective_unstable_trait_impl
error message.
2020-09-11 21:42:28 +02:00
Mara Bos
89fb34fea7
Turn unstable trait impl error into a lint, so it can be disabled.
2020-09-11 13:36:42 +02:00
Mara Bos
e5c645f40e
Turn useless #[unstable] attributes into errors.
2020-09-11 13:36:15 +02:00
Mara Bos
1854f8b3d8
Warn for #[unstable] on trait impls when it has no effect.
2020-09-11 13:36:15 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00