about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
AgeCommit message (Collapse)AuthorLines
2022-12-25Only enable relative span hashing on nightly.Camille GILLOT-1/+1
2022-12-25Enable relative span hashing.Camille GILLOT-1/+1
2022-12-25fix more clippy::style findingsMatthias Krüger-7/+5
match_result_ok obfuscated_if_else single_char_add writeln_empty_string collapsible_match iter_cloned_collect unnecessary_mut_passed
2022-12-24Rename some compare_method functionsMichael Goulet-1/+1
2022-12-24Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholkMatthias Krüger-74/+57
rustc: Remove needless lifetimes
2022-12-23Auto merge of #106087 - Nilstrieb:rollup-2m3nies, r=Nilstriebbors-17/+53
Rollup of 6 pull requests Successful merges: - #105661 (implement the skeleton of the updated trait solver) - #105853 (Make the pre-push script work on directories with spaces) - #106043 (Move tests) - #106048 (Run `tidy` in its own job in PR CI) - #106055 (Check arg expressions properly on error in `confirm_builtin_call`) - #106067 (A few metadata nits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-23Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errorsnils-17/+53
implement the skeleton of the updated trait solver cc ```@rust-lang/initiative-trait-system-refactor``` This is mostly following the architecture discussed in the types team meetup. After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible. This somewhat closely mirrors the current `evaluate` implementation with the following notable differences: - it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive) - it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful) - it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality) - it is implemented to work with lazy normalization A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work. r? ```@compiler-errors``` / ```@rust-lang/types``` :3
2022-12-23Auto merge of #105550 - gimbles:master, r=Nilstriebbors-11/+12
Use `DepKind` instead of `&'static str` in `QueryStackFrame` `@rustbot` author Fixes #105168
2022-12-23Use DepKind instead of &strgimbles-11/+12
2022-12-23Rollup merge of #106057 - jyn514:trimmed-def-paths-ice, r=compiler-errorsMatthias Krüger-1/+7
Give a more helpful error for "trimmed_def_paths constructed" cc https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/ice.20debugging/near/315928294, https://github.com/rust-lang/rust/pull/106056 `@mejrs` do you think this would have helped you figure out the problem faster?
2022-12-22Give a more helpful error for "trimmed_def_paths construted"Joshua Nelson-1/+7
2022-12-22Auto merge of #103957 - JakobDegen:drop-retag, r=RalfJungbors-8/+7
Retag as FnEntry on `drop_in_place` This commit changes the mir drop shim to always retag its argument as if it were a `&mut`. cc rust-lang/unsafe-code-guidelines#373
2022-12-21Don't run `Drop` terminators on types that do not have drop glue in const evalJakob Degen-8/+7
2022-12-22Rollup merge of #106012 - JakobDegen:retag-raw, r=RalfJungMatthias Krüger-2/+4
Clarify that raw retags are not permitted in Mir Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir. cc rust-lang/miri#2735 r? `@RalfJung`
2022-12-22Rollup merge of #105960 - oli-obk:effect_cleanup, r=fee1-deadMatthias Krüger-25/+15
Various cleanups This PR pulls changes out of https://github.com/rust-lang/rust/pull/101900 that can land on master immediately r? ``@fee1-dead``
2022-12-21Forbid `RetagKind::TwoPhase` as wellJakob Degen-2/+1
2022-12-21Clarify that raw retags are not permitted in MirJakob Degen-2/+5
2022-12-20Rollup merge of #105973 - oli-obk:simplify_callee_checks, r=jackh726Matthias Krüger-0/+4
Avoid going through the happy path in case of non-fn builtin calls No functional change, just doing an early return. The removed comment is not applicable anymore, not every node needs type bindings in the error case. At best this would have been needed to avoid ICEs, but afaict this can't happen anymore today, as we do fallible checks.
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-74/+57
2022-12-20Some ICE debugging aidsOli Scherer-1/+1
2022-12-20tracing: make flag checking less noisyOli Scherer-14/+4
2022-12-20Some track_caller additionsOli Scherer-0/+8
2022-12-20Some hir cleanupsOli Scherer-2/+2
2022-12-20Remove an unused functionOli Scherer-8/+0
2022-12-20use `track_caller` to show where the panic is actually fromOli Scherer-0/+4
2022-12-20Some tracing cleanupsOli Scherer-4/+3
2022-12-20Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obkbors-63/+47
Improve syntax of `newtype_index` This makes it more like proper Rust and also makes the implementation a lot simpler. Mostly just turns weird flags in the body into proper attributes. It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
2022-12-19Auto merge of #105905 - lqd:revert-103880, r=jackh726bors-45/+13
Revert #103880 "Use non-ascribed type as field's type in mir" This PR prepares a revert for #103880 to fix #105809, #105881, #105886 and others (like the duplicates of the first one), in case an actual fix can't get done today. I've also added the MCVE from #105809. There is no MCVE for the #105881 and #105886 ICEs yet however, so there are no tests for them here, although we'll need one before relanding the original changes. Were this PR to land, it would also reopen #96514 as it was fixed by the original PR. Opening as draft to allow time for a possible fix. r? `@jackh726`
2022-12-19Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorinobors-0/+7
Address some `EarlyBinder` nits
2022-12-19implement the skeleton of the updated trait solverlcnr-17/+53
2022-12-19Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"Rémy Rakic-45/+13
This reverts commit 03770f0e2b60c02db8fcf52fed5fb36aac70cedc, reversing changes made to 01ef4b21dc5251b58bd9c6fd6face2ae95d56da1.
2022-12-19Rollup merge of #105864 - matthiaskrgr:compl, r=NilstriebDylan DPC-6/+1
clippy::complexity fixes filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool r? `@compiler-errors`
2022-12-19clippy::complexity fixesMatthias Krüger-6/+1
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
2022-12-18Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=NilstriebMatthias Krüger-4/+4
use &str / String literals instead of format!()
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-25/+15
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Make `#[debug_format]` an attribute in `newtype_index`Nilstrieb-20/+14
This removes the `custom` format functionality as its only user was trivially migrated to using a normal format. If a new use case for a custom formatting impl pops up, you can add it back.
2022-12-18Make `#[max]` an attribute in `newtype_index`Nilstrieb-5/+5
2022-12-18Use `#[derive]` instead of custom syntax in all `newtype_index`Nilstrieb-13/+13
2022-12-18Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obkMatthias Krüger-4/+4
don't destuct references just to reborrow
2022-12-18don't restuct references just to reborrowMatthias Krüger-4/+4
2022-12-18avoid .into() conversion to identical typesMatthias Krüger-2/+2
2022-12-18use &str / String literals instead of format!()Matthias Krüger-4/+4
2022-12-17Rollup merge of #105770 - oli-obk:deref_all_the_things, r=compiler-errorsMatthias Krüger-16/+16
Rename ConstS to ConstData just a style nit to get it in sync with all the other interned datastructures
2022-12-17Rollup merge of #105493 - WaffleLapkin:unchoke-r-a, r=NilstriebMatthias Krüger-1/+105
Help rust-analyzer normalize query return types See [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/rustc.20query.20types.20are.20not.20normalized.20since.20recently/near/312686086), since https://github.com/rust-lang/rust/pull/103808, rust analyzer doesn't normalize return types of queries. This is because r-a doesn't support associated type defaults (yet). The easiest fix is to not use associated type defaults (duh), which this PR does. r? `@cjgillot`
2022-12-16Add a comment warning against using associated type defaults <3Maybe Waffle-0/+8
2022-12-16accept review suggestionTshepang Mbambo-1/+1
Co-authored-by: nils <48135649+Nilstrieb@users.noreply.github.com>
2022-12-16Auto merge of #103880 - b-naber:field-ty-mir, r=lcnrbors-13/+45
Use non-ascribed type as field's type in mir Fixes https://github.com/rust-lang/rust/issues/96514 r? `@lcnr`
2022-12-16Make a field only as public as it needs to beOli Scherer-1/+1
2022-12-16Rename ConstS to ConstDataOli Scherer-16/+16
2022-12-16Auto merge of #105717 - compiler-errors:anonymize, r=jackh726bors-30/+0
always use `anonymize_bound_vars` Unless this is perf-sensitive, it's probably best to always use one anonymize function that does the right thing for all bound vars. r? types