Maybe Waffle
1d42936b18
Prefer doc comments over //-comments in compiler
2022-11-27 11:19:04 +00:00
lcnr
31431ccda9
move 2 candidates into builtin candidate
2022-11-25 11:59:08 +01:00
Arpad Borsos
9f36f988ad
Avoid GenFuture shim when compiling async constructs
...
Previously, async constructs would be lowered to "normal" generators,
with an additional `from_generator` / `GenFuture` shim in between to
convert from `Generator` to `Future`.
The compiler will now special-case these generators internally so that
async constructs will *directly* implement `Future` without the need
to go through the `from_generator` / `GenFuture` shim.
The primary motivation for this change was hiding this implementation
detail in stack traces and debuginfo, but it can in theory also help
the optimizer as there is less abstractions to see through.
2022-11-24 10:04:27 +01:00
Michael Goulet
9a9d0f40b8
Improve spans for RPITIT object-safety errors
2022-11-19 02:34:37 +00:00
lcnr
f1551bfc02
selection failure: recompute applicable impls
2022-11-08 14:48:07 +01:00
Michael Goulet
99b3454d37
Enforce rust-check ABI in signatures, calls
2022-11-05 18:05:25 +00:00
Boxy
3583f2758b
Cleanups
2022-11-03 18:52:16 +00:00
Michael Goulet
dce44faf5b
Revert "Make ClosureOutlivesRequirement not rely on an unresolved type"
...
This reverts commit a6b5f95fb0 .
2022-10-27 16:15:11 +00:00
Michael Goulet
a6b5f95fb0
Make ClosureOutlivesRequirement not rely on an unresolved type
2022-10-19 17:10:59 +00:00
Samuel Moelius
bf3a29f590
Duplicate comment in mod.rs
2022-10-17 03:54:56 -04:00
Michael Goulet
8b9a1f1f4e
Remove tuple candidate, nothing special about it
2022-10-07 16:19:21 +00:00
Jack Huey
9929c0ac76
Add AscribeUserTypeProvePredicate
2022-09-16 17:20:11 -04:00
Jack Huey
67653292be
Add to_constraint_category to ObligationCause and SubregionOrigin
2022-09-16 17:00:11 -04:00
Jack Huey
92b759f517
Revert "Better errors for implied static bound"
...
This reverts commit c75817b0a7 .
2022-09-16 09:47:07 -04:00
Jack Huey
c75817b0a7
Better errors for implied static bound
2022-09-13 20:18:04 -04:00
Dylan DPC
6bacb6f6e9
Rollup merge of #101681 - compiler-errors:rpitit-obj-safety, r=lcnr
...
Deny return-position `impl Trait` in traits for object safety
Fixes #101667
2022-09-12 15:21:33 +05:30
bors
3194958217
Auto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726
...
Implement `std::marker::Tuple`
Split out from #99943 (https://github.com/rust-lang/rust/pull/99943#pullrequestreview-1064459183 ).
Implements part of rust-lang/compiler-team#537
r? `@jackh726`
2022-09-12 03:24:29 +00:00
Michael Goulet
89b6488ef0
Deny RPITIT for object safety
2022-09-11 09:14:07 +00:00
lcnr
c63020a7c3
rename codegen_fulfill_obligation
2022-09-09 13:36:27 +02:00
Michael Goulet
30e3673d43
Add associated item binding to non-param-ty where clause suggestions
2022-09-08 02:06:48 +00:00
Michael Goulet
4ff587263e
Note binding obligation causes for const equate errors
2022-08-24 17:53:35 +00:00
Michael Goulet
2a16a127a0
More docs
2022-08-21 02:35:11 +00:00
Michael Goulet
c005e760f5
Rework point-at-arg
2022-08-21 02:34:52 +00:00
Michael Goulet
d0e4c679ff
Built-in implementation of Tuple trait
2022-08-07 16:31:03 -07:00
Michael Goulet
3bbe95ca0c
Combine redundant obligation cause codes
2022-07-24 19:35:53 +00:00
Michael Goulet
8926dac549
And for patterns too
2022-07-21 07:43:00 +00:00
Michael Goulet
99c32570bb
Do if-expression obligation stuff less eagerly
2022-07-21 07:39:28 +00:00
Matthias Krüger
69e4f21f2e
Rollup merge of #99290 - compiler-errors:revert-98794, r=lcnr
...
Revert "Highlight conflicting param-env candidates"
This reverts #98794 , commit 08135254dc .
Seems to have caused an incremental compilation bug. The root cause of the incr comp bug is somewhat unrelated but is triggered by this PR, so I don't feel comfortable with having this PR in the codebase until it can be investigated further. Fixes #99233 .
2022-07-16 22:30:52 +02:00
Will Crichton
e5bb7d80d6
Propagate Expectation around binop typeck code to construct more precise trait obligations for binops.
2022-07-15 18:06:18 -07:00
Michael Goulet
1c8f87e907
Revert "Highlight conflicting param-env candidates"
...
This reverts commit 08135254dc .
2022-07-15 17:21:55 +00:00
Michael Goulet
78efaf43e4
remove tcx from ObligationCauseCode::span
2022-07-15 03:17:20 +00:00
Michael Goulet
27b6ab9129
Remove some more usages of guess_head_span
2022-07-15 03:17:20 +00:00
kadmin
e612e2603c
Move abstract const to rustc_middle::ty
2022-07-12 02:21:31 +00:00
Michael Goulet
08135254dc
Highlight conflicting param-env candidates
2022-07-08 03:51:08 +00:00
Alan Egerton
e4b9625b87
Add #[derive(TypeVisitable)]
2022-07-05 22:25:15 +01:00
Michael Goulet
6c0a591dee
Fix trait object reborrow suggestion
2022-06-28 21:42:52 +00:00
Matthias Krüger
6391f239c8
Rollup merge of #98506 - compiler-errors:object-safety-suggestions, r=oli-obk
...
Fix span issues in object safety suggestions
Fixes #98500
2022-06-27 22:35:07 +02:00
Matthias Krüger
43dd0e2424
Rollup merge of #97780 - compiler-errors:field-wfcheck-before-sized, r=jackh726
...
Check ADT field is well-formed before checking it is sized
Fixes #96810 .
There is one diagnostics regression, in [`src/test/ui/generic-associated-types/bugs/issue-80626.stderr`](https://github.com/rust-lang/rust/pull/97780/files#diff-53795946378e78a0af23a10277c628ff79091c18090fdc385801ee70c1ba6963 ). I am not super concerned about it, since it's GAT related.
We _could_ fix it, possibly by using the `FieldSized` obligation cause code instead of `BuiltinDerivedObligation`. But that would require changing `Sized` trait confirmation and the `adt_sized_constraint` query.
2022-06-27 08:06:46 +02:00
Michael Goulet
eff865ca76
Fix span issues in object safety suggestions
2022-06-25 14:59:45 -07:00
Michael Goulet
52409c4c90
Point at return expression for RPIT-related error
2022-06-21 18:23:37 -07:00
Takayuki Maeda
77d6176e69
remove unnecessary to_string and String::new
2022-06-13 15:48:40 +09:00
Michael Goulet
c1f4f980f4
Do wfcheck on ADT field before Sized check
2022-06-05 23:05:14 -07:00
Michael Goulet
1784634a39
Lifetime variance fixes for rustc
2022-05-22 14:29:32 -07:00
Dylan DPC
04f903859a
Rollup merge of #95979 - lcnr:coherence-docs, r=compiler-errors
...
update coherence docs, fix generator + opaque type ICE
the world is confusing, this makes it slightly less so
2022-05-18 08:41:14 +02:00
bors
c1d65eaa45
Auto merge of #96892 - oli-obk: 🐌 _obligation_cause_code_ 🐌 , r=estebank
...
Clean up derived obligation creation
r? `@estebank`
working on fixing the perf regression from https://github.com/rust-lang/rust/pull/91030#issuecomment-1083360210
2022-05-17 01:46:25 +00:00
Oli Scherer
0cefa5fa18
Force inline InternedObligationCauseCode creation
2022-05-16 13:34:03 +00:00
Oli Scherer
59bbbe78e2
Avoid invoking the full eq infrastructure when all we want is to check a discriminant
2022-05-13 09:31:46 +00:00
Oli Scherer
72f144de24
Give the inliner some hints
2022-05-12 11:29:01 +00:00
Camille GILLOT
6cfe52c094
Gracefully fail to resolve associated items instead of delay_span_bug.
2022-05-11 08:28:02 +02:00
Oli Scherer
824e9e47f7
Use InternedObligationCauseCode everywhere
2022-05-10 12:01:56 +00:00