Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
edc8c76
add tests for the arbitrary_self_types, which won't pass yet
mikeyhew Oct 20, 2017
497397a
initial implementation of arbitrary_self_types
mikeyhew Nov 2, 2017
7dff08d
Rewrote check_method_receiver and ExplicitSelf, got a borrow checker …
mikeyhew Nov 5, 2017
a3f5866
Fix the lifetime error in ExplicitSelf
mikeyhew Nov 5, 2017
9a592e6
Improve feature gate error, and return after emitting errors instead …
mikeyhew Nov 5, 2017
d03eb2c
Fix some of the tests
mikeyhew Nov 5, 2017
aa0df3d
get the old error messages back
mikeyhew Nov 6, 2017
6fd2156
Add arbitrary_self_types feature gate error to some tests
mikeyhew Nov 7, 2017
0d739b5
Update/improve documentation of ExpliciSelf
mikeyhew Nov 7, 2017
1d29966
wrap error code in DiagnosticId::Error so it compiles
mikeyhew Nov 7, 2017
0b27dcc
modify ExplicitSelf::determine to take an `is_self_type` predicate cl…
mikeyhew Nov 8, 2017
3902643
move ExplicitSelf to rustc::ty::util, and use it to implement object …
mikeyhew Nov 8, 2017
2369746
normalize associated types in both self_ty and self_arg_ty
mikeyhew Nov 8, 2017
bbe755c
Switch from using At::eq to InferCtxt::can_eq and demand_eqtype_with_…
mikeyhew Nov 8, 2017
02ce3ac
add a NOTE comment to the object safety test so that it passes
mikeyhew Nov 8, 2017
e06cd31
Remove the error check that I think is redundant, and change the test…
mikeyhew Nov 8, 2017
0a3a46d
tidy things up a bit
mikeyhew Nov 8, 2017
0954e54
shorten line length for tidy
mikeyhew Nov 8, 2017
aa00f17
fix error message in arbitrary-self-types-not-object-safe test
mikeyhew Nov 8, 2017
7f8b003
update ui test to new error message
mikeyhew Nov 8, 2017
dcbb27a
fix the bug in region_inference where constraint origins were being o…
mikeyhew Nov 9, 2017
31d3783
fixed all the compile-fail error messages
mikeyhew Nov 9, 2017
c046fda
update test/ui/static-lifetime.stderr with new error message
mikeyhew Nov 9, 2017
5d170f0
add a comment explaining the bugfix to infer::region_inference::add_c…
mikeyhew Nov 9, 2017
ddc21d5
Don't emit the feature error if it's an invalid self type
mikeyhew Nov 9, 2017
77cd993
add run-pass tests
mikeyhew Nov 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
shorten line length for tidy
  • Loading branch information
mikeyhew committed Nov 8, 2017
commit 0954e5489c0d28021890ffe14e1ed7b07a3f3772
3 changes: 2 additions & 1 deletion src/librustc_typeck/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {

if fcx.infcx.can_eq(fcx.param_env, self_ty, potential_self_ty).is_ok() {
autoderef.finalize();
if let Some(mut err) = fcx.demand_eqtype_with_origin(&cause, self_ty, potential_self_ty) {
if let Some(mut err) = fcx.demand_eqtype_with_origin(
&cause, self_ty, potential_self_ty) {
err.emit();
}
break
Expand Down