-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #57501 - petrochenkov:highvar, r=<try>
[WIP] High priority resolutions for associated variants cc #56225 (comment)
- Loading branch information
Showing
11 changed files
with
136 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
src/test/ui/feature-gates/feature-gate-type_alias_enum_variants.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#![feature(type_alias_enum_variants)] | ||
|
||
enum E { | ||
V(u8) | ||
} | ||
|
||
impl E { | ||
fn V() {} | ||
} | ||
|
||
fn main() { | ||
<E>::V(); //~ ERROR this function takes 1 parameter but 0 parameters were supplied | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0061]: this function takes 1 parameter but 0 parameters were supplied | ||
--> $DIR/type-alias-enum-variants-priority-2.rs:12:5 | ||
| | ||
LL | V(u8) | ||
| ----- defined here | ||
... | ||
LL | <E>::V(); //~ ERROR this function takes 1 parameter but 0 parameters were supplied | ||
| ^^^^^^^^ expected 1 parameter | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0061`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#![feature(type_alias_enum_variants)] | ||
|
||
enum E { | ||
V(u8) | ||
} | ||
|
||
trait Tr { | ||
type V; | ||
fn f() -> Self::V; | ||
} | ||
|
||
impl Tr for E { | ||
type V = u8; | ||
fn f() -> Self::V { loop {} } //~ ERROR type vs variant ambiguity | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: type vs variant ambiguity | ||
--> $DIR/type-alias-enum-variants-priority.rs:14:15 | ||
| | ||
LL | fn f() -> Self::V { loop {} } //~ ERROR type vs variant ambiguity | ||
| ^^^^^^^ | ||
| | ||
= note: #[forbid(type_vs_variant_ambiguity)] on by default | ||
|
||
error: aborting due to previous error | ||
|