-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not fail on multiple methods definition #58942
Comments
This compiles all the way back to 1.0.0 (tested with godbolt). |
Ugh, I would actually check the intermediate versions of Rust between 1.0 and 1.33, IIRC this error should be impossible in some version range due to how identifiers worked back then. Slightly more minimized reproduction: struct X;
impl X {
fn f() {}
}
macro_rules! do_impl { () => {
impl X {
fn f() {}
}
}}
do_impl!();
fn main() {} |
Fixed in #58948 |
The regression was introduced in Rust 1.29, the error was reported before that. |
hygiene: Fix identifier comparison in impl overlap check Fixes #58942
hygiene: Fix identifier comparison in impl overlap check Fixes #58942
This obviously fails to compile:
But this does not:
unless you use it:
I think it should fail even when we don't use the duplicate function.
The text was updated successfully, but these errors were encountered: