resolve the conflict in compiler/rustc_session/src/parse.rs
Signed-off-by: codehorseman <cricis@yeah.net>
This commit is contained in:
parent
a918d8b55b
commit
c0861d3a9d
@ -575,7 +575,7 @@ where
|
|||||||
pub(crate) fn extract_pre_comment(pre_snippet: &str) -> (Option<String>, ListItemCommentStyle) {
|
pub(crate) fn extract_pre_comment(pre_snippet: &str) -> (Option<String>, ListItemCommentStyle) {
|
||||||
let trimmed_pre_snippet = pre_snippet.trim();
|
let trimmed_pre_snippet = pre_snippet.trim();
|
||||||
// Both start and end are checked to support keeping a block comment inline with
|
// Both start and end are checked to support keeping a block comment inline with
|
||||||
// the item, even if there are preceeding line comments, while still supporting
|
// the item, even if there are preceding line comments, while still supporting
|
||||||
// a snippet that starts with a block comment but also contains one or more
|
// a snippet that starts with a block comment but also contains one or more
|
||||||
// trailing single line comments.
|
// trailing single line comments.
|
||||||
// https://github.com/rust-lang/rustfmt/issues/3025
|
// https://github.com/rust-lang/rustfmt/issues/3025
|
||||||
|
@ -251,7 +251,7 @@ fn rewrite_segment(
|
|||||||
match **args {
|
match **args {
|
||||||
ast::GenericArgs::AngleBracketed(ref data) if !data.args.is_empty() => {
|
ast::GenericArgs::AngleBracketed(ref data) if !data.args.is_empty() => {
|
||||||
// HACK: squeeze out the span between the identifier and the parameters.
|
// HACK: squeeze out the span between the identifier and the parameters.
|
||||||
// The hack is requried so that we don't remove the separator inside macro calls.
|
// The hack is required so that we don't remove the separator inside macro calls.
|
||||||
// This does not work in the presence of comment, hoping that people are
|
// This does not work in the presence of comment, hoping that people are
|
||||||
// sane about where to put their comment.
|
// sane about where to put their comment.
|
||||||
let separator_snippet = context
|
let separator_snippet = context
|
||||||
|
Loading…
x
Reference in New Issue
Block a user