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
Oli Scherer
213c17486e
Make FunctionArgumentObligation also use the "no allocation for misc" trick
2022-05-10 11:26:53 +00:00
Oli Scherer
1b51e1ad20
Don't allocate misc obligation parents of derived obligations
2022-05-10 11:14:07 +00:00
Oli Scherer
9ba6ddb929
Make the derived obligation cause parent private
2022-05-10 11:10:27 +00:00
Oli Scherer
5b5b549580
Add a helper function for a common piece of code
2022-05-10 11:03:52 +00:00
Oli Scherer
05a62c5527
Remove clone_code method
2022-05-10 10:42:29 +00:00
Oli Scherer
dc21fcb2fc
Remove another use of clone_code
2022-05-10 10:32:35 +00:00
Oli Scherer
704bbe5210
Move an extension trait method onto the type directly and reuse it
2022-05-10 09:26:09 +00:00
Oli Scherer
312d27d0a2
Remove some unnecessary clones
2022-05-10 08:43:39 +00:00
lcnr
58781edc54
update coherence docs, fix opaque type + generator ice
2022-05-10 09:09:06 +02:00