-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Sync from rust-lang/rust
#12871
Sync from rust-lang/rust
#12871
Conversation
- use `path` instead of `paths` - don't mark rust-analyzer as an optional tool - print the cargo command that's run in the proc-macro-test build script this originally was part of a change to fix `test --stage 0 rust-analyzer`, but I'm going to leave that for a separate PR so it's easier to review.
…on order isn't guaranteed (And, in fact, it failed on i686)
# git grep shouldn't match entries in this benchmark data | ||
bench_data/** binary | ||
crates/syntax/test_data/** -text eof=LF |
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.
Why was this removed?
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.
It's a fun story! The short answer it: it caused bors to fail to merge the rust-lang/rust
subtree PR.
The longer story is: that change was introduced in #2166 - but it never did what was intended.
eof
is not a gitattribute setting. eol
is, but even that line used eol
, it still wouldn't do anything, because of -text
. So by mistake, 3 files were treated as binary, and checked out with CRLF line endings (those were the ones bors choked on).
After removing this line from .gitattribute
, I re-added the folder to git, removed it from disk and used git restore
to write it with the proper line endings. The relevant commit is here: rust-lang/rust@1bb63df
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 just did a fresh clone of that branch from Windows and ran cargo test
with the latest stable, no issues whatsoever.
I'm still convinced #2166 wasn't needed, as explained here: #2166 (comment)
crates/hir-def/src/import_map.rs
Outdated
} else { | ||
Some((name, per_ns)) | ||
} | ||
if per_ns.is_none() { None } else { Some((name, per_ns)) } |
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.
This is the result of some nightly only options rust-lang/rust uses: https://github.com/rust-lang/rust/blob/2f320a224e827b400be25966755a621779f797cc/rustfmt.toml#L2-L4 Stable rustfmt without those options as used in this repo will revert these changes. You will need to do one of:
- Copy the options to a rustfmt.toml in this repo and switch to nightly rustfmt
- Ignore rust-analyzer for rustfmt in rust-lang/rust
- Explicitly use the stable defaults of those options in rustfmt.toml in this repo and hope rustfmt will pick them in favor of the global rustfmt.toml of rust-lang/rust
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.
That one's my bad, I had "format on save" set up when doing those edits. I'll revert them in this PR.
type Foo = fn() -> dyn Send + 'static; | ||
fn main() { | ||
let b = (&a) as &dyn Add<Other, Output = Addable> + Other; | ||
} |
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.
What is the difference in this file?
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.
Line endings I would assume?
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.
CR => LF (as for the other 2 files in the same folder), see #12871 (comment)
Please make sure to fix my review comments in additional commits to avoid confusing git subtree. |
@bjorn3 Do you mean avoiding to squash/rebase this PR? If I |
Indeed
Yes |
This is good for a re-review. I addressed the rustfmt issue, and the rest of the comments was about the 3 CRLF files: the rationale is explained here: #12871 (comment) |
@bors r+ |
☀️ Test successful - checks-actions |
…ent, r=Mark-Simulacrum Sync `rust-analyzer`, add `rust-analyzer-proc-macro-srv` binary to Rustc component As discussed earlier with `@jyn514` and `@pietroalbini,` I'm also going to use this PR to have `dist::Rustc` build the `rust-analyzer-proc-macro-srv` binary introduced in: * rust-lang/rust-analyzer#12871
…rk-Simulacrum Sync `rust-analyzer`, add `rust-analyzer-proc-macro-srv` binary to Rustc component As discussed earlier with `@jyn514` and `@pietroalbini,` I'm also going to use this PR to have `dist::Rustc` build the `rust-analyzer-proc-macro-srv` binary introduced in: * rust-lang#12871
…rk-Simulacrum Sync `rust-analyzer`, add `rust-analyzer-proc-macro-srv` binary to Rustc component As discussed earlier with `@jyn514` and `@pietroalbini,` I'm also going to use this PR to have `dist::Rustc` build the `rust-analyzer-proc-macro-srv` binary introduced in: * rust-lang#12871
This is the first subtree sync PR from
rust-lang/rust
torust-lang/rust-analyzer
, made by following the instructions at: https://doc.rust-lang.org/nightly/clippy/development/infrastructure/sync.html#performing-the-sync-from-rust-langrust-to-clippyIt includes all the commits that were made in:
(And that were reviewed ahead of time by @Veykril + @lnicola)