summary refs log tree commit diff
path: root/compiler/rustc_middle/src/middle
AgeCommit message (Collapse)AuthorLines
2021-06-19Revert "Allow specifying alignment for functions"Mark Rousskov-4/+0
This reverts commit 448d07683a6defd567996114793a09c9a8aef5df.
2021-06-10Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011bors-1/+0
Drop metadata_encoding_version. Part of #85153 r? `@Aaron1011`
2021-06-07Revert "Merge CrateDisambiguator into StableCrateId"bjorn3-4/+4
This reverts commit d0ec85d3fb6d322496cb8f4bc1c21e19f23284ad.
2021-06-04Add first cut of functionality for #58713: support for #[link(kind = ↵Richard Cobbe-0/+7
"raw-dylib")]. This does not yet support #[link_name] attributes on functions, the #[link_ordinal] attribute, #[link(kind = "raw-dylib")] on extern blocks in bin crates, or stdcall functions on 32-bit x86.
2021-06-02Restrict access to crate_name.Camille GILLOT-1/+1
Also remove original_crate_name, which had the exact same implementation
2021-06-01Drop metadata_encoding_version.Camille GILLOT-1/+0
2021-06-01Make is_private_dep a query.Camille GILLOT-1/+0
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-2/+4
2021-05-30Drop metadata_encoding_version.Camille GILLOT-1/+0
2021-05-30Make is_private_dep a query.Camille GILLOT-1/+0
2021-05-30Restrict access to crate_name.Camille GILLOT-1/+1
Also remove original_crate_name, which had the exact same implementation
2021-05-30Make resolutions a query.Camille GILLOT-1/+1
2021-05-30Merge CrateDisambiguator into StableCrateIdbjorn3-4/+4
2021-05-12Use () for analysis.Camille GILLOT-1/+1
2021-05-12Rollup merge of #85018 - hi-rustin:rustin-patch-84637, r=estebankYuki Okushi-4/+18
shrinking the deprecated method span close https://github.com/rust-lang/rust/issues/84637
2021-05-11improve diagnosts for GATsb-naber-0/+14
2021-05-08Address commentshi-rustin-4/+1
2021-05-07shrinking the deprecated method spanhi-rustin-4/+21
2021-05-05Implement RFC 2951: Native link modifiersLuqman Aden-0/+1
This commit implements both the native linking modifiers infrastructure as well as an initial attempt at the individual modifiers from the RFC. It also introduces a feature flag for the general syntax along with individual feature flags for each modifier.
2021-04-27Derived Eq no longer shows uncoveredRich Kadel-0/+4
The Eq trait has a special hidden function. MIR `InstrumentCoverage` would add this function to the coverage map, but it is never called, so the `Eq` trait would always appear uncovered. Fixes: #83601 The fix required creating a new function attribute `no_coverage` to mark functions that should be ignored by `InstrumentCoverage` and the coverage `mapgen` (during codegen). While testing, I also noticed two other issues: * spanview debug file output ICEd on a function with no body. The workaround for this is included in this PR. * `assert_*!()` macro coverage can appear covered if followed by another `assert_*!()` macro. Normally they appear uncovered. I submitted a new Issue #84561, and added a coverage test to demonstrate this issue.
2021-04-25Rollup merge of #83519 - oli-obk:assign_shrink_your_normal_code, r=pnkfelixYuki Okushi-5/+10
Implement a lint that highlights all moves larger than a configured limit Tracking issue: #83518 [MCP 420](https://github.com/rust-lang/compiler-team/issues/420) still ~blazing~ in progress r? ```@pnkfelix``` The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
2021-04-20Add an attribute to be able to configure the limitOli Scherer-5/+10
2021-04-19Remove closure_treeCameron Steffen-31/+0
2021-04-06Auto merge of #81234 - repnop:fn-alignment, r=lcnrbors-0/+4
Allow specifying alignment for functions Fixes #75072 This allows the user to specify alignment for functions, which can be useful for low level work where functions need to necessarily be aligned to a specific value. I believe the error cases not covered in the match are caught earlier based on my testing so I had them just return `None`.
2021-04-05Allow specifying alignment for functionsWesley Norris-0/+4
2021-04-03Move SanitizerSet to rustc_targetSimonas Kazlauskas-1/+1
2021-03-31Add var to BoundRegion. Add query to get bound vars for applicable items.Jack Huey-0/+2
2021-03-31Make late and late_anon regions track the bound var positionJack Huey-2/+7
2021-03-27Remove (lots of) dead codeJoshua Nelson-6/+2
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-24resolve late lifetimes by itemJack Huey-5/+0
This reverts commit 22ae20733515d710c1134600bc1e29cdd76f6b9b.
2021-01-16Enforce that query results implement DebugAaron Hill-6/+6
2020-12-23Rollup merge of #80302 - pierwill:fix-80287, r=lcnrGuillaume Gomez-4/+2
docs: Update rustc_middle::middle::region::ScopeTree Correct return type in docs for [`yield_in_source`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/middle/region/struct.ScopeTree.html#method.yield_in_scope) method. Closes #80287.
2020-12-22docs: Update rustc_middle::middle::region::ScopeTreepierwill-4/+2
This corrects the return type in docs for yield_in_source method. Closes #80287.
2020-12-21docs: Edit rustc_middle::middle::privacypierwill-4/+6
Add descriptions of `AccessLevel` and `AccessLevels`. Add missing punctuation.
2020-12-16Allow `since="TBD"` for rustc_deprecatedbstrie-35/+40
2020-12-03rustc_metadata: Remove some dead codeVadim Petrochenkov-2/+0
2020-12-01Rollup merge of #79509 - GuillaumeGomez:improve-attr-spans, r=oli-obkGuillaume Gomez-2/+1
Improve attribute message error spans I got the idea while working on https://github.com/rust-lang/rust/pull/79464
2020-12-01Created NestedMetaItem::name_value_literal_span methodGuillaume Gomez-2/+1
2020-11-25Lazy DefPath decoding for incremental compilationAaron Hill-0/+6
2020-11-12stability: More precise location for deprecation lint on macrosVadim Petrochenkov-2/+3
2020-11-09Rollup merge of #77640 - ethanboxx:int_error_matching_attempt_2, r=KodrAusDylan DPC-2/+4
Refactor IntErrorKind to avoid "underflow" terminology This PR is a continuation of #76455 # Changes - `Overflow` renamed to `PosOverflow` and `Underflow` renamed to `NegOverflow` after discussion in #76455 - Changed some of the parsing code to return `InvalidDigit` rather than `Empty` for strings "+" and "-". https://users.rust-lang.org/t/misleading-error-in-str-parse-for-int-types/49178 - Carry the problem `char` with the `InvalidDigit` variant. - Necessary changes were made to the compiler as it depends on `int_error_matching`. - Redid tests to match on specific errors. r? ```@KodrAus```
2020-11-04fix a couple of clippy warnings:Matthias Krüger-1/+1
filter_next manual_strip redundant_static_lifetimes single_char_pattern unnecessary_cast unused_unit op_ref redundant_closure useless_conversion
2020-10-26Fix typoEthan Brierley-1/+1
2020-10-26Apply suggested changesEthan Brierley-2/+4
2020-10-24Compute proper module parent during resolutionAaron Hill-0/+2
Fixes #75982 The direct parent of a module may not be a module (e.g. `const _: () = { #[path = "foo.rs"] mod foo; };`). To find the parent of a module for purposes of resolution, we need to walk up the tree until we hit a module or a crate root.
2020-10-23Rollup merge of #78098 - camelid:fixup-docs, r=steveklabnikYuki Okushi-11/+11
Clean up and improve some docs * compiler docs * Don't format list as part of a code block * Clean up some other formatting * rustdoc book * Update CommonMark spec version to latest (0.28 -> 0.29) * Clean up some various wording and formatting
2020-10-21Clean up and improve some docsCamelid-11/+11
* compiler docs * Don't format list as part of a code block * Clean up some other formatting * rustdoc book * Update CommonMark spec version to latest (0.28 -> 0.29) * Clean up some various wording and formatting
2020-10-19Calculate visibilities once in resolveVadim Petrochenkov-17/+5
Then use them through a query based on resolver outputs
2020-10-14Remove unused code from rustc_middleest31-5/+0
2020-10-14documentation fixDing Xiang Fei-3/+7