about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
AgeCommit message (Collapse)AuthorLines
2021-12-15Auto merge of #86986 - lcnr:simplify_type, r=nikomatsakis,oli-obkbors-18/+62
extend `simplify_type` might cause a slight perf inprovement and imo more accurately represents what types there are. considering that I was going to use this in #85048 it seems like we might need this in the future anyways :shrug:
2021-12-15Remove `in_band_lifetimes` from `rustc_trait_selection`Sylvan Bowdler-50/+60
2021-12-15Rollup merge of #91880 - matthiaskrgr:clippy_perf_dec, r=jyn514Matthias Krüger-1/+1
fix clippy::single_char_pattern perf findings
2021-12-15Remove unnecessary sigils around `Symbol::as_str()` calls.Nicholas Nethercote-2/+2
2021-12-14fmtlcnr-2/+1
2021-12-14add some commentslcnr-0/+8
2021-12-14extend `simplify_type`lcnr-17/+54
2021-12-14fix clippy::single_char_pattern perf findingsMatthias Krüger-1/+1
2021-12-13review comment: change wording of suggestionEsteban Kuber-1/+1
2021-12-13review commentsEsteban Kuber-8/+20
2021-12-13Simplify diagnostic logicEsteban Kuber-123/+44
The spans no longer overlap, so we no longer need to specialize the output depending on whether they would.
2021-12-13Fix rebase and clippy testsEsteban Kuber-38/+40
2021-12-13Keep info on pre-desugaring expression for better "incorrect `.await`" ↵Esteban Kuber-2/+36
suggestion Keep the `HirId` of `.await`ed expressions so in the case of a `fn` call on on a sync `fn`, we can suggest maybe turning it into an `async fn`.
2021-12-13Reduce verbosity for `?` on non-`Try` expressionsEsteban Kuber-0/+1
2021-12-13Reduce verbosity when calling `for`-loop on non-`Iterator` expressionEsteban Kuber-2/+5
2021-12-13When `.await` is called on a non-`Future` expression, suggest removalEsteban Kuber-0/+27
Keep track of the origin of a `T: Future` obligation when caused by an `.await` expression. Address #66731.
2021-12-12Auto merge of #91549 - fee1-dead:const_env, r=spastorinobors-234/+180
Eliminate ConstnessAnd again Closes #91489. Closes #89432. Reverts #91491. Reverts #89450. r? `@spastorino`
2021-12-12Auto merge of #90423 - Aaron1011:deduplicate-projection, r=jackh726bors-0/+6
Deduplicate projection sub-obligations
2021-12-12Remap more env constness for queriesDeadbeef-18/+17
2021-12-12Remap predicate/env constness before queryingDeadbeef-4/+24
2021-12-12Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk"Deadbeef-229/+156
This reverts commit ff2439b7b9bafcfdff86b7847128014699df8442, reversing changes made to 2a9e0831d6603d87220cedd1b1293e2eb82ef55c.
2021-12-11Tweak assoc type obligation spansEsteban Kuber-3/+63
* Point at RHS of associated type in obligation span * Point at `impl` assoc type on projection error * Reduce verbosity of recursive obligations * Point at source of binding lifetime obligation * Tweak "required bound" note * Tweak "expected... found opaque (return) type" labels * Point at set type in impl assoc type WF errors
2021-12-10Rollup merge of #91625 - est31:remove_indexes, r=oli-obkMatthias Krüger-3/+3
Remove redundant [..]s
2021-12-09Remove redundant [..]sest31-3/+3
2021-12-08Use Vec extend instead of repeated pushes in several placesJakub Beránek-6/+2
2021-12-05Auto merge of #91555 - matthiaskrgr:rollup-pq0iaq7, r=matthiaskrgrbors-5/+17
Rollup of 4 pull requests Successful merges: - #90529 (Skip reborrows in AbstractConstBuilder) - #91437 (Pretty print empty blocks as {}) - #91450 (Don't suggest types whose inner type is erroneous) - #91535 (Stabilize `-Z emit-future-incompat` as `--json future-incompat`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-12-05Rollup merge of #90529 - b-naber:reborrows-consts, r=lcnrMatthias Krüger-5/+17
Skip reborrows in AbstractConstBuilder Fixes https://github.com/rust-lang/rust/issues/90455 Temporary fix to prevent confusing diagnostics that refer to implicit borrows and derefs until we allow borrows and derefs on constant expressions. r? `@oli-obk`
2021-12-05skip reborrows during AbstractConst buildingb-naber-5/+17
2021-12-04Use IntoIterator for array impl everywhere.Mara Bos-6/+2
2021-12-04Rollup merge of #90519 - estebank:issue-84003, r=petrochenkovMatthias Krüger-3/+3
Keep spans for generics in `#[derive(_)]` desugaring Keep the spans for generics coming from a `derive`d Item, so that errors and suggestions have better detail. Fix #84003.
2021-12-03Annotate `derive`d spans and move span suggestion codeEsteban Kuber-3/+3
* Annotate `derive`d spans from the user's code with the appropciate context * Add `Span::can_be_used_for_suggestion` to query if the underlying span at the users' code
2021-12-03Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"Santiago Pastorino-156/+229
This reverts commit 18bb8c61a975fff6424cda831ace5b0404277145, reversing changes made to d9baa361902b172be716f96619b909f340802dea.
2021-12-02Auto merge of #91469 - matthiaskrgr:rollup-xom3j55, r=matthiaskrgrbors-1/+5
Rollup of 12 pull requests Successful merges: - #89954 (Fix legacy_const_generic doc arguments display) - #91321 (Handle placeholder regions in NLL type outlive constraints) - #91329 (Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives`) - #91364 (Improve error message for incorrect field accesses through raw pointers) - #91387 (Clarify and tidy up explanation of E0038) - #91410 (Move `#![feature(const_precise_live_drops)]` checks earlier in the pipeline) - #91435 (Improve diagnostic for missing half of binary operator in `if` condition) - #91444 (disable tests in Miri that take too long) - #91457 (Add additional test from rust issue number 91068) - #91460 (Document how `last_os_error` should be used) - #91464 (Document file path case sensitivity) - #91466 (Improve the comments in `Symbol::interner`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-12-02Rollup merge of #91329 - Aaron1011:modulo-regions-test, r=jackh726Matthias Krüger-1/+5
Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives` A global predicate is not guarnatenteed to outlive all regions. If the predicate involves late-bound regions, then it may fail to outlive other regions (e.g. `for<'b> &'b bool: 'static` does not hold) We now only produce `EvaluatedToOk` when a global predicate has no late-bound regions - in that case, the ony region that can be present in the type is 'static
2021-12-02Auto merge of #91318 - eggyal:reduce-boilerplate-around-infallible-folders, ↵bors-88/+76
r=jackh726 Reduce boilerplate around infallible folders Further to https://github.com/rust-lang/rust/pull/91230#issuecomment-981059666 r? `@jackh726`
2021-12-02Rename TypeFolderFallible to FallibleTypeFolderAlan Egerton-2/+2
2021-12-02Reduce boilerplate around infallible foldersAlan Egerton-88/+76
2021-12-02Auto merge of #91455 - matthiaskrgr:rollup-gix2hy6, r=matthiaskrgrbors-3/+1
Rollup of 4 iffy pull requests Successful merges: - #89234 (Disallow non-c-like but "fieldless" ADTs from being casted to integer if they use arbitrary enum discriminant) - #91045 (Issue 90702 fix: Stop treating some crate loading failures as fatal errors) - #91394 (Bump stage0 compiler) - #91411 (Enable svh tests on msvc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-12-02Rollup merge of #91394 - Mark-Simulacrum:bump-stage0, r=pietroalbiniMatthias Krüger-3/+1
Bump stage0 compiler r? `@pietroalbini` (or anyone else)
2021-12-02Auto merge of #91354 - fee1-dead:const_env, r=spastorinobors-230/+156
Cleanup: Eliminate ConstnessAnd This is almost a behaviour-free change and purely a refactoring. "almost" because we appear to be using the wrong ParamEnv somewhere already, and this is now exposed by failing a test using the unstable `~const` feature. We most definitely need to review all `without_const` and at some point should probably get rid of many of them by using `TraitPredicate` instead of `TraitRef`. This is a continuation of https://github.com/rust-lang/rust/pull/90274. r? `@oli-obk` cc `@spastorino` `@ecstatic-morse`
2021-12-01TODO => FIXMEDeadbeef-1/+1
2021-12-01Cache with consistent env and boundDeadbeef-8/+18
2021-12-01Rollup merge of #90985 - camsteffen:diag-name-usage, r=jackh726Matthias Krüger-6/+6
Use `get_diagnostic_name` more
2021-11-30re-format with new rustfmtMark Rousskov-3/+1
2021-11-29Reformat everythingDeadbeef-4/+1
2021-11-29Completely remove ConstnessAndOli Scherer-10/+9
2021-11-29Avoid storing the ImplPolarity and Constness next to a TraitRef and use ↵Oli Scherer-43/+51
TraitPredicate instead
2021-11-29Replace `ConstnessAnd<TraitRef>` with `TraitPredicate` which conveys the ↵Oli Scherer-65/+44
same information
2021-11-29Prefer TraitPredicate over ConstnessAnd<TraitRef>Oli Scherer-24/+9
2021-11-29Use the constness from the param env instead of having a separate dimension ↵Oli Scherer-75/+4
for it This breaks a ~const test that will be fixed in a follow up commit of this PR