Skip to content
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

internal: Sync from downstream #15494

Merged
merged 13 commits into from
Aug 22, 2023
6 changes: 6 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ jobs:
- name: Test
run: cargo test ${{ env.USE_SYSROOT_ABI }} -- --nocapture --quiet

- name: Switch to stable toolchain
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Veykril heads-up, just so you're aware of this change.

run: |
rustup update --no-self-update stable
rustup component add --toolchain stable rust-src
rustup default stable

- name: Run analysis-stats on rust-analyzer
if: matrix.os == 'ubuntu-latest'
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/hir-ty/src/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ pub enum TerminatorKind {
///
/// Only permitted in cleanup blocks. `Resume` is not permitted with `-C unwind=abort` after
/// deaggregation runs.
Resume,
UnwindResume,

/// Indicates that the landing pad is finished and that the process should abort.
///
Expand Down Expand Up @@ -1057,7 +1057,7 @@ impl MirBody {
TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. }
| TerminatorKind::Goto { .. }
| TerminatorKind::Resume
| TerminatorKind::UnwindResume
| TerminatorKind::GeneratorDrop
| TerminatorKind::Abort
| TerminatorKind::Return
Expand Down
6 changes: 3 additions & 3 deletions crates/hir-ty/src/mir/borrowck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fn moved_out_of_ref(db: &dyn HirDatabase, body: &MirBody) -> Vec<MovedOutOfRef>
TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. }
| TerminatorKind::Goto { .. }
| TerminatorKind::Resume
| TerminatorKind::UnwindResume
| TerminatorKind::GeneratorDrop
| TerminatorKind::Abort
| TerminatorKind::Return
Expand Down Expand Up @@ -280,7 +280,7 @@ fn ever_initialized_map(
let targets = match &terminator.kind {
TerminatorKind::Goto { target } => vec![*target],
TerminatorKind::SwitchInt { targets, .. } => targets.all_targets().to_vec(),
TerminatorKind::Resume
TerminatorKind::UnwindResume
| TerminatorKind::Abort
| TerminatorKind::Return
| TerminatorKind::Unreachable => vec![],
Expand Down Expand Up @@ -371,7 +371,7 @@ fn mutability_of_locals(
};
match &terminator.kind {
TerminatorKind::Goto { .. }
| TerminatorKind::Resume
| TerminatorKind::UnwindResume
| TerminatorKind::Abort
| TerminatorKind::Return
| TerminatorKind::Unreachable
Expand Down
2 changes: 1 addition & 1 deletion crates/hir-ty/src/mir/monomorphization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl Filler<'_> {
self.fill_operand(discr)?;
}
TerminatorKind::Goto { .. }
| TerminatorKind::Resume
| TerminatorKind::UnwindResume
| TerminatorKind::Abort
| TerminatorKind::Return
| TerminatorKind::Unreachable
Expand Down
3 changes: 2 additions & 1 deletion crates/ide-completion/src/completions/attribute/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext<'_>) {
};
}

const KNOWN_ARCH: [&str; 19] = [
const KNOWN_ARCH: [&str; 20] = [
"aarch64",
"arm",
"avr",
"csky",
"hexagon",
"mips",
"mips64",
Expand Down
2 changes: 2 additions & 0 deletions crates/ide-completion/src/completions/extern_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const SUPPORTED_CALLING_CONVENTIONS: &[&str] = &[
"efiapi",
"avr-interrupt",
"avr-non-blocking-interrupt",
"riscv-interrupt-m",
"riscv-interrupt-s",
"C-cmse-nonsecure-call",
"wasm",
"system",
Expand Down
16 changes: 0 additions & 16 deletions crates/ide-db/src/generated/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -928,22 +928,6 @@ $ cat $(find -name '*.s')
ret;
}
```
"##,
},
Lint {
label: "abi_thiscall",
description: r##"# `abi_thiscall`

The tracking issue for this feature is: [#42202]

[#42202]: https://github.com/rust-lang/rust/issues/42202

------------------------

The MSVC ABI on x86 Windows uses the `thiscall` calling convention for C++
instance methods by default; it is identical to the usual (C) calling
convention on x86 Windows except that the first parameter of the method,
the `this` pointer, is passed in the ECX register.
"##,
},
Lint {
Expand Down
2 changes: 1 addition & 1 deletion crates/proc-macro-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rust-version.workspace = true
doctest = false

[dependencies]
object = { version = "0.31.0", default-features = false, features = [
object = { version = "0.32.0", default-features = false, features = [
"std",
"read_core",
"elf",
Expand Down
2 changes: 1 addition & 1 deletion crates/proc-macro-srv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rust-version.workspace = true
doctest = false

[dependencies]
object = { version = "0.31.0", default-features = false, features = [
object = { version = "0.32.0", default-features = false, features = [
"std",
"read_core",
"elf",
Expand Down
3 changes: 2 additions & 1 deletion crates/rust-analyzer/tests/slow-tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ edition = "2021"
bar = {path = "../bar"}

//- /foo/src/main.rs
#![allow(internal_features)]
#![feature(rustc_attrs, decl_macro)]
use bar::Bar;

Expand Down Expand Up @@ -938,7 +939,7 @@ pub fn foo(_input: TokenStream) -> TokenStream {
let res = server.send_request::<HoverRequest>(HoverParams {
text_document_position_params: TextDocumentPositionParams::new(
server.doc_id("foo/src/main.rs"),
Position::new(11, 9),
Position::new(12, 9),
),
work_done_progress_params: Default::default(),
});
Expand Down