summary refs log tree commit diff
path: root/compiler/rustc_passes/src
AgeCommit message (Collapse)AuthorLines
2020-10-02Rollup merge of #76811 - GuillaumeGomez:doc-alias-name-restriction, ↵Jonas Schievink-7/+27
r=oli-obk,ollie27 Doc alias name restriction Fixes #76705.
2020-10-02Forbid some characters to be used as doc aliasGuillaume Gomez-7/+27
2020-10-01Rollup merge of #77343 - varkor:rustc_args_required_const-validation, r=lcnrDylan DPC-9/+101
Validate `rustc_args_required_const` Fixes https://github.com/rust-lang/rust/issues/74608.
2020-09-30Rollup merge of #77296 - tmiasko:liveness-option, r=ecstatic-morseJonas Schievink-40/+36
liveness: Use Option::None to represent absent live nodes No functional changes intended.
2020-09-30Validate `rustc_args_required_const`varkor-9/+101
2020-09-30liveness: Use Option::None to represent absent live nodesTomasz Miąsko-40/+36
No functional changes intended.
2020-09-29Liveness analysis for everybodyTomasz Miąsko-34/+28
Perform liveness analysis for every body instead of limiting it to fns.
2020-09-27liveness: Inline visitor implementation for IrMapsTomasz Miąsko-199/+175
2020-09-27liveness: Store upvars_mentioned inside Liveness structTomasz Miąsko-4/+6
2020-09-27liveness: Use visit_param to add variables corresponding to paramsTomasz Miąsko-15/+19
2020-09-27liveness: Use upvars instead of FnKind to check for closuresTomasz Miąsko-13/+10
Avoiding FnKind will make it easier to run liveness analysis on all bodies in the future, not just fn-like things.
2020-09-27liveness: Move body_owner field from IrMaps to LivenessTomasz Miąsko-18/+12
The Liveness struct is the only user of body_owner field. Move the field there.
2020-09-27Auto merge of #77229 - tmiasko:liveness, r=lcnrbors-121/+89
Small improvements in liveness pass * Remove redundant debug logging (`add_variable` already contains logging). * Remove redundant fields for a number of live nodes and variables. * Delay conversion from a symbol to a string until linting. * Inline contents of specials struct. * Remove unnecessary local variable exit_ln. * Use newtype_index for Variable and LiveNode. * Access live nodes directly through self.lnks[ln]. No functional changes intended (except those related to the logging).
2020-09-27Rollup merge of #77203 - ecstatic-morse:const-stability-attr-checks, r=oli-obkJonas Schievink-7/+31
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-27Auto merge of #77118 - exrook:stability-generic-parameters-2, r=varkorbors-26/+122
Stability annotations on generic parameters (take 2.5) Rebase of #72314 + more tests Implements rust-lang/wg-allocators#2.
2020-09-27liveness: Access live nodes directly through self.lnks[ln]Tomasz Miąsko-7/+3
2020-09-26liveness: Use newtype_index for Variable and LiveNodeTomasz Miąsko-66/+45
2020-09-26liveness: Remove unnecessary local variable exit_lnTomasz Miąsko-3/+2
2020-09-26liveness: Inline contents of specials structTomasz Miąsko-30/+25
2020-09-26liveness: Delay conversion from a symbol to a string until lintingTomasz Miąsko-5/+12
2020-09-26liveness: Remove redundant fields for a number of live nodes and variablesTomasz Miąsko-14/+8
2020-09-26liveness: Remove redundant debug loggingTomasz Miąsko-2/+0
The IrMaps::add_variable already contains debug logging. Don't duplicate it.
2020-09-25Address review commentmarmeladema-4/+4
2020-09-25Check for missing const-stability attributes in `stability`Dylan MacKenzie-7/+31
This used to happen as a side-effect of `is_min_const_fn`, which was subtle.
2020-09-25Rollup merge of #77073 - lcnr:ty-trait-param, r=matthewjasperJonas Schievink-1/+4
dead_code: look at trait impls even if they don't contain items fixes #70225
2020-09-23/nightly/nightly-rustcErik Hofmayer-1/+1
2020-09-23Updated html_root_url for compiler cratesErik Hofmayer-1/+1
2020-09-22Fix compilation & test failuresJacob Hughes-2/+8
2020-09-22Update src/librustc_passes/stability.rsAvi Dessauer-2/+1
Co-authored-by: varkor <github@varkor.com>
2020-09-22Update src/librustc_passes/stability.rsAvi Dessauer-2/+6
Co-authored-by: varkor <github@varkor.com>
2020-09-22Add documentationAvi Dessauer-33/+84
2020-09-22Stability annotations on generic trait parametersAvi Dessauer-16/+52
2020-09-22dead_code: look at trait impls even if they don't contain itemsBastian Kauschke-1/+4
2020-09-19transmute: use diagnostic itemBastian Kauschke-1/+13
2020-09-13allow concrete self types in constsBastian Kauschke-1/+1
2020-09-12Auto merge of #73461 - calebzulawski:validate-attribute-placement, ↵bors-14/+183
r=matthewjasper Validate built-in attribute placement Closes #54584, closes #47725, closes #54044. I've changed silently ignoring some incorrectly placed attributes to errors. I'm not sure what the policy is since this can theoretically break code (should they be warnings instead? does it warrant a crater run?).
2020-09-11Improve `ineffective_unstable_trait_impl` error message.Mara Bos-4/+4
2020-09-11Turn unstable trait impl error into a lint, so it can be disabled.Mara Bos-21/+28
2020-09-11Turn useless #[unstable] attributes into errors.Mara Bos-1/+1
2020-09-11Warn for #[unstable] on trait impls when it has no effect.Mara Bos-2/+64
2020-09-05Emit warnings on misplaced #[no_mangle]Caleb Zulawski-0/+23
2020-09-05Allow #[cold], #[track_caller] on closures. Fix whitespace in error messages.Caleb Zulawski-13/+13
2020-09-05Emit warnings for misplaced attributes used by some cratesCaleb Zulawski-53/+100
2020-09-05Check placement of more attributesCaleb Zulawski-6/+105
2020-09-05Auto merge of #75888 - GuillaumeGomez:trait-impl-assoc-const-doc-alias, ↵bors-1/+11
r=ollie27 Add check for doc alias on assoc const in trait impl Fixes #73721. r? @ollie27
2020-09-04Change ty.kind to a methodLeSeulArtichaut-10/+10
2020-09-03Add check for doc alias on associated const in trait implsGuillaume Gomez-1/+11
2020-08-30mv compiler to compiler/mark-0/+7554