summary refs log tree commit diff
path: root/compiler/rustc_middle/src
AgeCommit message (Collapse)AuthorLines
2021-07-23Encode SourceFile source crate as StableCrateId in incr. comp. OnDiskCache.Michael Woerister-5/+33
2021-07-23Access stable_crate_id directly.Camille GILLOT-2/+7
2021-07-23Do not store crate in latest_foreign_def_path_hashes.Camille GILLOT-7/+0
2021-07-23Encode CrateNum using the StableCrateId for incr. comp.Camille GILLOT-67/+38
2021-07-22rename assert_matches moduleJane Lusby-1/+1
2021-07-22Move [debug_]assert_matches to mod {core, std}::assert.Mara Bos-0/+1
2021-06-19Revert "Allow specifying alignment for functions"Mark Rousskov-4/+0
This reverts commit 448d07683a6defd567996114793a09c9a8aef5df.
2021-06-12Rollup merge of #86189 - JohnTitor:relate-fn-pub, r=Aaron1011Yuki Okushi-1/+1
Make `relate_type_and_mut` public #85343 improved diagnostics around `Relate` impls but made `relate_type_and_mut` private, which was accessible as `relate` previously. This makes it public so that we can use it on rust-semverver. r? ```@Aaron1011```
2021-06-12Rollup merge of #85800 - BoxyUwU:const-param-default-diagnostics, r=oli-obkYuki Okushi-1/+1
Fix some diagnostic issues with const_generics_defaults feature gate This PR makes a few changes: - print out const param defaults in "lifetime ordering" errors rather than discarding them - update `is_simple_text` to account for const params when checking if a type has no generics, this was causing a note to be failed to add to an error message - fixes some diagnostic wording that incorrectly said there was ordering restrictions between type/const params despite the `const_generics_defaults` feature gate is active
2021-06-10Make `relate_type_and_mut` publicYuki Okushi-1/+1
2021-06-10Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011bors-5/+0
Drop metadata_encoding_version. Part of #85153 r? `@Aaron1011`
2021-06-09Auto merge of #86150 - cjgillot:notable, r=michaelwoeristerbors-21/+3
Do not require the DefPathTable to construct the on-disk cache. r? `@michaelwoerister`
2021-06-09Auto merge of #86118 - spastorino:tait-soundness-bug, r=nikomatsakisbors-15/+13
Create different inference variables for different defining uses of TAITs Fixes #73481 r? `@nikomatsakis` cc `@oli-obk`
2021-06-08Do not require the DefPathTable to construct the on-disk cache.Camille GILLOT-21/+3
2021-06-08use non_erasable_genericsEllen-1/+1
2021-06-07Remove ResolvedOpaqueTy and just use Ty, SubstsRef is already thereSantiago Pastorino-14/+3
2021-06-07Make OpaqueTypeKey the key of opaque types mapSantiago Pastorino-2/+10
2021-06-07Change concrete opaque type to be a `VecMap`Santiago Pastorino-3/+4
2021-06-07Auto merge of #85891 - bjorn3:revert_merge_crate_disambiguator, ↵bors-35/+40
r=Mark-Simulacrum Revert "Merge CrateDisambiguator into StableCrateId" This reverts https://github.com/rust-lang/rust/pull/85804
2021-06-07Revert "Merge CrateDisambiguator into StableCrateId"bjorn3-35/+40
This reverts commit d0ec85d3fb6d322496cb8f4bc1c21e19f23284ad.
2021-06-07Rollup merge of #84262 - camelid:sized-ice, r=estebankYuki Okushi-1/+8
Fix ICE during type layout when there's a `[type error]` Fixes #84108. Based on estebank's [comment], except I used `delay_span_bug` because it should work in more cases, and I think it expresses its intent more clearly. r? `@estebank` [comment]: https://github.com/rust-lang/rust/issues/84108#issuecomment-818916848
2021-06-06Add variance-related information to lifetime error messagesAaron Hill-29/+111
2021-06-06Auto merge of #84171 - ricobbe:raw-dylib-via-llvm, r=petrochenkovbors-0/+7
Partial support for raw-dylib linkage First cut of functionality for issue #58713: add support for `#[link(kind = "raw-dylib")]` on `extern` blocks in lib crates compiled to .rlib files. Does not yet support `#[link_name]` attributes on functions, or the `#[link_ordinal]` attribute, or `#[link(kind = "raw-dylib")]` on `extern` blocks in bin crates; I intend to publish subsequent PRs to fill those gaps. It's also not yet clear whether this works for functions in `extern "stdcall"` blocks; I also intend to investigate that shortly and make any necessary changes as a follow-on PR. This implementation calls out to an LLVM function to construct the actual `.idata` sections as temporary `.lib` files on disk and then links those into the generated .rlib.
2021-06-05Auto merge of #86002 - cjgillot:expn_that_defined, r=petrochenkovbors-15/+8
Always go through the expn_that_defined query.
2021-06-05Update compiler/rustc_middle/src/query/mod.rsCamille Gillot-1/+0
2021-06-05Auto merge of #85919 - workingjubilee:simd-ptrs-are-valid, r=petrochenkovbors-5/+0
Allow raw pointers in SIMD types Closes #85915 by loosening the strictness in typechecking and adding a test to guarantee it passes. This still might be too strict, as references currently do pass monomorphization, but my understanding is that they are not guaranteed to be "scalar" in the same way.
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-04Always go through the expn_that_defined query.Camille GILLOT-14/+8
2021-06-04Auto merge of #85788 - rylev:force-warns, r=nikomatsakisbors-4/+26
Support for force-warns Implements https://github.com/rust-lang/rust/issues/85512. This PR adds a new command line option `force-warns` which will force the provided lints to warn even if they are allowed by some other mechanism such as `#![allow(warnings)]`. Some remaining issues: * https://github.com/rust-lang/rust/issues/85512 mentions that `force-warns` should also be capable of taking lint groups instead of individual lints. This is not implemented. * If a lint has a higher warning level than `warn`, this will cause that lint to warn instead. We probably want to allow the lint to error if it is set to a higher lint and is not allowed somewhere else. * One test is currently ignored because it's not working - when a deny-by-default lint is allowed, it does not currently warn under `force-warns`. I'm not sure why, but I wanted to get this in before the weekend. r? `@nikomatsakis`
2021-06-04Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514Yuki Okushi-2/+0
Remove unused feature gates The first commit removes a usage of a feature gate, but I don't expect it to be controversial as the feature gate was only used to workaround a limitation of rust in the past. (closures never being `Clone`) The second commit uses `#[allow_internal_unstable]` to avoid leaking the `trusted_step` feature gate usage from inside the index newtype macro. It didn't work for the `min_specialization` feature gate though. The third commit removes (almost) all feature gates from the compiler that weren't used anyway.
2021-06-03Rollup merge of #85934 - tmiasko:is-union, r=jackh726Yuki Okushi-4/+6
Add `Ty::is_union` predicate
2021-06-03Rollup merge of #85911 - cjgillot:one-output, r=Aaron1011Yuki Okushi-2/+2
Avoid a clone of output_filenames. Part of #85153
2021-06-02Inline is_machine into check_simdJubilee Young-8/+0
2021-06-02Restrict access to crate_name.Camille GILLOT-9/+5
Also remove original_crate_name, which had the exact same implementation
2021-06-02Add a page on force-warns in unstable bookRyan Levick-1/+1
2021-06-02Add `Ty::is_union` predicate and use itTomasz Miąsko-0/+5
2021-06-02Implement `Ty::is_enum` using `matches!`Tomasz Miąsko-4/+1
2021-06-02Force warn on lint groups as wellRyan Levick-2/+2
2021-06-02Auto merge of #85892 - tmiasko:i, r=oli-obkbors-0/+16
Miscellaneous inlining improvements
2021-06-02Auto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011bors-8/+7
Make is_private_dep a query. Part of #85153 r? `@Aaron1011`
2021-06-02Miscellaneous inlining improvementsTomasz Miąsko-0/+16
2021-06-02Auto merge of #85905 - cjgillot:one-trait-map, r=Aaron1011bors-18/+7
Only compute the trait map once Part of #85153 r? `@Aaron1011`
2021-06-01Allow raw pointers in SIMD typesJubilee Young-1/+4
2021-06-01Auto merge of #85829 - bjorn3:simplify_crate_num, r=jackh726bors-3/+2
Remove CrateNum::ReservedForIncrCompCache It's only use is easily replaceable with `Option<CrateNum>`.
2021-06-01Avoid a clone of output_filenames.Camille GILLOT-2/+2
2021-06-01Drop metadata_encoding_version.Camille GILLOT-5/+0
2021-06-01Make is_private_dep a query.Camille GILLOT-8/+7
2021-06-01Remove StableVec.Camille GILLOT-5/+6
2021-06-01Only compute the trait_map once.Camille GILLOT-13/+1
2021-06-01Fix issues and add testRyan Levick-1/+0