-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Some more libsyntax::attr cleanup #63272
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 |
src/libsyntax/attr/mod.rs
Outdated
@@ -347,16 +347,17 @@ impl Attribute { | |||
|
|||
pub fn mk_name_value_item_str(ident: Ident, value: Spanned<Symbol>) -> MetaItem { | |||
let lit_kind = LitKind::Str(value.node, ast::StrStyle::Cooked); | |||
mk_name_value_item(ident.span.to(value.span), ident, lit_kind, value.span) | |||
let pos = ident.span.to(value.span); | |||
mk_name_value_item(ident.with_span_pos(pos), lit_kind, value.span) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather move the span concatenation logic into mk_name_value_item
and avoid changing the ident span.
r=me with the comment addressed and rustdoc fixed |
d6d782a
to
8849149
Compare
@bors r=petrochenkov rollup |
📌 Commit 8849149 has been approved by |
…chenkov Some more libsyntax::attr cleanup Much smaller patch than the last one, mostly just finishing up by removing some Span arguments. r? @petrochenkov
…chenkov Some more libsyntax::attr cleanup Much smaller patch than the last one, mostly just finishing up by removing some Span arguments. r? @petrochenkov
…chenkov Some more libsyntax::attr cleanup Much smaller patch than the last one, mostly just finishing up by removing some Span arguments. r? @petrochenkov
…chenkov Some more libsyntax::attr cleanup Much smaller patch than the last one, mostly just finishing up by removing some Span arguments. r? @petrochenkov
Rollup of 14 pull requests Successful merges: - #61457 (Implement DoubleEndedIterator for iter::{StepBy, Peekable, Take}) - #63017 (Remove special code-path for handing unknown tokens) - #63184 (Explaining the reason why validation is performed in to_str of path.rs) - #63230 (Make use of possibly uninitialized data [E0381] a hard error) - #63260 (fix UB in a test) - #63264 (Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank") - #63272 (Some more libsyntax::attr cleanup) - #63285 (Remove leftover AwaitOrigin) - #63287 (Don't store &Span) - #63293 (Clarify align_to's requirements and obligations) - #63295 (improve align_offset docs) - #63299 (Make qualify consts in_projection use PlaceRef) - #63312 (doc: fix broken sentence) - #63315 (Fix #63313) Failed merges: r? @ghost
Much smaller patch than the last one, mostly just finishing up by removing some Span arguments.
r? @petrochenkov