about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/middle
AgeCommit message (Collapse)AuthorLines
2021-07-27Rollup merge of #86450 - tmiasko:move-size-limit, r=pnkfelixYuki Okushi-1/+6
Add flag to configure `large_assignments` lint The `large_assignments` lints detects moves over specified limit. The limit is configured through `move_size_limit = "N"` attribute placed at the root of a crate. When attribute is absent, the lint is disabled. Make it possible to enable the lint without making any changes to the source code, through a new flag `-Zmove-size-limit=N`. For example, to detect moves exceeding 1023 bytes in a cargo crate, including all dependencies one could use: ``` $ env RUSTFLAGS=-Zmove-size-limit=1024 cargo build -vv ``` Lint tracking issue #83518.
2021-07-18Rollup merge of #87092 - ricobbe:fix-raw-dylib-multiple-definitions, ↵Yuki Okushi-3/+3
r=petrochenkov Remove nondeterminism in multiple-definitions test Compare all fields in `DllImport` when sorting to avoid nondeterminism in the error for multiple inconsistent definitions of an extern function. Restore the multiple-definitions test. Resolves #87084.
2021-07-17Encode ExpnId using ExpnHash for incr. comp.Camille GILLOT-3/+2
2021-07-17Make the CrateNum part of the ExpnId.Camille GILLOT-2/+4
2021-07-16Consider all fields when comparing DllImports, to remove nondetermininsm in ↵Richard Cobbe-3/+3
multiple-definitions test
2021-07-14Shrink the CrateStore dynamic interface.Camille GILLOT-13/+10
2021-07-12Auto merge of #86320 - hi-rustin:rustin-patch-fix-span, r=estebankbors-4/+5
shrinking the deprecated span ref: https://github.com/rust-lang/rust/pull/85617#issuecomment-854947988 part of #85403 r? `@estebank` The reason is that if we use method_span directly, it will cause the in_derive_expansion judgment to fail.
2021-07-11Auto merge of #85941 - cjgillot:qresolve, r=Aaron1011bors-1/+1
Reduce the amount of untracked state in TyCtxt -- Take 2 Main part of #85153 The offending line (https://github.com/rust-lang/rust/pull/85153#discussion_r642866298) is replaced by a FIXME until the possible bug and the perf concern are both resolved. r? `@Aaron1011`
2021-07-09Add support for raw-dylib with stdcall, fastcall functions on ↵Richard Cobbe-1/+20
i686-pc-windows-msvc.
2021-07-07Auto merge of #86105 - bjorn3:link_info_refactor, r=petrochenkovbors-27/+0
Refactor the generation of the metadata for linking
2021-07-07Remove a sorting operation from used_cratesbjorn3-27/+0
2021-07-06Make resolutions a query.Camille GILLOT-1/+1
2021-07-06Add flag to configure `large_assignments` lintTomasz Miąsko-1/+6
The `large_assignments` lints detects moves over specified limit. The limit is configured through `move_size_limit = "N"` attribute placed at the root of a crate. When attribute is absent, the lint is disabled. Make it possible to enable the lint without making any changes to the source code, through a new flag `-Zmove-size-limit=N`. For example, to detect moves exceeding 1023 bytes in a cargo crate, including all dependencies one could use: ``` $ env RUSTFLAGS=-Zmove-size-limit=1024 cargo build -vv ```
2021-07-06Revert "Revert "Merge CrateDisambiguator into StableCrateId""bjorn3-4/+4
This reverts commit 8176ab8bc18fdd7d3c2cf7f720c51166364c33a3.
2021-07-05Auto merge of #86877 - bjorn3:remove_lib_source, r=petrochenkovbors-38/+3
Remove LibSource The information is stored in used_crate_source too anyway. Split out of #86105 r? `@petrochenkov`
2021-07-05Remove LibSourcebjorn3-38/+3
The information is stored in used_crate_source too anyway
2021-07-04Combine individual limit queries into single `limits` queryAaron Hill-8/+17
2021-07-04Query-ify global limit attribute handlingAaron Hill-20/+23
2021-07-01Rename all_crate_nums query to crates and remove useless wrapperbjorn3-1/+1
2021-06-20Implement the query in cstore_impl.Camille GILLOT-2/+0
2021-06-15better codehi-rustin-3/+3
2021-06-15shrinking the deprecated method spanhi-rustin-3/+4
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.