Skip to content

Conversation

@Nashenas88
Copy link
Contributor

Fixes #5663

Now inner_mod below is properly marked as a module.

use crate::inner::{self as inner_mod};
mod inner {}

@jonas-schievink
Copy link
Contributor

Shouldn't this be done inside classify_name_ref?

@Nashenas88
Copy link
Contributor Author

Nashenas88 commented Aug 4, 2020

Shouldn't this be done inside classify_name_ref?

My thought was that the logic of being inside a Rename is in classify_name. I don't think it makes sense to assume self is within a UseTree from inside of classify_name_ref. The other issue is that there is no name_ref when the span matches self. I have to fallback to checking for the self token explicitly.

@jonas-schievink
Copy link
Contributor

Okay, that makes sense

@jonas-schievink
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 5, 2020

@bors bors bot merged commit 32246b9 into rust-lang:master Aug 5, 2020
@Nashenas88 Nashenas88 deleted the self-as-mod branch August 6, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renamed self module is marked as unresolved reference in semantic highlighting

2 participants