Conversation
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The r=me with tests updated |
|
Yeah I discussed this with Aaron and he said this was a bug.
…On Sat, Apr 21, 2018, 4:43 AM Vadim Petrochenkov ***@***.***> wrote:
The ::crate:: form is in line with the model from RFC 2126 (#44660
<#44660>), but crate:: fits
better into the updated model from
https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/183,
so I agree with this change.
We may want to remove the ::crate:: form later.
r=me with tests updated
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#50131 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABivSN85MO5DF1bhAsmxT6ajMmUJnTGhks5tqxtdgaJpZM4TePYY>
.
|
3760c94 to
8637166
Compare
|
Ahh, I see why we didn't compile this previously. The problem is within struct fields. So we can fix this everywhere except in tuple struct fields. Gah. Parsing. @aturon @cramertj if we still want to fix this, how should we address that ambiguity? Always parse it as a path? |
|
@Manishearth It can be trivially resolved by always parsing |
src/librustc_resolve/lib.rs
Outdated
There was a problem hiding this comment.
crate can be used as a single segment path with the meaning "root module", e.g. in use crate as something.
If this line is removed then keyword-crate-as-identifier.rs should report a correct error, something like "expected a unit struct or constand, found module".
There was a problem hiding this comment.
Ah. It was, but I thought that was a bug. Will fix.
fd00a97 to
27f5f56
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
27f5f56 to
0dc4ce7
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
0dc4ce7 to
3a19e39
Compare
|
We should be doing the same for |
|
(I can split that out into a second PR if you r+ the first commit. I'll be fixing the tests for the second commit on Monday) |
17e5d27 to
3a19e39
Compare
|
Oh, sorry, that's fixed by #49789 |
|
@bors: p=1 We want to get the edition-related changes landed ASAP. |
There was a problem hiding this comment.
Could you keep this test in some compile-pass/run-pass form?
|
r=me after restoring the test and probably reverting the unintended (?) |
3a19e39 to
9f5e08e
Compare
|
@bors r=petrochenkov |
|
📌 Commit 9f5e08e has been approved by |
Allow crate:: in local paths Currently if you want to use `crate` locally you have to do `::crate::`. This shouldn't be necessary (will fix up tests later) r? @petrochenkov
|
☀️ Test successful - status-appveyor, status-travis |
Currently if you want to use
cratelocally you have to do::crate::. This shouldn't be necessary(will fix up tests later)
r? @petrochenkov